Element with id Local Pull Request Branches is already registered (#7271)#7281
Merged
alexr00 merged 1 commit intorelease/0.114from Jul 11, 2025
Merged
Element with id Local Pull Request Branches is already registered (#7271)#7281alexr00 merged 1 commit intorelease/0.114from
alexr00 merged 1 commit intorelease/0.114from
Conversation
alexr00
commented
Jul 11, 2025
Member
Author
There was a problem hiding this comment.
The bug occurs when the following series of events happens:
- User has at least 2 machines and settings sync is on
- User updates GHPR to the May release on one machine
- 2 settings migrations happen to
githubPullRequests.queries, in this order:- existing queries that don't specify a
repo:have that added - The
default"Local PRs" and "All Open" queries are added
- existing queries that don't specify a
- The user now has these additional two values in their
githubPullRequests.queriessettings
{
"label": "Local Pull Request Branches",
"query": "default"
},
{
"label": "All Open",
"query": "default"
}
- On the second machine, settings sync kicks in, and syncs down those new settings values
- On the second machine, the users updates GHPR to the May release
- The same migration happens, but there's a flaw
- existing queries that don't specify a
repo:have that added. THIS IS A PROBLEM because thedefaultquery values don't haverepo:. So those two queries haverepo:added. This is already not great, as those queries won't work properly now. - the second migration kicks in to add the default queries. Because the two
defaultqueries now don't just havedefaultas their value, they get re-added.
- existing queries that don't specify a
- Now the user has two duplicate query labels in
githubPullRequests.queries.
The fix: in the first migration, don't add repo: to the two default queries.
Member
Author
|
To help understand the problem, you can see the verification steps here: #7264 (comment) |
joshspicer
approved these changes
Jul 11, 2025
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.
Fixes #7264