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

fix(core): ensure project order in graph is deterministic #19968

Conversation

AgentEnder
Copy link
Member

Current Behavior

The hash of the project configuration can change every run when using implicit dependencies configurations that contain glob patterns.

Expected Behavior

The project configuration hash is stable when the implicit dependencies have not changed. This is a pretty major issue, and a better fix would likely be to figure out why the order isn't deterministic to begin with, but it would be a larger PR and isn't obvious after looking over the code for a bit. I think the glob results are being processed in a different order when creating the graph nodes, and thats a lot harder to fix than just sorting the normalized array when we hash tasks.

Related Issue(s)

Fixes #19820

@AgentEnder AgentEnder requested a review from a team as a code owner November 1, 2023 00:48
@AgentEnder AgentEnder requested a review from JamesHenry November 1, 2023 00:48
Copy link

vercel bot commented Nov 1, 2023

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2023 5:04pm

@AgentEnder AgentEnder requested review from FrozenPandaz and removed request for JamesHenry November 1, 2023 00:48
@AgentEnder AgentEnder force-pushed the fix/sort-implicit-dependencies-before-hashing branch from 8e6239c to a50d6f0 Compare November 1, 2023 14:22
@AgentEnder AgentEnder force-pushed the fix/sort-implicit-dependencies-before-hashing branch from a50d6f0 to 9061a9d Compare November 1, 2023 17:04
@AgentEnder AgentEnder enabled auto-merge (squash) November 1, 2023 17:07
@AgentEnder AgentEnder disabled auto-merge November 1, 2023 17:08
@AgentEnder AgentEnder changed the title fix(core): sort implicit dependencies before hashing fix(core): ensure project order in graph is deterministic Nov 1, 2023
@AgentEnder AgentEnder enabled auto-merge (squash) November 1, 2023 17:08
@AgentEnder AgentEnder merged commit c83afeb into nrwl:master Nov 1, 2023
2 checks passed
FrozenPandaz pushed a commit that referenced this pull request Nov 2, 2023
Copy link

github-actions bot commented Nov 7, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order of implicit dependencies using wildcard is non deterministic
2 participants