Branch XXXX already exists on stale context is not avoidable
Simon Gibbs
I created a remote branch with GitKraken via JIRA.
Moving commits between branches I end up wanting to replace the remote branch with a new set of commits (this is admittedly a social concern, there is no technical reason this needs doing, one branch name is as good as another).
I remotely delete the branch AWS CodeCommit, close the PR in CodeCommit
Refreshing in JIRA shows the PR disappear.
I now want to create a replacement branch with the same name. I press Create Branch but get the error
Branch XXXX already exists
Branch XXXX was just deleted, the error must be based on a stale copy of the set of branches. Hitting refresh again and trying again doesn't unblock the process. I believe it will eventually clear after several minutes, but that is far too long.
Could a refresh be scheduled asynchronously whenever this error occurs so it doesn't persist as long? That would seem to be a good balance between caching the branch list for performance / scale and UX suffering from stale data.
Nikolay Zaytsev
Hi Simon,
Thanks for the detailed report. When a branch is pushed or deleted in CodeCommit, the repository trigger notifies our app right away, and we re-index the repository in queue order. So an extra refresh scheduled when the error appears would not help: the update is already in the queue, and a second request would wait in the same queue. If the deleted branch stays for several minutes, there are two likely reasons: either the integration is not set up fully (for example, the CodeCommit trigger was not created because the IAM user lacks SNS or trigger permissions), or the indexing queue was busy at that moment. If you share your Jira site URL and how the repository is connected (CodeCommit integration or a single repository by URL), we can check our logs and tell you which one it is.
Best regards,
Nikolai Zaytsev
Git Integration for Jira team, GitKraken