Skip to content

Element with id Local Pull Request Branches is already registered (#7271)#7281

Merged
alexr00 merged 1 commit intorelease/0.114from
alexr00/careful-tuna
Jul 11, 2025
Merged

Element with id Local Pull Request Branches is already registered (#7271)#7281
alexr00 merged 1 commit intorelease/0.114from
alexr00/careful-tuna

Conversation

@alexr00
Copy link
Member

@alexr00 alexr00 commented Jul 11, 2025

Fixes #7264

@alexr00 alexr00 enabled auto-merge (squash) July 11, 2025 09:00
@alexr00 alexr00 self-assigned this Jul 11, 2025
Copy link
Member Author

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

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

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
  • The user now has these additional two values in their githubPullRequests.queries settings
    {
      "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 the default query values don't have repo:. So those two queries have repo: 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 default queries now don't just have default as their value, they get re-added.
  • 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.

@alexr00
Copy link
Member Author

alexr00 commented Jul 11, 2025

To help understand the problem, you can see the verification steps here: #7264 (comment)

@alexr00 alexr00 merged commit adaa177 into release/0.114 Jul 11, 2025
3 checks passed
@alexr00 alexr00 deleted the alexr00/careful-tuna branch July 11, 2025 16:39
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