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

update CI workflows to run 'apt-get update' if installation of packages via 'apt-get install' failed, likely due to stale apt cache #4176

Merged
merged 3 commits into from
Jan 10, 2023

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jan 9, 2023

Sometimes we need to update the APT cache before installing to avoid:

E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/d/dh-autoreconf/dh-autoreconf_17_all.deb  503  Service Unavailable [IP: 52.252.75.106 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Need to update the APT cache before installing to avoid:

    E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/d/dh-autoreconf/dh-autoreconf_17_all.deb  503  Service Unavailable [IP: 52.252.75.106 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Unify the handling of "sudo apt[-get] install" to install all packages
at once and retry if that failed after updating the cache.
@Flamefire Flamefire changed the title Fix container CI tests Fix GHA CI due to stale APT cache Jan 10, 2023
@jfgrimm
Copy link
Member

jfgrimm commented Jan 10, 2023

@Flamefire is there a reason you're reverting the switch from apt-get to apt (PR #4064)?

@Flamefire
Copy link
Contributor Author

@Flamefire is there a reason you're reverting the switch from apt-get to apt (PR #4064)?

Using apt doesn't seem to be what you should be doing: It prints something like "unstable CLI, don't use in scripts" or so. At the least it is noise in the CI logs hence the switch

@boegel
Copy link
Member

boegel commented Jan 10, 2023

@Flamefire is there a reason you're reverting the switch from apt-get to apt (PR #4064)?

Using apt doesn't seem to be what you should be doing: It prints something like "unstable CLI, don't use in scripts" or so. At the least it is noise in the CI logs hence the switch

At some point we were probably running with Ubuntu 22.04 (because we were using ubuntu-latest), where apt does make sense, but not anymore since #4064 (we probably overlooked the "unstable CLI" messages when doing that)

@boegel boegel changed the title Fix GHA CI due to stale APT cache update CI workflows to run 'apt-get update' if installation of packages via 'apt-get install' failed, likely due to stale apt cache Jan 10, 2023
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

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