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

[crater] Compute and store 'hash' of python packages #1075

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Oct 29, 2024

This is a coarse way of determining whether or not any python packages have been modified, which we can use for invalidating a potential cache.

Also adds a env var to force CI to rerun, which is something I often want during development.

@rsheeter
Copy link
Contributor

Also adds a env var to force CI to rerun, which is something I often want during development.

Google generally favors flags to environment variables. I recommend we do the same.

std::str::from_utf8(sha1sum.stdout.trim_ascii())
.expect("shasum output always ascii")
.to_owned()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't really need a crytographic hash or to spawn although I suppose it's harmless enough

Copy link
Member Author

Choose a reason for hiding this comment

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

this was just the quickest way I could think of to do this in a consistent and portable way. 🤷

This is a coarse way of determining whether or not any python packages
have been modified, which we can use for invalidating a potential cache.

Also adds a env var to force CI to rerun, which is something I often
want during development.
@cmyr cmyr added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 49f16f9 Oct 29, 2024
10 checks passed
@cmyr cmyr deleted the crater-pip-hash branch October 29, 2024 18:37
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