Skip to content

fix: make .dockerignore pyc/env/venv patterns match nested paths - #10181

Merged
sriramveeraghanta merged 1 commit into
makeplane:previewfrom
Krish6115:fix/dockerignore-nested-patterns
Nov 23, 2026
Merged

sriramveeraghanta merged 1 commit into
makeplane:previewfrom
Krish6115:fix/dockerignore-nested-patterns

Conversation

@Krish6115

@Krish6115 Krish6115 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

In .dockerignore, patterns without a **/ prefix only match at the root of the build context (unlike .gitignore). *.pyc, .env, venv and .venv therefore never excluded nested files such as apps/api/.env, apps/api/**/*.pyc or apps/api/.venv, so they were sent to the Docker daemon and could end up in images built from the repo root.

This prefixes those four patterns with **/ so they match at any depth.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Test Scenarios

Checked that no Dockerfile in the repo copies a nested .env, venv or .pyc path. Did not build the images.

References

Closes #7907

Summary by CodeRabbit

  • Chores
    • Docker builds now exclude Python bytecode, environment files, and virtual-environment directories at any depth in the project, rather than only at the root. This keeps nested copies of these files out of the build context as well.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 14:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@CLAassistant

CLAassistant commented Nov 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The .dockerignore patterns for *.pyc, .env, venv, and .venv now match those names at any directory depth.

Changes: Docker build-context exclusions

Layer / File(s) Summary
Match ignore patterns at nested paths
.dockerignore
The patterns for *.pyc, .env, venv, and .venv now use **/ prefixes to match at any directory depth.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related PRs

  • makeplane/plane#9950: Updates apps/api/.dockerignore to exclude selected files and directories at nested paths.

Suggested reviewers: pablohashescobar, l2dy

Merge Risk: Minimal · up to 076fc

The change excludes nested bytecode, environment files, and virtual environments from Docker build contexts. No merge-blocking risk is identified; normal checks should complete before merging.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the actual change: the .dockerignore pyc, env, and venv patterns are changed to match nested paths. The raw summary confirms the change is a prefix of **/ on those patterns, so the tit…
Description check Passed The description states the problem, which is that patterns without a **/ prefix only match at the build context root in .dockerignore, and it lists the four affected patterns. It names the change made…
Linked Issues check Passed Issue #7907 asks for the root .dockerignore *.pyc pattern to match at any depth, so that **/*.pyc is used. The whole-PR diff against the merge base changes .dockerignore line 2 from *.pyc to…
Out of Scope Changes check Passed The whole-PR diff changes only .dockerignore, with four lines changed. Besides the *.pyc line required by #7907, it changes .env, venv, and .venv to **/.env, **/venv, and **/.venv. The…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Title check

Explanation

The title names the actual change: the .dockerignore pyc, env, and venv patterns are changed to match nested paths. The raw summary confirms the change is a prefix of **/ on those patterns, so the title is accurate and specific. It uses the conventional "fix:" prefix and is 8 words, which is concise.

Full details: Description check

Explanation

The description states the problem, which is that patterns without a **/ prefix only match at the build context root in .dockerignore, and it lists the four affected patterns. It names the change made and the affected nested paths. The Type of Change section has the Bug fix box checked. The Test Scenarios section describes a repository check and states that no image build was run. The References section links Closes #7907. The Screenshots and Media section from the template is missing. This is not applicable to a .dockerignore change, so the omission is not a gap. The description covers the required content well, so the check passes.

Full details: Linked Issues check

Explanation

Issue #7907 asks for the root .dockerignore *.pyc pattern to match at any depth, so that **/*.pyc is used. The whole-PR diff against the merge base changes .dockerignore line 2 from *.pyc to **/*.pyc. This satisfies the issue requirement. The issue also asks whether the pattern was intentional and whether developers know the gitignore/dockerignore difference. These are questions, not coding requirements. No automated tests are required by the issue, and none are part of the PR. The PR description reports a manual check of Dockerfiles, which is not a coding requirement.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff changes only .dockerignore, with four lines changed. Besides the *.pyc line required by #7907, it changes .env, venv, and .venv to **/.env, **/venv, and **/.venv. These three changes use the same fix for the same root cause: patterns without **/ match only at the build context root. The PR objectives name these patterns explicitly. The other entries (.git, node_modules/, **/node_modules/, npm-debug.log, and the rest of the file) are unchanged. No unrelated file is modified.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 49646c78-899f-43ed-ad51-839e5e1fd1bc
Commits

Reviewing files that changed from the base of the PR and between bc65a78 and 076fcb7.

Files selected for processing: 1
  • .dockerignore

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@Krish6115

Copy link
Copy Markdown
Contributor Author

Hi @pratapalakshmi, whenever you have some free time, could you please review this PR? It's a small change. Happy to make any adjustments needed. Thanks!

@Krish6115

Copy link
Copy Markdown
Contributor Author

Hi @prateekshourya29, thanks for merging my earlier PRs. Whenever you get a chance, could you take a look at this one too? Happy to make any changes needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible .dockerignore misconfiguration

4 participants