[#2703] Turned '.dockerignore', '.gitignore' and '.gitignore.artifact' into deny lists.#2780
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe ignore rules in ChangesIgnore File Deny-List Rework
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitignore:
- Around line 4-34: The .gitignore rules are missing common database dump
patterns, so files like SQL exports and SQLite backups can still be committed
accidentally. Update the ignore list near the existing local/generated file
entries to also cover database dump extensions such as *.sql, *.sql.gz, and
*.sqlite3, keeping the pattern set consistent with the existing recipes and
webroot ignore rules.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 5e20daaf-f700-4318-a00f-cc8228c32597
⛔ Files ignored due to path filters (45)
.vortex/installer/tests/Fixtures/handler_process/_baseline/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/_baseline/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/_baseline/composer.jsonis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/ai_instructions_disabled/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.jsonis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.jsonis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_enabled/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.jsonis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_rector/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_none/.dockerignoreis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_none/.gitignoreis excluded by!.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (3)
.dockerignore.gitignorecomposer.json
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
…folding. Drupal core's PHPUnit bootstrap iterates 'web/modules', 'web/profiles' and 'web/themes' and fails when one is missing; the scaffold README files are what materializes these directories on sites without custom or contrib extensions of that type.
…test. With the deny-list '.gitignore', 'settings.migration.php' is tracked by default and the file carries no migration-specific content in either state.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6a4f55945e81d033a58b521f--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
…files. The '.gitignore.artifact' now uses the same multisite 'web/sites/*' and 'web/themes/**/node_modules' patterns and the same unanchored any-depth cache entries as '.gitignore'. The '.dockerignore' cache entries use '**/' to match at any depth, mirroring the unanchored gitignore semantics, which also covers the tooling cache paths previously listed in the 'VORTEX_DEV' fence.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
…from the deployment artifact. Comparing the deployed artifact tree against the pre-change baseline surfaced files the deny list let through: 'db_cache_*' scratch files written by the GHA workflow into the workspace root, the in-tree '.vortex' harness (Vortex self-deploys only), '.dclintrc' and 'README.dist.md'. The 'db_cache_*' files are also excluded from the image build context.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The '.vortex' and 'README.dist.md' exclusions move behind the 'VORTEX_DEV' fence as they never exist in consumer sites, and the 'db_cache_*' exclusions move behind the 'CI_PROVIDER_GHA' fence as the cache key files are written into the workspace only by the GitHub Actions workflow (the CircleCI configuration writes them to '/tmp').
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Added a '.gitignore' section to the architecture page, a '.dockerignore' section to the Docker tool page, reframed the '.gitignore.artifact' section on the artifact deployment page as a deny list, and cross-linked the git-artifact tool page to it.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #2703
Summary
Flipped
.dockerignore,.gitignoreand.gitignore.artifactfrom allow lists (ignore everything, then un-ignore a curated whitelist) to deny lists that exclude only what is harmful: VCS internals, secrets and local overrides, Composer/Yarn-generated content, database dumps, caches, and content/test artifacts. The allow-list style made every newly added legitimate file silently vanish from git, the container image, or the deployment artifact until it was explicitly whitelisted; the deny-list default inverts that so new files are visible and included unless a rule says otherwise. All three files share the same section order and the same pattern conventions, expressed per each engine's matching semantics, and consumer sites receive them completely fence-free. The deployed artifact tree was verified against the pre-changedeployment/1.40.1artifact with no regressions (see the comparison report on the issue).Changes
.gitignoreweb/*allow-list block is replaced with explicit denies for Composer-generated directories (web/core,web/libraries,web/*/contrib,drush/Commands/contrib- the latter fixing a previously unignored Composer path), scaffold-written files, local settings overrides, and content/test artifacts.README.txtplaceholders stay scaffolded and are now ignored explicitly: they materialize otherwise-emptyweb/modules|profiles|themesdirectories that the Drupal core test bootstrap iterates, so disabling them incomposer.jsonfile-mappingbreaksahoy testinside containers where only the image content exists.recipes/*(Composer installs contrib recipes of typedrupal-recipeintorecipes/next to custom recipes, so they cannot be separated by deny rules) and.claude/*(preserves the existing semantics where only.claude/settings.jsonis tracked).settings.migration.phpis tracked by default now, so theMIGRATIONfence disappears from this file; the installer still removes the file itself for non-migration installs..dockerignore*allow-list is replaced with denies for VCS/IDE/OS files, credentials and local overrides, data/logs/caches, host-installed dependencies, Composer-generated Drupal directories, content/test artifacts, and theme build assets.!web):web/sites/*/filesuser uploads,web/themes/**/node_modulesandweb/themes/**/buildhost artifacts, and local settings overrides inside the webroot..vortex/toolingdev artifacts are excluded:tests,playgroundandvendorinside theVORTEX_DEVfence (withREADME.dist.md), and the tooling caches via the any-depth**/cache patterns. This shrinks the Vortex development build context from roughly 92 MB to a few MB; consumer sites are unaffected as the fence strips on install.db_cache_*cache-key scratch files that the GitHub Actions workflow writes into the workspace are excluded behind aCI_PROVIDER_GHAfence, keeping them out of the built images.HOSTING_ACQUIA/HOSTING_LAGOONfences and per-tool whitelist lines (!phpstan.neon,!behat.yml, ...) became unnecessary and are gone, which collapses about twenty per-scenario installer fixture diffs into the baseline..gitignore.artifact/*allow-list is replaced with denies for VCS/IDE/OS files, non-production scaffold files, local settings overrides, content/test artifacts, development/CI/AI configuration, documentation, testing and linting configuration, dependency manifests and lock files, theme asset sources, caches, and credentials (auth.json,.env.local).vendor/, builtweb/(core, contrib, compiled themebuild/assets),config/,drush/,scripts/,.env,composer.json, and Acquiahooks/(now deployed by default, without a hosting fence)./db_cache_*behindCI_PROVIDER_GHA(the GHA workflow writes these into the workspace forhashFiles()cache keys; the CircleCI config writes them to/tmp), and/.vortexplus/README.dist.mdbehindVORTEX_DEV(they never exist in consumer sites).recipes/now deploys (config-class content, enables recipe-based provisioning from the artifact), andweb/sites/*/settings.local.php/services.local.ymlare newly denied as protective coverage.Pattern conventions
The three files use one set of conventions, adjusted for the difference between the two matching engines: gitignore patterns without a slash match at any depth and a leading
/anchors to the root, while dockerignore patterns are always rooted and need a**/prefix to match at any depth.web/sites/*/settings.local.php,web/sites/*/services.local.ymlandweb/sites/*/files;web/themes/**/node_modules;web/themes/**/build..artifacts,.data,.logs,.phpunit.cache,.twig-cs-fixer.cache) match at any depth in all three files: unanchored in the gitignore-syntax files,**/-prefixed in.dockerignore./vendor,/node_modules, lock files, local override files) are/-anchored in the gitignore-syntax files and plain in.dockerignore, where every pattern is rooted by definition..gitignorecarries no VCS/IDE/OS section because OS junk belongs in the developer's global gitignore, while the image and artifact have no global mechanism and deny**/.DS_Storethemselves;auth.jsonis denied only in the artifact because the image build requires it for Composer access to private packages while hosting git must never receive tokens; the artifact's theme source entries stay theme-path-exact because another theme may legitimately serve rawjs/orimages/at runtime.Tests and fixtures
MigrationHandlerProcessTestno longer asserts migration content in.gitignore- the deny list carries none in either state.SutTrait::injectTestingTooling()now also appends a test-only.tooling-sourceexclusion to.gitignore.artifact, mirroring its.dockerignorehandling, so the injected tooling source never enters the deployment artifact..dockerignore/.gitignorediffs collapsed into_baseline, the artifact-carrying scenarios regenerated with the new deny-list content, and the CircleCI scenarios gained.dockerignorediffs from theCI_PROVIDER_GHAfence.Consumer impact
Consumers who added their own un-ignore entries to these files will hit merge conflicts on the next Vortex update and need to translate them into deny form. The container image now includes previously excluded harmless text files (
README.md,docs/,.github/, dockerfiles, lint configs); everything secret-bearing, generated, or heavy remains excluded. New scaffold files introduced by future Drupal core updates become visible untracked files instead of being silently ignored.Before / After