Skip to content

fix(release): keep a changelog file shared by a fixed release group staged - #37098

Open
Burzmalian wants to merge 1 commit into
nrwl:masterfrom
Burzmalian:fix/release-shared-changelog-file-staging
Open

Burzmalian wants to merge 1 commit into
nrwl:masterfrom
Burzmalian:fix/release-shared-changelog-file-staging

Conversation

@Burzmalian

Copy link
Copy Markdown
Contributor

Current Behavior

When several projects in a fixed release group resolve to the same changelog file, the file is written and flushed for the first project. Every later project re-writes identical content, and FsTree.write drops the recorded change when the content already matches disk. applyChangesAndExit then finds no changes, logs No changes detected for changelogs, and never runs git add. The release commit lacks the changelog while the remote release is still created from the rendered contents.

Expected Behavior

The shared changelog file is staged and committed with the release. The no-op re-write is skipped so the first project's recorded change survives to the staging step. Adds a unit test that fails on master (gitAdd never called) and passes with the fix.

Related Issue(s)

Fixes #35559

@Burzmalian
Burzmalian requested a review from a team as a code owner September 17, 2026 16:42
@netlify

netlify Bot commented Sep 17, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 96d6288

@netlify

netlify Bot commented Sep 17, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 96d6288

@AgentEnder

Copy link
Copy Markdown
Member

Thanks for the PR. Approving the workflow run so CI can actually build it, and I have picked this one up.

Triage notes (automated triage, reviewed before posting)

The head commit here has no approved workflow run, so no GitHub Actions check runs exist against it. On a fork pull request the run waits for a maintainer to approve it, and until that happens the green tick comes from third-party checks only, so it says nothing about the build. Approved as part of triage.

Closes #35559. Branch merges cleanly.

The rotation offered JamesHenry here. Overridden because this does not turn on release internals nobody else has context on, which is the only case the routing notes reserve for him.

@nx-cloud

nx-cloud Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit d6d1aae

Command Status Duration Result
nx affected --targets=lint,oxlint,test,build,e2... ❌ Failed 52m 22s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 56s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 19s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-20 06:06:53 UTC

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nx Cloud has identified a flaky task in your failed CI:

Since the failure was identified as flaky, the solution is to rerun CI. Because this branch comes from a fork, it is not possible for us to push directly, but you can rerun by pushing an empty commit:

git commit --allow-empty -m "chore: trigger rerun"
git push

Nx Cloud View detailed reasoning in Nx Cloud ↗

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.


🎓 Learn more about Self-Healing CI on nx.dev

…taged

When several projects in a fixed release group resolve to the same
changelog file, the first project's write is flushed to disk right away.
Every later project then re-writes identical content, and FsTree.write
drops the recorded change when the content already matches the file on
disk. By the time applyChangesAndExit runs, tree.listChanges() is empty,
"No changes detected for changelogs" is logged and the file is never
staged, so the release commit lacks the changelog while the remote
release is still created from the rendered contents.

Skip the no-op write so the first project's recorded change survives to
the staging step.
@Burzmalian
Burzmalian force-pushed the fix/release-shared-changelog-file-staging branch from d6d1aae to 96d6288 Compare September 21, 2026 15:55

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nx release: per-group changelog files not staged into release commit when using --groups with fixed projectsRelationship

2 participants