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

Implement retry on checkout for reusable-ubuntu #129241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

diegorusso
Copy link
Contributor

@diegorusso diegorusso commented Jan 23, 2025

There are a few occasions where the checkout on reusable-ubuntu is failing. This happens on Ubuntu arm for free threading builds. Examples:

The retry mechanism should protect us from a failure.

@@ -34,9 +34,12 @@ jobs:
PYTHONSTRICTEXTENSIONBUILD: 1
TERM: linux
steps:
- uses: actions/checkout@v4
- uses: Wandalen/wretry.action@master
Copy link
Member

Choose a reason for hiding this comment

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

Is there a feature request for actions/checkout to retry checkouts?

I'm unsure about using a third party action here, vs e.g. a run: block just using git commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We raised a support ticket with GitHub and a couple of tips have been generated. One of this was to add a retry to the checkout.

image

Funny enough, the retry doesn't exist on the checkout action!

I'm going to raise one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Re: https://github.com/diegorusso/cpython/actions/runs/12948283932/job/36116629838#step:4:157

That's just the third-party linter that complaining about something that either doesn't exist or hasn't been added to the linter's schema.

Please could you rename your branch to 3.14-test-retry so it will trigger some jobs that use actions/checkout?

Copy link
Contributor Author

@diegorusso diegorusso Jan 24, 2025

Choose a reason for hiding this comment

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

Same thing: https://github.com/diegorusso/cpython/actions/runs/12949425398

BTW also the GitHub editor was complaining about the retry.

Screenshot 2025-01-24 at 12 17 09

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, and there it is on test.yml:

Invalid workflow file: .github/workflows/build.yml#L258
The workflow is not valid. In .github/workflows/build.yml (Line: 258, Col: 11): Error from called workflow diegorusso/cpython@6a298de (Line: 40, Col: 7): Unexpected value 'retry'

https://github.com/diegorusso/cpython/actions/runs/12949425427

It does look like actions/checkout does have a non-configurable 3-attempt retry already built-in:

https://github.com/actions/checkout/blob/85e6279cec87321a52edac9c87bce653a07cf6c2/src/retry-helper.ts#L3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think here we are looking at this from the wrong angle. If you see the failures posted initially, they don't fail while checking out the repo.
It is not started at all. After it prints the env variable there is nothing. I have the feeling that there is some infrastructure issue in running that action on a specific node.
Even if we put the retry 100 times, they won't be executed as this fails even before to start the process.

Copy link
Member

@hugovk hugovk Jan 24, 2025

Choose a reason for hiding this comment

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

Yes, that's the impression I get too.

Looking more closely at the raw logs (https://github.com/python/cpython/actions/runs/12934438169/job/36075486419?pr=129232 > ⚙️ > View raw logs), the checkout does actually succeed.

For some reason, the next step just doesn't start.

Comparing with a passing build:

image

(Not shown in the diff, the last line of the failing build is:)

2025-01-23T17:13:58.8145851Z Cleaning up orphan processes

Copy link
Contributor Author

@diegorusso diegorusso Jan 24, 2025

Choose a reason for hiding this comment

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

Oh wow, I didn't remember that we had access to these raw logs. They are useful indeed.
So the retry is pointless because it actually doesn't fail on the checkout.

@hugovk
Copy link
Member

hugovk commented Jan 24, 2025

There are a few occasions where the checkout on reusable-ubuntu is failing. This happens on Ubuntu arm for free threading builds. Examples:

Do you know what the actual error is here? There's not much in the logs.

@diegorusso
Copy link
Contributor Author

There are a few occasions where the checkout on reusable-ubuntu is failing. This happens on Ubuntu arm for free threading builds. Examples:

Do you know what the actual error is here? There's not much in the logs.

Not yet. @ambv has enabled debug information so next time that happens hopefully we will know what is going on.

https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging

@hugovk
Copy link
Member

hugovk commented Jan 28, 2025

@diegorusso
Copy link
Contributor Author

Also reported at https://github.com/community/maintainers/discussions/480#discussioncomment-11982041.

I have a 404 on the link.

@AA-Turner
Copy link
Member

@diegorusso see https://maintainers.github.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants