Skip to content

Conversation

theihor
Copy link
Contributor

@theihor theihor commented Aug 1, 2025

Subject.branch() returns a branch name constructed from a series id.
Fix a bug in this functions: pick the id of the last (the newest)
relevant_series() and not the first one (the oldest).

This bug was dormant most of the time, because usually there is only
one relevant series for a given subject name. However when there are
more, we got a mismatch between what patches were picked up (the
newest, correctly) and to what series branch they were applied (the
oldest, incorrectly). This caused various issues, for example
NewPRWithNoChangeException on attempt to apply the patches.

Add an integration test with a real example of a series creating this
issue. Fix other tests, that were expecting incorrect behavior.

theihor added 2 commits August 1, 2025 09:11
* remove: "relevant-subjects-20250610.json" as it is just a list of
  other responses
* use: shorter directory name

Signed-off-by: Ihor Solodrai <[email protected]>
Subject.branch() returns a branch name constructed from a series id.
Fix a bug in this functions: pick the id of the last (the newest)
relevant_series() and not the first one (the oldest).

This bug was dormant most of the time, because usually there is only
one relevant series for a given subject name. However when there are
more, we got a mismatch between what patches were picked up (the
newest, correctly) and to what series branch they were applied (the
oldest, incorrectly). This caused various issues, for example
NewPRWithNoChangeException on attempt to apply the patches.

Add an integration test with a real example of a series creating this
issue. Fix other tests, that were expecting incorrect behavior.

Signed-off-by: Ihor Solodrai <[email protected]>
@theihor theihor force-pushed the series-branch-fix branch from 6ec23f8 to 885c8d7 Compare August 1, 2025 16:12
Copy link

@danielocfb danielocfb left a comment

Choose a reason for hiding this comment

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

Didn't look closely at the tests, but fix looks good to me. Thanks for looking at this issue.

@theihor theihor merged commit 88cb274 into main Aug 1, 2025
5 checks passed
@theihor theihor deleted the series-branch-fix branch August 1, 2025 16:57
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