Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnsures deterministic behavior and avoids race-condition-related test failures when validating missing bundle images by ordering the computed diff set, and updates the related unit test expectation to match the new deterministic ordering. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Sorting and then immediately converting back to a set (
diff = set(sorted(diff))) does not make the error message deterministic, since sets are unordered; if you need stable ordering in the exception text, keepdiffas a list (e.g.,diff = sorted(diff)and interpolate that) instead of converting back to a set. - The updated test expectation reorders elements inside a
set(...), but set literals are inherently order-insensitive, so this change is effectively a no-op for the assertion; consider asserting on a list or the exact error message string if the goal is to verify deterministic ordering.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Sorting and then immediately converting back to a set (`diff = set(sorted(diff))`) does not make the error message deterministic, since sets are unordered; if you need stable ordering in the exception text, keep `diff` as a list (e.g., `diff = sorted(diff)` and interpolate that) instead of converting back to a set.
- The updated test expectation reorders elements inside a `set(...)`, but set literals are inherently order-insensitive, so this change is effectively a no-op for the assertion; consider asserting on a list or the exact error message string if the goal is to verify deterministic ordering.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
f7af642 to
6a17c0d
Compare
Use ordered diff for `get_bundles_latest_version` when raising to avoid race condition failures such as: https://github.com/release-engineering/iib/actions/runs/20110179089/job/57705081674?pr=1276 Signed-off-by: Jonathan Gangi <jgangi@redhat.com>
lipoja
approved these changes
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use ordered diff for
get_bundles_latest_versionwhen raising to avoid race condition failures such as:https://github.com/release-engineering/iib/actions/runs/20110179089/job/57705081674?pr=1276
Summary by Sourcery
Ensure deterministic handling of missing bundle images when resolving latest bundle versions to avoid race-condition-related test failures.
Bug Fixes:
Tests: