Skip to content

Support git worktrees in RAPIDS script generation#716

Merged
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
bdice:bdice/worktree-repo-detection
Jun 10, 2026
Merged

Support git worktrees in RAPIDS script generation#716
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
bdice:bdice/worktree-repo-detection

Conversation

@bdice

@bdice bdice commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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

@vyasr vyasr left a comment

Copy link
Copy Markdown
Contributor

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.

@trxcllnt trxcllnt left a comment

Copy link
Copy Markdown
Collaborator

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
@bdice bdice requested a review from trxcllnt June 8, 2026 13:56
@bdice

bdice commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@trxcllnt This should be ready for another look. I'm not sure if it makes sense to consolidate the repo_exists somewhere.

@trxcllnt

trxcllnt commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Yeah it'd be nice to make a little local-repo-clone-exists script or something, but it's not critical.

@bdice

bdice commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot Bot merged commit fdec8f5 into rapidsai:main Jun 10, 2026
298 of 314 checks passed
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