Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a workflow to break a pacman upload lease #86

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

rimrul
Copy link
Member

@rimrul rimrul commented Jul 4, 2024

This fixes #40

@rimrul rimrul requested a review from dscho July 4, 2024 16:52
@rimrul
Copy link
Member Author

rimrul commented Jul 4, 2024

This could probably almost run on ubuntu-latest runner, but we use cygpath in these scripts.

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

I just have one question regarding the need to set up a minimal Git for Windows SDK. It's a minor concern, though, I'd be fine with merging as-is.

Comment on lines 11 to 14
- uses: git-for-windows/setup-git-for-windows-sdk@v1
with:
flavor: minimal
architecture: x86_64
Copy link
Member

Choose a reason for hiding this comment

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

Do we even need the minimal SDK? As far as I can tell, pacman-helper.sh break_lock simply hands off to wingit-snapshost-helper.sh, which calls curl. GitHub workflows' bash steps use Git for Windows' Bash (!!!), which is distributed with a working curl, so it should work out of the box.

Copy link
Member Author

@rimrul rimrul Jul 4, 2024

Choose a reason for hiding this comment

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

We also use date, xxd, tr, sed, base64, cygpath and openssl, but that should work.

@dscho
Copy link
Member

dscho commented Jul 4, 2024

This could probably almost run on ubuntu-latest runner, but we use cygpath in these scripts.

We may want to change those scripts so that they use cygpath only if uname -s returns MSYS or a string that starts with MINGW, otherwise use realpath instead.

That way, we can use them also in ubuntu-latest, which starts up (and runs) a lot quicker than windows-latest.

@dscho
Copy link
Member

dscho commented Jul 4, 2024

@rimrul I opened git-for-windows/build-extra#566 (ran it in Linux to verify that it works; It said "409 There is currently no lease on the blob." of course 😁); How do you feel about merging that first and then switching this here GitHub workflow to ubuntu-latest?

To prevent parallel uploads of pacman packages from interfering with
each other Git for Windows uses Azure blobs leases without a timeout.
Sometimes it's necessary to manually break such a lease if a job
acquired a lease and failed to release it. We can do that via the
pacman-helper script[1], but having it available as a GitHub
workflow or eventually a slash command makes this easier to dispatch.

This fixes git-for-windows#40

[1] git-for-windows/build-extra#488

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Yeah!

@dscho dscho merged commit 51ebcc1 into git-for-windows:main Jul 4, 2024
@rimrul rimrul deleted the break-lease branch July 4, 2024 20:24
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.

Add a workflow to run `pacman-helper break-lease
2 participants