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

Thoughts on caching apt update? #121

Open
cha0s opened this issue Feb 12, 2024 · 3 comments
Open

Thoughts on caching apt update? #121

cha0s opened this issue Feb 12, 2024 · 3 comments

Comments

@cha0s
Copy link

cha0s commented Feb 12, 2024

It's cool to cache the packages, but it's a little less cool to have to update the packages every time first if they aren't already in the image.

What are your thoughts on the value and/or feasibility of caching the result of apt update?

@awalsh128
Copy link
Owner

How would this be different than the current approach? Do you mean also caching the APT database?

@cha0s
Copy link
Author

cha0s commented Feb 13, 2024

I have the same requirements as: https://stackoverflow.com/questions/58134793/error-while-loading-shared-libraries-libnss3-so-while-running-gtlab-ci-job-to

Without first running:

sudo apt-get update

the following error occurs:

| 06:39:58.927 resolving package versions...
| 06:39:58.958 resolved
| 06:39:58.959 Package 'libgconf-2-4' not found.
| 06:39:58.961 Package 'libatk1.0-0' not found.
| 06:39:58.962 Package 'libatk-bridge2.0-0' not found.
| 06:39:58.963 Package 'libgtk-3-0' not found.
| 06:39:58.965 Package 'libgbm-dev' not found.
| 06:39:58.966 Package 'libnss3-dev' not found.
| 06:39:58.967 Package 'libxss-dev' not found.
| 06:39:58.969 Package 'libasound2' not found.
[CI/ci]   ❌  Failure - Main ${GITHUB_ACTION_PATH}/pre_cache_action.sh \
  ~/cache-apt-pkgs \
  "$VERSION" \
  "$EXEC_INSTALL_SCRIPTS" \
  "$DEBUG" \
  "$PACKAGES"
echo "CACHE_KEY=$(cat ~/cache-apt-pkgs/cache_key.md5)" >> $GITHUB_ENV
[CI/ci] exitcode '5': failure

I'm not sure if I mean caching the apt database! Maybe?

@cha0s
Copy link
Author

cha0s commented Feb 13, 2024

Would it be possible to skip apt-cache if there's a cache hit?

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

No branches or pull requests

2 participants