Skip to content

Conversation

@AndriiTsok
Copy link

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:

  • Docker applications (with @nx/docker:release-publish executor)
  • Regular npm packages

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:

  1. The project has explicit project-level docker configuration, OR
  2. The project has the nx-release-publish target with the @nx/docker:release-publish executor

This ensures that:

  • Only actual docker projects get docker configuration
  • Docker processing skips projects without docker targets
  • Docker processing skips projects with no version changes (preventing tag failures)
  • Mixed release groups (npm + docker) work correctly

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

@AndriiTsok AndriiTsok requested a review from a team as a code owner October 29, 2025 04:32
@netlify
Copy link

netlify bot commented Oct 29, 2025

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4f988b2

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Oct 29, 2025 4:38am

@AndriiTsok
Copy link
Author

Hello @emiliosheinz and @Coly010 I just wanted to reach out to you to ask if you were experiencing issues with the new {versionActionsVersion} #33178

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 {versionActionsVersion} the plugin would just get date and commit has - and would never fail to get a new version.

I think PR I made two changes:

https://github.com/nrwl/nx/pull/33288/files#diff-0592620b916195adeff99ea1151ecca4658d17269242f5a747fb77ccb4526c13R823

https://github.com/nrwl/nx/pull/33288/files#diff-6a6abc890ab87dd0da1d18eeed93c2c28591f6bbc9a7ffddee082704df2caaf4R269-R290

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!

@emiliosheinz
Copy link
Contributor

Hey @AndriiTsok thank you for reporting, I'll take a look once I get the chance.

Comment on lines +284 to +289
// 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;
}
Copy link
Contributor

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?

@emiliosheinz
Copy link
Contributor

Hey @AndriiTsok, I'm quite new to the codebase, and the addition of {versionActionsVersion} was my first contribution. I took a look at your code and the related issues, and from my perspective, I don't quite understand the relation between what you are describing with the newly introduced version scheme. I'll let @Coly010 take a look and share his thoughts.

BTW, this is the config I'm planning to apply to my monorepo. From what I have tested so far, it works well.

@emiliosheinz
Copy link
Contributor

@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.

@AndriiTsok
Copy link
Author

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nx Release - Affected Logic

2 participants