Skip to content

Ensure Asset public ids are assigned deterministically#9706

Merged
mattcompiles merged 1 commit into
v2from
public-id-dfs
May 8, 2024
Merged

Ensure Asset public ids are assigned deterministically#9706
mattcompiles merged 1 commit into
v2from
public-id-dfs

Conversation

@mattcompiles

Copy link
Copy Markdown
Contributor

↪️ Pull Request

We've been seeing issues internally where public Ids are not deterministic between two builds on the same commit and options. I believe this is related to how we iterate over the nodes array directly to assign the public Ids rather than using a DFS. As Assets are transformed off-thread, it's possible Assets are added to the graph in different order between builds, therefore the node Array is not deterministic.

This PR instead uses a dfs to ensure the nodes are visited in order. In the full Jira AssetGraph I measured a 100ms performance loss using DFS instead which I think is acceptable in this case.

@mattcompiles mattcompiles requested a review from a team May 8, 2024 05:46
@mattcompiles mattcompiles enabled auto-merge May 8, 2024 06:01
@mattcompiles mattcompiles added this pull request to the merge queue May 8, 2024
Merged via the queue into v2 with commit a7b7e8a May 8, 2024
@marcins marcins deleted the public-id-dfs branch May 8, 2024 06:32
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