pacman-helper: add a command to break a lease #488
Merged
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.
When uploading Pacman packages, we have to take care to stop concurrent uploads from interfering with each other. We do that by acquiring a "lease" to the
git-for-windows.db
file: Once that lease is acquired by one of the uploading workflow runs, it cannot be acquired by another one until the first one is done and releases that lease.I noticed today that the shiny new
pacman-packages
workflow had failed to upload the packages. When I edited the definition and then tried to re-run it, the run failed due to some mistake of mine, leaving the lease acquired. So when I edited the definition again and tried to re-re-run it, it could not continue because the lease was already acquired. Similar things happened in the past, and whenever that happens, I go to the Azure Portal and break the lease.However, today I realized that this is some institutionalized knowledge that is locked in my brain, and prevents the Git for Windows project to become more of a team sport than a project that relies solely on @dscho.
So here is the first step to make the "break the lease" task much more transparent (and implicitly documented), with the eventual goal to wire it through as a new slash command in Git for Windows' PRs handled by the GitForWindowsHelper GitHub App, say,
/break pacman-upload-lease
(which would trigger a to-be-implemented GitHub workflow in https://github.com/git-for-windows/git-for-windows-automation/ that mirrors a Check Run back to the PR where it was triggered).