Skip to content

Support git worktrees in RAPIDS script generation#716

Open
bdice wants to merge 1 commit into
rapidsai:mainfrom
bdice:bdice/worktree-repo-detection
Open

Support git worktrees in RAPIDS script generation#716
bdice wants to merge 1 commit into
rapidsai:mainfrom
bdice:bdice/worktree-repo-detection

Conversation

@bdice
Copy link
Copy Markdown
Contributor

@bdice bdice commented Jun 5, 2026

Summary

  • Detect checked-out RAPIDS repos with git -C <path> rev-parse --is-inside-work-tree instead of testing for a .git directory
  • Allow RAPIDS build utility scripts to recognize git worktrees, where .git is a file instead of a directory
  • Update the shared clone helper so local worktree origins and existing worktree targets are treated as git repositories
  • Bump rapids-build-utils from 26.8.4 to 26.8.5 and utils from 26.8.1 to 26.8.2

Motivation

This is necessary to support devcontainers that use git worktrees. Worktree checkouts store .git as a file pointing at the real git metadata, so the previous -d <repo>/.git checks treated valid worktree repos as missing. In rapids-generate-scripts, that meant only aggregate/no-op scripts were generated.

Testing

  • bash -n passed for the 10 modified shell scripts
  • git diff --check passed
  • confirmed there are no remaining .git directory predicates in the repo
  • created a temporary git worktree inside the devcontainer and verified the updated clone helper accepts it as a local git repository
  • patched the installed script in an RMM worktree devcontainer and verified rapids-generate-scripts --repo rmm generated build-rmm and test-rmm-python
  • in the RMM worktree devcontainer, build-all -j0 passed
  • in the RMM worktree devcontainer, test-all-python passed: 1780 passed, 6 skipped

@bdice bdice self-assigned this Jun 5, 2026
@bdice bdice marked this pull request as ready for review June 5, 2026 20:53
@bdice bdice requested a review from a team as a code owner June 5, 2026 20:53
@bdice bdice requested review from jameslamb and removed request for a team June 5, 2026 20:53
Copy link
Copy Markdown
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

Seems robust enough for the devcontainers use case.

Copy link
Copy Markdown
Collaborator

@trxcllnt trxcllnt left a comment

Choose a reason for hiding this comment

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

Need to bump the feature version, otherwise looks fine to me. Are there any other places that check for -d .git that also need to be updated?

@bdice bdice force-pushed the bdice/worktree-repo-detection branch from 4c5f416 to c42fa60 Compare June 6, 2026 03:52
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.

3 participants