Skip to content

Fix breaking build changes due to git safety checks.#530

Merged
seanses merged 8 commits intomainfrom
hoytak/251020-fix-git-version-build-break
Oct 20, 2025
Merged

Fix breaking build changes due to git safety checks.#530
seanses merged 8 commits intomainfrom
hoytak/251020-fix-git-version-build-break

Conversation

@hoytak
Copy link
Collaborator

@hoytak hoytak commented Oct 20, 2025

Fix build break due to git safety checks.

The recent logging PR added the automatic logging of the git repository commit hash that was used to build the wheel. However, this requires querying for this hash at build time, which requires running git. It turns out that in the CI, the user checking out the repository and the user building the wheel are different, which makes git upset. This PR adds code to tell git everything will be ok.

@hoytak hoytak requested review from assafvayner and seanses October 20, 2025 13:02
@seanses seanses self-requested a review October 20, 2025 17:55
Copy link
Collaborator

@seanses seanses left a comment

Choose a reason for hiding this comment

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

Turns out it's the user in the docker container is different from the owner of the repo. So the fix is to run git config --global --add safe.directory "*" in the docker container. See successful build: https://github.com/huggingface/xet-core/actions/runs/18661456190

@seanses seanses merged commit 9fde4b7 into main Oct 20, 2025
6 checks passed
@seanses seanses deleted the hoytak/251020-fix-git-version-build-break branch October 20, 2025 18:56
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