Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip docker compose images with env param #11656

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

robaiken
Copy link
Contributor

@robaiken robaiken commented Feb 21, 2025

What are you trying to accomplish?

Add support for environment variable handling in Docker Compose file parsing. Currently, when Docker Compose files contain environment variables in version/tag specifications (e.g., image: ${DOCKER_IMAGE}), the parser attempts to process these as concrete versions, leading to incorrect dependency tracking.

This change ensures that dependencies with environment variable tags are skipped during parsing, while still properly handling dependencies with concrete version tags. This is important because we cannot meaningfully track or update dependencies where the version is determined at runtime through environment variables.

Thanks to @gmile #390 (comment) for reporting this issue

Anything you want to highlight for special attention from reviewers?

Adding a simple environment variable check in version_from rather than modifying the core parsing logic

How will you know you've accomplished your goal?

Dependencies with environment variable tags are properly skipped

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.

@robaiken robaiken requested a review from a team as a code owner February 21, 2025 15:21
@github-actions github-actions bot added the L: docker:compose Docker Compose label Feb 21, 2025
@robaiken robaiken merged commit 654e465 into main Feb 21, 2025
79 of 80 checks passed
@robaiken robaiken deleted the robaiken/skip-docker-compose-images-with-env-param branch February 21, 2025 15:57
dmitris pushed a commit to dmitris/dependabot-core that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: docker:compose Docker Compose
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants