Skip to content

Update dockerfile to import helpers from ecosystem images#14191

Closed
AbhishekBhaskar wants to merge 1 commit intomainfrom
abhishekbhaskar/docker-import-files
Closed

Update dockerfile to import helpers from ecosystem images#14191
AbhishekBhaskar wants to merge 1 commit intomainfrom
abhishekbhaskar/docker-import-files

Conversation

@AbhishekBhaskar
Copy link
Contributor

What are you trying to accomplish?

This PR uses Docker's multi-stage build feature to import from already-built ecosystem images instead of duplicating the setup code. This enables us to reference the pre-built ecosystem images like ghcr.io/dependabot/dependabot-updater-go_modules and copy the necessary files/directories from them.

Anything you want to highlight for special attention from reviewers?

Docker's multi-stage build feature allows you to use COPY --from= with:

  • Named stages from the same Dockerfile
  • External images (like ghcr.io/dependabot/dependabot-updater-go_modules)
    Note: For this to work, the ecosystem images (ghcr.io/dependabot/dependabot-updater-go_modules and ghcr.io/dependabot/dependabot-updater-bundler) must be built first, so there's a build order dependency.

How will you know you've accomplished your goal?

If pre-commit's additional_dependencies support works fine.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@AbhishekBhaskar AbhishekBhaskar self-assigned this Feb 16, 2026
@AbhishekBhaskar AbhishekBhaskar requested a review from a team as a code owner February 16, 2026 04:39
@github-actions github-actions bot added L: ruby:bundler RubyGems via bundler L: go:modules Golang modules L: rust:cargo Rust crates via cargo L: javascript labels Feb 16, 2026
Base automatically changed from pre-commit-ecosystem to main February 18, 2026 18:39
Copilot AI review requested due to automatic review settings February 19, 2026 21:44
@AbhishekBhaskar AbhishekBhaskar force-pushed the abhishekbhaskar/docker-import-files branch from cb090a8 to 0708d13 Compare February 19, 2026 21:44
@AbhishekBhaskar AbhishekBhaskar requested a review from a team as a code owner February 19, 2026 21:44
@github-actions github-actions bot added L: java:gradle Maven packages via Gradle L: git:submodules Git submodules L: docker Docker containers L: dotnet:nuget NuGet packages via nuget or dotnet L: java:maven Maven packages via Maven labels Feb 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR uses Docker multi-stage builds to import helpers from pre-built ecosystem images rather than duplicating setup code. However, the PR contains numerous unrelated changes that should have been in separate PRs, including:

  • Version downgrades from 0.362.0 to 0.361.1 across all gems
  • Removal of pnpm trust downgrade handling
  • Removal of NuGet wildcard version support
  • Simplification of Maven property resolution
  • Major refactoring of git_submodules versioning logic
  • Removal of directory-aware PR comparison logic
  • Deletion of test coverage and extensive code quality documentation
  • Significant changes to error messages and test helpers

Changes:

  • Docker multi-stage builds for pre_commit ecosystem using go_modules and bundler base images
  • Version rollback from 0.362.0 to 0.361.1 for all Dependabot gems
  • Removal of multiple features: pnpm trust downgrade handling, NuGet wildcard versions, Maven nested property resolution, directory-aware PR matching
  • Deletion of ~500 lines of test coverage and instruction documentation files
  • Major refactoring of git_submodules package versioning approach

Reviewed changes

Copilot reviewed 56 out of 58 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pre_commit/Dockerfile Multi-stage build importing from go_modules and bundler images
updater/lib/dependabot/setup.rb Removed pre_commit require statement
script/dependabot Added pre_commit volume mount
go_modules/Dockerfile, npm_and_yarn/Dockerfile, cargo/Dockerfile, bundler/Dockerfile Added ARG for parameterized base image
Gemfile.lock, updater/Gemfile.lock Version downgrade from 0.362.0 to 0.361.1
pre_commit/lib/dependabot/pre_commit/metadata_finder.rb Gutted implementation, changed to placeholder
pre_commit/spec/dependabot/pre_commit/metadata_finder_spec.rb Removed all tests
updater/lib/dependabot/updater/group_update_creation.rb Removed directory-aware PR matching logic
updater/lib/dependabot/dependency_change_builder.rb Simplified error messages
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/version_resolver.rb Removed pnpm trust downgrade fallback
nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/FileWriters/XmlFileWriter.cs Removed wildcard version preservation
maven/lib/dependabot/maven/file_parser/property_value_finder.rb Removed nested property resolution
gradle/* Added experiment flags for gradle_wrapper_updater
git_submodules/* Major refactoring of versioning approach
common/lib/dependabot/workspace/git.rb Changed error capture logic
.github/instructions/*.instructions.md Deleted all instruction files
.github/copilot-instructions.md Consolidated all instructions into single file

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

Labels

L: docker Docker containers L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules L: go:modules Golang modules L: java:gradle Maven packages via Gradle L: java:maven Maven packages via Maven L: javascript L: ruby:bundler RubyGems via bundler L: rust:cargo Rust crates via cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments