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

Use ordered set for imports to iterate deterministically when filtering an image #3507

Merged
merged 7 commits into from
Dec 3, 2024

Conversation

doriable
Copy link
Member

@doriable doriable commented Dec 3, 2024

Prior to this change, we used a map to keep track of imports
when filtering an image based on type. This resulted in a bug
where iterating through the imports was non-deterministic, and
resulted in non-deterministic images.
This change uses an ordered set for imports instead of a map.

Fixes #3506

@doriable doriable requested review from mcy and emcfarlane December 3, 2024 00:05
Copy link
Contributor

github-actions bot commented Dec 3, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 3, 2024, 8:33 PM

@doriable
Copy link
Member Author

doriable commented Dec 3, 2024

Tested this change with the repro provided by the user in the issue filed and it works :)

@doriable doriable requested a review from timostamm December 3, 2024 00:05
@doriable doriable merged commit 1729ad3 into main Dec 3, 2024
10 checks passed
@doriable doriable deleted the 3506-deterministic-import-order branch December 3, 2024 20:39
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.

Using the type option results in non-deterministic ordering of file dependencies
2 participants