Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

What are you trying to accomplish?

Moved docker_compose ecosystem into docker/ directory to eliminate duplicate Dockerfiles and shared code while maintaining both as independent ecosystems. The lib files are now co-located with docker lib files under docker/lib/dependabot/.

Benefits:

  • Shared code in docker/lib/dependabot/shared/ now clearly co-located with both ecosystems
  • Docker and docker_compose lib files at the same level under docker/lib/dependabot/
  • Duplicate Dockerfile logic eliminated (both used nearly identical regctl installation)
  • Related ecosystems grouped together, clarifying docker_compose's dependency on docker
  • Physical structure matches logical dependency

Structure:

docker/
├── lib/dependabot/
│   ├── docker/              # Docker lib files
│   ├── docker_compose/      # Docker Compose lib files
│   ├── shared/              # Shared utilities
│   ├── docker.rb
│   └── docker_compose.rb
├── Dockerfile               # Docker ecosystem
└── docker_compose/
    ├── spec/
    ├── Dockerfile           # Docker Compose ecosystem
    ├── gemspec
    └── script/

Key changes:

  • Lib organization: Moved docker_compose lib files from docker/docker_compose/lib/ to docker/lib/dependabot/docker_compose/ to co-locate with docker lib files
  • Build system: Added get_dockerfile_path() in script/_common to locate docker_compose's Dockerfile; updated volume mounts in bin/docker-dev-shell (removed separate lib mount) and directory validation in bin/test
  • Dependencies: Updated gem paths in root and updater Gemfile/Gemfile.lock; adjusted gemspec to reference ../lib for require_path and files; updated rubocop config paths
  • CI/CD: Updated workflow paths, filter patterns, and labeler rules
  • Config: Updated rakelib gemspec list, sorbet spec ignore patterns, and bin/dry-run.rb LOAD_PATH

No breaking changes:

  • Both remain independent gems with separate CI jobs
  • Container paths unchanged: still /home/dependabot/docker_compose/
  • User commands unchanged: bin/docker-dev-shell docker_compose, bin/test docker_compose

Anything you want to highlight for special attention from reviewers?

The docker_compose lib files are now co-located with docker lib files at docker/lib/dependabot/docker_compose/ rather than being in a separate docker/docker_compose/lib/ directory. The gemspec, spec, Dockerfile, and other config files remain in docker/docker_compose/. This simplifies the build system as docker_compose lib files are now included in the docker/lib mount automatically.

How will you know you've accomplished your goal?

  • ✅ Both ecosystems load correctly with all classes accessible
  • ✅ Shared classes (SharedFileFetcher, SharedFileParser, SharedFileUpdater) accessible from both ecosystems
  • ✅ Docker and docker_compose lib files co-located at docker/lib/dependabot/
  • ✅ All modules and classes load correctly after restructuring
  • CI will validate both ecosystems build and test successfully with new structure

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.
Original prompt

Can we move docker_compose into the docker directory but maintain them as two sperate ecosytems. The goal is to remove the need for duplicated code and dockerfiles making docker and docker_compose more maintainable


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Move docker compose into docker directory for better maintenance Consolidate docker_compose into docker directory Dec 19, 2025
Copilot AI requested a review from robaiken December 19, 2025 14:55
@github-actions github-actions bot added L: docker Docker containers L: docker:compose Docker Compose labels Dec 29, 2025
@robaiken
Copy link
Contributor

@copilot move docker_compose into lib/dependabot

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot move docker_compose into lib/dependabot

Done! Moved docker_compose lib files into docker/lib/dependabot/docker_compose/ in commit 272b2a2.

The lib files are now co-located with docker lib files at the same level:

docker/lib/dependabot/
├── docker/
├── docker_compose/  ← moved here
├── shared/
├── docker.rb
└── docker_compose.rb

The gemspec, spec, and Dockerfile remain in docker/docker_compose/.

@robaiken robaiken marked this pull request as ready for review January 6, 2026 14:23
@robaiken robaiken requested a review from a team as a code owner January 6, 2026 14:23
The build script expects directory names (e.g., go_modules, python) but was
incorrectly receiving suite names (e.g., go_module, python_slow). This caused
failures for go_modules and python_slow tests because:

- go_modules: was building 'go_module' instead of 'go_modules'
- python_slow: was building 'python_slow' instead of 'python'

The fix uses matrix.suite.path as the fallback instead of matrix.suite.name,
while still allowing explicit build: overrides for special cases like
docker_compose.
- name: Build ecosystem image
if: steps.changes.outputs[matrix.suite.path] == 'true'
run: script/build ${{ matrix.suite.path }}
run: script/build ${{ matrix.suite.build || matrix.suite.path }}
Copy link
Contributor

Choose a reason for hiding this comment

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

@robaiken , are this similar things? Is there a reason now we are before trying to capture the build path?

Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid breaking the other filters, adding a new parameter was the simplest approach. While not ideal, refactoring the entire CI matrix would be beyond the scope of this work, especially given that this PR is already quite large.

docker_compose:
- *shared
- 'docker_compose/**'
- 'docker/lib/dependabot/docker_compose/**'
Copy link
Contributor

@kbukum1 kbukum1 Jan 7, 2026

Choose a reason for hiding this comment

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

@robaiken , I think we can add filter like following

  • docker/lib/dependabot/docker_compose/**
  • docker/lib/dependabot/share/**

Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

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

I only left a few comments. It is ready after you confirm comments and let me know if you finalized.

Added additional file patterns for Docker labeler.
kbukum1
kbukum1 previously approved these changes Jan 7, 2026
Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

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

LGTM

kbukum1
kbukum1 previously approved these changes Jan 7, 2026
Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@thavaahariharangit thavaahariharangit left a comment

Choose a reason for hiding this comment

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

LGTM

@robaiken robaiken marked this pull request as draft January 8, 2026 16:02
kbukum1
kbukum1 previously approved these changes Jan 8, 2026
@robaiken robaiken marked this pull request as ready for review January 8, 2026 19:09
@robaiken robaiken marked this pull request as draft January 20, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: docker:compose Docker Compose L: docker Docker containers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants