Skip to content

github: fix caching the docker images #176

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

Merged
merged 1 commit into from
Mar 8, 2025
Merged

Conversation

mkmkme
Copy link
Collaborator

@mkmkme mkmkme commented Feb 26, 2025

This PR supercedes #170 and fixes #140

Pull Request check-list

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

Description of change

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.26%. Comparing base (21f098c) to head (6c97033).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #176   +/-   ##
=======================================
  Coverage   76.25%   76.26%           
=======================================
  Files         130      130           
  Lines       33970    33970           
=======================================
+ Hits        25904    25906    +2     
+ Misses       8066     8064    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mkmkme mkmkme force-pushed the mkmkme/docker-cache-fix branch from 1c44e67 to e8326b5 Compare February 26, 2025 09:52
@mkmkme mkmkme marked this pull request as ready for review February 26, 2025 10:02
@mkmkme mkmkme force-pushed the mkmkme/docker-cache-fix branch from e8326b5 to 7683a03 Compare February 26, 2025 10:06
@mkmkme
Copy link
Collaborator Author

mkmkme commented Feb 26, 2025

Expanded the commit message a bit:

This commit updates the way docker cache is created by including the
current date into the cache key. Now when "save-always" option in
actions/cache is deprecated [1] this seems to be the conventional
way [2] to create the cache.

1: actions/cache#1452
2. https://github.com/actions/cache?tab=readme-ov-file#creating-a-cache-key

Also removed the event_name == 'schedule' check since it doesn't make much sense with the current approach anymore. The cache will be created every day (like it should have been with the original approach). And the old cache will be removed after 7 days of not accessing it according to Github policy: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy

I am especially interested in seeing @smeso review on this PR because you created the original caching approach.

@mkmkme mkmkme force-pushed the mkmkme/docker-cache-fix branch 2 times, most recently from 144c5a2 to 456a5ae Compare March 7, 2025 13:23
This commit updates the way docker cache is created by including the
current date into the cache key. Now when "save-always" option in
actions/cache is deprecated [1] this seems to be the conventional
way [2] to create the cache.

[1] actions/cache#1452
[2] https://github.com/actions/cache?tab=readme-ov-file#creating-a-cache-key

Signed-off-by: Mikhail Koviazin <mikhail.koviazin@aiven.io>
@mkmkme mkmkme force-pushed the mkmkme/docker-cache-fix branch from 456a5ae to 6c97033 Compare March 7, 2025 13:24
@mkmkme mkmkme enabled auto-merge March 7, 2025 13:33
@mkmkme
Copy link
Collaborator Author

mkmkme commented Mar 7, 2025

Hey @bogdanp05 , I've resolved our conversation. Your approach worked, thanks! Please approve if it looks good to you, it'll auto-merge.

@mkmkme mkmkme merged commit ca5c7c5 into main Mar 8, 2025
94 checks passed
@mkmkme mkmkme deleted the mkmkme/docker-cache-fix branch March 8, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker cache not updated
4 participants