Skip to content

nx release version does not propagate changes to release groups with "projectsRelationship": "independent" #31722

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpsanchis
Copy link
Contributor

@mpsanchis mpsanchis commented Jun 25, 2025

Test that shows the problem mentioned in #31724

@mpsanchis mpsanchis requested a review from a team as a code owner June 25, 2025 10:45
@mpsanchis mpsanchis requested a review from FrozenPandaz June 25, 2025 10:45
Copy link

vercel bot commented Jun 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jun 25, 2025 11:22am

Copy link

nx-cloud bot commented Jun 25, 2025

View your CI Pipeline Execution ↗ for commit df99922.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ❌ Failed 25m 55s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 22s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation ✅ Succeeded <1s View ↗

Nx Cloud AI Fix

Nx Cloud AI analyzes your failing CI tasks and automatically generates fixes whenever possible.

Description Status Link
Fix generation in progress ⏳ Not applied    View ↗  

☁️ Nx Cloud last updated this comment at 2025-06-25 11:31:00 UTC

>;
for (const [, { logs }] of projectLogger) {
const uniqueLogs = new Set(logs);
expect(logs.sort()).toEqual(Array.from(uniqueLogs).sort());
Copy link
Contributor

Choose a reason for hiding this comment

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

The current assertion will always pass when there are duplicates because logs.sort() preserves duplicates while Array.from(uniqueLogs).sort() removes them. For example:

// If logs = ['a', 'a', 'b']
logs.sort() // ['a', 'a', 'b']
Array.from(uniqueLogs).sort() // ['a', 'b']

These arrays would not be equal, but the test would still pass because .toEqual() is comparing the arrays after sorting both sides.

To properly verify there are no duplicates, consider changing to:

expect(logs.length).toEqual(uniqueLogs.size);

This directly checks that the number of log entries equals the number of unique entries.

Suggested change
expect(logs.sort()).toEqual(Array.from(uniqueLogs).sort());
expect(logs.length).toEqual(uniqueLogs.size);

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@mpsanchis mpsanchis force-pushed the failing-tests-nx-release branch from b6e8371 to df99922 Compare June 25, 2025 11:00
@mpsanchis mpsanchis changed the title Failing tests nx release nx release duplicates logs Jun 25, 2025
@mpsanchis mpsanchis changed the title nx release duplicates logs nx release version does not propagate changes to release groups with "projectsRelationship": "independent" Jun 25, 2025
@JamesHenry JamesHenry self-assigned this Jun 25, 2025
@JamesHenry
Copy link
Collaborator

@mpsanchis and I are discussing this, assigned myself

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.

2 participants