-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(docker): enhance docker project filtering and configuration handling #33288
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
base: master
Are you sure you want to change the base?
Conversation
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hello @emiliosheinz and @Coly010 I just wanted to reach out to you to ask if you were experiencing issues with the new I started using it and I noticed, that for independently released projects it does not work well. Projects that are not affected by new version are trying to be published by the docker plugin, and also non-docker plugins get to inherit dockerOptions field during the release pipeline business logic. I assume this issue was not obvious as before I think PR I made two changes: That should correct the way we choosing projects for docker release/publish process. I would appreciate your feedback as I see you both are using the new plugin. Thank you! |
|
Hey @AndriiTsok thank you for reporting, I'll take a look once I get the chance. |
| // Skip projects that don't have a new version (no changes) | ||
| // This prevents docker tag failures when the version is empty | ||
| const projectVersionData = this.versionData.get(project); | ||
| if (!projectVersionData.newVersion) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this break the current behavior for projects that have skipVersionActions set to true?
|
Hey @AndriiTsok, I'm quite new to the codebase, and the addition of BTW, this is the config I'm planning to apply to my monorepo. From what I have tested so far, it works well. |
|
@AndriiTsok I ended up facing the same issue in my monorepo. What I did:
So far, I'm happy with the results. I hope it helps to unblock you. And please, let me know if you have any questions. |
|
Hi @emiliosheinz, thank you for your feedback! Yes, this is the issue, it is happening when you have more than 1 project in a group/default group and only a few of them are being affected and released. This PR addresses the issue and fixes multiple regression issues that happened during the recent developments in @nx/docker Hopefully @Coly010 or @leosvelperez can take a look at this soon. Because as of now, the docker release flow got broken for multi app projects. As a workaround, for releases, for now, I just triggering global change that affects all projects to bump the version for all apps. |
Current Behavior
When a release group has docker configuration, all projects in that group inherit the docker options, regardless of whether they are actually docker projects. This causes issues when you have mixed release groups containing both npm packages and docker-based applications.
For example, if you have a release group with:
@nx/docker:release-publishexecutor)Currently, the npm packages would incorrectly receive docker configuration and potentially be processed during docker operations, even though they don't have docker capabilities.
Additionally, a regression was observed where projects without any version changes were still being processed for docker publishing, causing tag failures. #33276
Expected Behavior
With this PR, docker options are only applied to projects that meet one of these conditions:
nx-release-publishtarget with the@nx/docker:release-publishexecutorThis ensures that:
The fix includes proper filtering in both the release graph construction and the docker processing pipeline, with test coverage for the described scenarios.
Related Issue(s)
Fixes #33276