Repository navigation
Reject an approved change set and publish items in a stable order - #2637
Merged
Merged
Conversation
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.
Closes #2616
What
A follow-up of F-CHG (#2418), from the post-merge review of publish (#2482) and revert (#2511).
ChangeSetTransitions): the table gains approved → rejected.AgentPermissions.SystemMoves(ADR-0012).base_version_stale.40P01) or serialization failure (40001) during a publish, or at the commit of any change set write, is answered withchange_set_conflictinstead of an exception, as a unique violation already is (DatabaseErrors.IsConcurrencyFailure).Why
An approved set whose publish has gone stale could never leave approved. For example, two reverts of one set are both approved and the first publishes. The second then sat approved forever, and its entries stayed in review. Rebasing a stale set is out of scope: a person rejects it and the author opens a new set.
Publish moved items in the order the set lists them. On PostgreSQL, two sets that list the same items in opposite orders deadlocked, and one call threw.
Choices worth a look:
40P01: deadlock detected, and with both back it passes.Tests
Unit:
Rejectfrom approved succeeds with a reason, and stays refused where the table has no rejection.Integration, each on SQLite and PostgreSQL:
base_version_stale, and its entry stays in review. A blank reason is refused. With a reason, R2 is rejected, the entry leaves review, and the original set stays reverted once.base_version_stale, and neither call throws.dotnet build -warnaserrorand the full suite pass locally on SQLite and against apostgres:17container. No new package and no new project reference.Checklist
v2