Skip to content

Commit f60ed12

Browse files
committed
GH Actions: work around intermittent apt-get errors
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
1 parent 7d3768c commit f60ed12

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/basics.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ jobs:
3333
coverage: none
3434
tools: cs2pr
3535

36+
# Updating the lists can fail intermittently, typically after Microsoft has released a new package.
37+
# This should not be blocking for this job, so ignore any errors from this step.
38+
# Ref: https://github.com/dotnet/core/issues/4167
39+
- name: Update the available packages list
40+
continue-on-error: true
41+
run: sudo apt-get update
42+
3643
- name: Install xmllint
37-
run: |
38-
sudo apt-get update
39-
sudo apt-get install --no-install-recommends -y libxml2-utils
44+
run: sudo apt-get install --no-install-recommends -y libxml2-utils
4045

4146
# Show XML violations inline in the file diff.
4247
# @link https://github.com/marketplace/actions/xmllint-problem-matcher

0 commit comments

Comments
 (0)