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

CI: set correct working directory for Hypothesis cache #119345

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
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