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

GH Actions: work around intermittent apt-get errors #2444

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 24, 2024

Okay, so apparently, there is a long-standing bug in the Microsoft package deploy process which caused apt-get update to fail in the first half hour after Microsoft has deployed a package.

The failure looks like this:

E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

As this only happens intermittently (after a MS package deploy), the chance of running into this bug are slim, but guess what: today I ran into it.

This change to the workflow is intended to prevent the next person running into this issue from having to waste time on figuring this out.

By splitting the "Install xmllint" step into two steps: one doing the apt-get update and one doing the actual install and making the first step one which is allowed to continue-on-error, this issue should hopefully not crop up anymore.

Any errors in the apt-get update step will now be ignored and as most errors which could potentially come from that step are irrelevant for the rest of the job anyway, this is fine. If a relevant error would be surfaced, the next step (the xmllint install), will fail the job anyway.

Refs:

Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

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

What would happen if the apt-get update wasn't run? Wouldn't we still get an installable version of xmllint, even if it wasn't the latest?

@jrfnl
Copy link
Member Author

jrfnl commented Apr 24, 2024

What would happen if the apt-get update wasn't run? Wouldn't we still get an installable version of xmllint, even if it wasn't the latest?

This: #2034 (comment) (the apt-get was added to fix another type of build failure we've previously seen)

Okay, so apparently, there is a long-standing bug in the Microsoft package deploy process which caused `apt-get update` to fail in the first half hour after Microsoft has deployed a package.

The failure looks like this:
```
E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
```

As this only happens intermittently (after a MS package deploy), the chance of running into this bug are slim, but guess what: today I ran into it.

This change to the workflow is intended to prevent the next person running into this issue from having to waste time on figuring this out.

By splitting the "Install xmllint" step into two steps: one doing the `apt-get update` and one doing the actual install and making the first step one which is allowed to `continue-on-error`, this issue should hopefully not crop up anymore.

Any errors in the `apt-get update` step will now be ignored and as most errors which could potentially come from that step are irrelevant for the rest of the job anyway, this is fine.
If a relevant error would be surfaced, the next step (the xmllint install), will fail the job anyway.

Refs:
* actions/runner-images#3410
* dotnet/core#4167
@jrfnl jrfnl force-pushed the feature/ghactions-xmllint-bypass-apt-get-update branch from 71536e6 to b4b27c9 Compare April 25, 2024 09:22
@jrfnl
Copy link
Member Author

jrfnl commented Apr 25, 2024

Rebased without changes to get a passing build.

@jrfnl jrfnl merged commit 293afbe into develop Apr 25, 2024
46 checks passed
@jrfnl jrfnl deleted the feature/ghactions-xmllint-bypass-apt-get-update branch April 25, 2024 09:25
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