-
Notifications
You must be signed in to change notification settings - Fork 164
chore(BA-2212): Add rover cli installation in install-dev script #5664
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Apollo Rover CLI installation to the development setup script to support Supergraph generation capabilities. The change integrates Rover CLI installation into the existing Backend.AI development environment setup process.
- Adds a new
install_rover_cli()
function that downloads and configures Apollo Rover CLI - Integrates Rover CLI installation into the
configure_backendai()
function - Sets up necessary environment variables and shell configuration for Rover CLI
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
scripts/install-dev.sh
Outdated
} | ||
|
||
install_rover_cli() { | ||
curl -sSL https://rover.apollo.dev/nix/latest | sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downloading and executing a script directly from the internet without verification poses a security risk. Consider adding checksum verification or using a pinned version to ensure the integrity of the downloaded script.
curl -sSL https://rover.apollo.dev/nix/latest | sh | |
# Download the Rover install script and verify its checksum before executing | |
ROVER_INSTALL_URL="https://rover.apollo.dev/nix/latest" | |
ROVER_INSTALL_SCRIPT="/tmp/rover_install.sh" | |
EXPECTED_SHA256="REPLACE_WITH_KNOWN_GOOD_SHA256" | |
curl -sSL "$ROVER_INSTALL_URL" -o "$ROVER_INSTALL_SCRIPT" | |
ACTUAL_SHA256=$(sha256sum "$ROVER_INSTALL_SCRIPT" | awk '{print $1}') | |
if [ "$ACTUAL_SHA256" != "$EXPECTED_SHA256" ]; then | |
echo -e "${RED}ERROR: Checksum verification failed for Rover install script.${WHITE}" | |
echo -e "${YELLOW}Expected: $EXPECTED_SHA256${WHITE}" | |
echo -e "${YELLOW}Actual: $ACTUAL_SHA256${WHITE}" | |
rm -f "$ROVER_INSTALL_SCRIPT" | |
return 1 | |
fi | |
sh "$ROVER_INSTALL_SCRIPT" | |
rm -f "$ROVER_INSTALL_SCRIPT" |
Copilot uses AI. Check for mistakes.
# Install rover cli for Supergraph generation | ||
install_rover_cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation process lacks error handling and user feedback. If the Rover CLI installation fails, the script will continue without indication. Consider adding error checking and using the existing show_info
function to provide user feedback about the installation progress.
Copilot uses AI. Check for mistakes.
resolves #5663 (BA-2213)
Checklist: (if applicable)
ai.backend.test
docs
directory