Skip to content

[raycicmd] Add fetch_full_history parameter to command steps#458

Merged
andrew-anyscale merged 1 commit intomainfrom
andrew/revup/main/unshallow-command
Mar 16, 2026
Merged

[raycicmd] Add fetch_full_history parameter to command steps#458
andrew-anyscale merged 1 commit intomainfrom
andrew/revup/main/unshallow-command

Conversation

@andrew-anyscale
Copy link
Contributor

@andrew-anyscale andrew-anyscale commented Mar 16, 2026

When fetch_full_history: true is set on a command step in .rayci.yml, the generated Buildkite step gets RAYCI_FETCH_FULL_HISTORY=1 in its env. The pre-command hook on the host reads this and runs git fetch --unshallow before docker starts, so steps that need full git history (e.g. git merge-base) work correctly with shallow clones.

Topic: unshallow-command
Signed-off-by: andrew andrew@anyscale.com

@andrew-anyscale
Copy link
Contributor Author

andrew-anyscale commented Mar 16, 2026

Reviews in this chain:
#458 [raycicmd] Add fetch_full_history parameter to command steps

@andrew-anyscale
Copy link
Contributor Author

andrew-anyscale commented Mar 16, 2026

# head base diff date summary
0 507ab5fb e4664018 diff Mar 16 11:58 AM 3 files changed, 33 insertions(+), 1 deletion(-)
1 0fe8b49c e4664018 diff Mar 16 12:01 PM 0 files changed
2 9eb3e1c7 e4664018 diff Mar 16 12:05 PM 3 files changed, 6 insertions(+), 6 deletions(-)

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the RayCI command step configuration by allowing users to specify whether a shallow Git clone should be unshallowed during the build process. This change addresses issues where certain Git-dependent scripts fail in shallow clone environments by providing a mechanism to ensure a complete Git history is available when needed, thereby improving the reliability of CI checks.

Highlights

  • New unshallow_checkout parameter: Introduced a new unshallow_checkout boolean parameter for command steps in .rayci.yml configurations.
  • Environment variable propagation: When unshallow_checkout: true is set, the RAYCI_UNSHALLOW_CHECKOUT=1 environment variable is added to the generated Buildkite step.
  • Improved Git operations for shallow clones: This environment variable enables the pre-command hook to run git fetch --unshallow, ensuring that tools requiring full Git history (like check-git-clang-format-output.sh) function correctly with shallow clones.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • raycicmd/command_step.go
    • Added logic to propagate the unshallow_checkout parameter as an environment variable RAYCI_UNSHALLOW_CHECKOUT to Buildkite steps.
  • raycicmd/converter_test.go
    • Added a new test case to verify that the unshallow_checkout parameter correctly sets the RAYCI_UNSHALLOW_CHECKOUT environment variable.
    • Refactored an existing error message formatting for improved readability.
  • raycicmd/rayci_pipeline.go
    • Included unshallow_checkout in the list of allowed keys for command steps.
    • Marked unshallow_checkout as a key processed by RayCI.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an unshallow_checkout parameter for command steps. When this parameter is set to true, the RAYCI_UNSHALLOW_CHECKOUT=1 environment variable is added to the step's environment. The implementation correctly updates the allowed and dropped keys for command steps, and a new test case has been added to verify the functionality. The changes are well-implemented and look correct.

@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/unshallow-command branch from 507ab5f to 0fe8b49 Compare March 16, 2026 19:01
When fetch_full_history: true is set on a command step in .rayci.yml, the generated Buildkite step gets RAYCI_FETCH_FULL_HISTORY=1 in its env. The pre-command hook on the host reads this and runs git fetch --unshallow before docker starts, so steps that need full git history (e.g. git merge-base) work correctly with shallow clones.

Topic: unshallow-command
Signed-off-by: andrew <andrew@anyscale.com>
@andrew-anyscale andrew-anyscale changed the title [raycicmd] Add unshallow_checkout parameter to command steps [raycicmd] Add fetch_full_history parameter to command steps Mar 16, 2026
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/unshallow-command branch from 0fe8b49 to 9eb3e1c Compare March 16, 2026 19:05
@andrew-anyscale andrew-anyscale merged commit ce65f90 into main Mar 16, 2026
2 checks passed
@andrew-anyscale andrew-anyscale deleted the andrew/revup/main/unshallow-command branch March 16, 2026 22:18
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