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

Fix cache restoration for Hypothesis CI job #121756

Merged

Conversation

webknjaz
Copy link
Contributor

Previously, the CI workflow job running Hypothesis was mistakenly set up to use a cache restoration key prefixed with a leading hyphen [1]. This was done in an attempt to figure out the right format for the actions/cache input argument called restore-keys as the official examples tend to be confusing [2].

This results no cache being found for the Hypothesis database on lookup [3] and the logs contain the following:

Cache not found for input keys: hypothesis-database-9927179210, - hypothesis-database-

The patch corrects that by dropping the unintended characters from the catch-all cache key.

Previously, the CI workflow job running Hypothesis was mistakenly set
up to use a cache restoration key prefixed with a leading
hyphen [[1]]. This was done in an attempt to figure out the right
format for the `actions/cache` input argument called `restore-keys`
as the official examples tend to be confusing [[2]].

This results no cache being found for the Hypothesis database on
lookup [[3]] and the logs contain the following:

    Cache not found for input keys: hypothesis-database-9927179210, - hypothesis-database-

The patch corrects that by dropping the unintended characters from the
catch-all cache key.

[1]: python@ccbb010#r1677102123
[2]: actions/cache#1173
[3]: https://github.com/python/cpython/actions/runs/9927179210/job/27421821417#step:21:24
@webknjaz
Copy link
Contributor Author

Here's the proof from this PR's CI run that cache restoration works now, with the patch applied:

Cache Size: ~0 MB (22203 B)
/usr/bin/tar -xf /home/runner/work/_temp/49dc92bc-12d7-4daa-afbd-fb3faf161361/cache.tzst -P -C /home/runner/work/cpython/cpython --use-compress-program unzstd
Cache restored successfully
Cache restored from key: hypothesis-database-9927179210

(https://github.com/python/cpython/actions/runs/9927318541/job/27422127017?pr=121756#step:21:27)

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thank you!

@hugovk hugovk changed the title 🧪🚑 Fix cache restoration @ Hypothesis CI job Fix cache restoration for Hypothesis CI job Jul 14, 2024
@hugovk hugovk merged commit 6505bda into python:main Jul 14, 2024
41 checks passed
@miss-islington-app
Copy link

Thanks @webknjaz for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 14, 2024
(cherry picked from commit 6505bda)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 14, 2024

GH-121759 is a backport of this pull request to the 3.13 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 14, 2024
(cherry picked from commit 6505bda)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 14, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jul 14, 2024

GH-121760 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jul 14, 2024
hugovk pushed a commit that referenced this pull request Jul 14, 2024
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
hugovk pushed a commit that referenced this pull request Jul 14, 2024
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
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.

2 participants