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

INVALIDATE_DOCKER_CACHE in Bionic and Focal for the next two months #1067

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Nov 10, 2023

After many problems related to an apt-key failure that has poisoned many of our docker cache, this PR should invalidate docker cache. This PR will help to keep the cache clean for a couple of months to facilitate image rotation.

See #1069

@j-rivero j-rivero changed the title INVALIDATE_DOCKER_CACHE in Bionic for the next two months INVALIDATE_DOCKER_CACHE in Bionic and Focal for the next two months Nov 10, 2023
@scpeters
Copy link
Contributor

# that poisoned a lot of docker cache in different builds and nodes. Force invalidation
# during a couple of month to rotate images
if [[ "${DISTRO}" == 'bionic' || "${DISTRO}" == 'focal' ]] && \
[[ "$(date '+%s')" -lt "$(date -d '+60 days' '+%s')" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

will this always be 60 days in the future instead of 60 days from a fixed date?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just expect to see a specific date like 2023-12-31 or 2024-01-10 or something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

eeeeeeeeeek 😓 do not code late on Fridays. 33e8fe3 sorry for that

@j-rivero
Copy link
Contributor Author

Testing https://build.osrfoundation.org/view/ign-citadel/job/ignition_citadel-install-pkg-bionic-amd64/804/console.

+++ ref_date=2023-11-13
+++ [[ bionic == \b\i\o\n\i\c ]]
++++ date +%s
++++ date -d '2023-11-13+60 days' +%s
+++ [[ 1699890588 -lt 1705017600 ]]
+++ export INVALIDATE_DOCKER_CACHE=true
+++ INVALIDATE_DOCKER_CACHE=true

Seems more reasonable to me. Need to merge so we can test other problems like #1059 .

@j-rivero j-rivero merged commit 6a0cf51 into master Nov 13, 2023
1 check passed
@j-rivero j-rivero deleted the jrivero/force_bionic_invalidation branch November 13, 2023 16:24
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

Successfully merging this pull request may close these issues.

2 participants