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

Make deps.pex cache repo scoped, so PRs and main commits share deps.pex #197

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

shalabhc
Copy link
Contributor

@shalabhc shalabhc commented Sep 4, 2024

Currently PRs can only reuse deps.pex if PRs do not change the dependencies. When dependencies are changed within a PR, the deps.pex is built every time. This is an optimization to let PRs build new deps.pex only once and then reuse it.

This means the first PR action will rebuild the deps, however all subsequent PRs will be able to reuse the deps. 

If a PR changes deps then it will also get cached. Previous changing deps in a PR would rebuild the deps on each deploy.
Copy link

github-actions bot commented Sep 4, 2024

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
from_gh_action View in Cloud Sep 04, 2024 at 04:34 AM (UTC)

@shalabhc shalabhc changed the title Dont reuse the full deployment deps cache in PRs Make repo cache repo scoped so PRs and main commits share deps.pex Sep 4, 2024
@shalabhc shalabhc requested a review from gibsondan September 4, 2024 15:02
@shalabhc shalabhc changed the title Make repo cache repo scoped so PRs and main commits share deps.pex Make deps.pex cache repo scoped, so PRs and main commits share deps.pex Sep 4, 2024
Copy link
Member

@gibsondan gibsondan left a comment

Choose a reason for hiding this comment

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

should we make this customizable in some way in the action? Do users have some way to manually clear the cache if they want to and they're using the github action, other than modifying the setup.py?

@shalabhc
Copy link
Contributor Author

should we make this customizable in some way in the action? Do users have some way to manually clear the cache if they want to and they're using the github action, other than modifying the setup.py?

Currently there is no way to manually clear the cache but it's possible using the env var in the old github workflow or directly modifying the ci build command in the new workflow.

@shalabhc shalabhc merged commit 1b24b23 into main Sep 10, 2024
7 of 9 checks passed
@shalabhc shalabhc deleted the shalabhc/dont-share-deps-cache branch September 10, 2024 04:00
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