Repository navigation
Guard review actions by state and make revert idempotent - #2653
Merged
Merged
Conversation
…res a DbContext with it
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 #2624
What
Follow-ups from the independent review of #2581 (F-DSK, #2422).
Each review action is taken only from a state the panel offers it in, whatever a post claims:
A post for any other state gets the "moved on" refusal and changes nothing, so a set can't be approved past its checks.
Revert is idempotent. Before opening a revert, the page looks for a revert of this set still in progress (open, checks running, checks failed, awaiting review or approved). If there is one, a second click lands on it.
ChangeSetListQuery.Revertsfilters the list by the set a revert undoes.Two posts at the very same instant can still both open a set. A unique index belongs to the change sets lane, and Allow one revert in progress per published change set #2646 asks for it.
The diff island reads through a scope of its own. The new PostgreSQL review tests exposed it: on PostgreSQL an async read can finish at once, so the set view sometimes renders
ChangeSetItemsbefore its own reads are done. The island's prerendered diff then ran on the same requestDbContextand failed the page with a 500 or a stall. This is the Run the header counts in their own scope so signed-in pages load on PostgreSQL #2642 rule applied to the last component that loads data beside its page. It is also the likely cause of the intermittentSignedInPageTestshang on v2.Tests
ReviewActionTestsruns on SQLite and PostgreSQL.Seenand is refused, leaving the state unchanged:dotnet build -warnaserror, the unit and bUnit suite and the review, list and queue tests on SQLite and PostgreSQL pass locally. No new package and no new project reference.Checklist
v2