Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI: set correct working directory for Hypothesis cache #119345

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
May 29, 2024

Conversation

Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented May 21, 2024

I noticed when pairing with @encukou that this cache logic never found any files to upload (nor restore).

This isn't a huge problem, but ensuring that we replay any known failing examples on your branch is a nicer developer experience, made possible by persisting the cache between runs.

encukou
encukou previously approved these changes May 22, 2024
@encukou encukou enabled auto-merge (squash) May 22, 2024 14:30
auto-merge was automatically disabled May 22, 2024 16:33

Head branch was pushed to by a user without write access

@Zac-HD Zac-HD force-pushed the zac/fix-hypothesis-ci-caching branch from 791c418 to 219de60 Compare May 22, 2024 16:33
@Zac-HD Zac-HD marked this pull request as draft May 22, 2024 16:54
@Zac-HD
Copy link
Contributor Author

Zac-HD commented May 22, 2024

Marking as draft; I'll mark ready-for-review once I see a build which successfully uploaded the cache and artifact.

@encukou
Copy link
Member

encukou commented May 22, 2024

GitHub might be using the main branch's actions rather than those from this PR.
One workaround is to enable actions on your fork, and open a PR against that.

@Zac-HD Zac-HD force-pushed the zac/fix-hypothesis-ci-caching branch from 219de60 to 3a51825 Compare May 23, 2024 18:56
@encukou encukou dismissed their stale review May 23, 2024 19:23

Experiments are going on

@Zac-HD Zac-HD force-pushed the zac/fix-hypothesis-ci-caching branch from 083f0eb to dbfb2e6 Compare May 26, 2024 22:24
@Zac-HD Zac-HD marked this pull request as ready for review May 26, 2024 22:33
@Zac-HD
Copy link
Contributor Author

Zac-HD commented May 26, 2024

@encukou got it! The problem was that Regrtest switches to a tempdir, so I also needed to configure Hypothesis to use the original working dir for the database. With that in place, the cache is working and the artifact upload is (correctly) skipped when no tests failed.

@encukou
Copy link
Member

encukou commented May 29, 2024

Thanks!

@encukou encukou merged commit 055c739 into python:main May 29, 2024
34 checks passed
@Zac-HD Zac-HD deleted the zac/fix-hypothesis-ci-caching branch May 29, 2024 15:57
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@sobolevn sobolevn added the needs backport to 3.13 bugs and security fixes label Apr 10, 2025
@miss-islington-app
Copy link

Thanks @Zac-HD for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 10, 2025
Set cwd for Hypothesis database
(cherry picked from commit 055c739)

Co-authored-by: Zac Hatfield-Dodds <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Apr 10, 2025

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

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 10, 2025
@sobolevn
Copy link
Member

See #132348 on why we backport this.

sobolevn pushed a commit that referenced this pull request Apr 10, 2025
) (#132364)

CI: set correct working directory for Hypothesis cache (GH-119345)

Set cwd for Hypothesis database
(cherry picked from commit 055c739)

Co-authored-by: Zac Hatfield-Dodds <[email protected]>
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