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

get_githash: fix support for missing git #25473

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

adamjstewart
Copy link
Contributor

When git is not installed, or when building from a source tarball instead of a git checkout, git rev-parse will fail. At least in Python 3.13, this raises a subprocess.CalledProcessError, not OSError. To fix this, I simply copied both error classes like we do above for get_bazel_version, but honestly I'm not even sure if we need this since we could also remove the check=True added by @nitins17 in #24695. I'm open to whichever solution.

Copy link

google-cla bot commented Dec 13, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@adamjstewart
Copy link
Contributor Author

CLA signed, not sure how to update the check

Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Dec 16, 2024
@copybara-service copybara-service bot merged commit 7bbba40 into jax-ml:main Dec 17, 2024
22 of 23 checks passed
@adamjstewart adamjstewart deleted the build/no-git branch December 17, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants