Skip to content

Upgrade install tools strategy #104

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

Merged
merged 2 commits into from
Jul 15, 2025
Merged

Upgrade install tools strategy #104

merged 2 commits into from
Jul 15, 2025

Conversation

salvador-barboza
Copy link
Collaborator

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 15, 2025 19:09
Copy link
Contributor

@Copilot Copilot AI left a 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 simplifies the tool installation strategy by removing manual file operations and version checking logic, delegating these responsibilities to dedicated scripts included in the distribution package.

  • Removes complex version checking and marker file management logic
  • Replaces manual file movement operations with calls to dedicated scripts
  • Simplifies the overall refresh process by using repair.sh and install-tools.sh from the distribution

echo "$RELEASE_ID" | sudo tee "$RELEASE_MARKER_FILE" > /dev/null

echo "Tools installed successfully."
bash spark-sdk-dist/repair.sh
Copy link
Preview

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

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

No error handling for the repair.sh script execution. If this script fails, the installation process will continue silently, potentially leading to an inconsistent state.

Suggested change
bash spark-sdk-dist/repair.sh
bash spark-sdk-dist/repair.sh
if [ $? -ne 0 ]; then
echo "Error: repair.sh script failed. Aborting installation." >&2
exit 1
fi

Copilot uses AI. Check for mistakes.


echo "Tools installed successfully."
bash spark-sdk-dist/repair.sh
LATEST_RELEASE="$LATEST_RELEASE" DIST_DIR="$DIST_DIR" WORKSPACE_DIR=$WORKSPACE_DIR bash spark-sdk-dist/install-tools.sh
Copy link
Preview

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

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

No error handling for the install-tools.sh script execution. If this script fails, the user won't receive clear feedback about the failure.

Suggested change
LATEST_RELEASE="$LATEST_RELEASE" DIST_DIR="$DIST_DIR" WORKSPACE_DIR=$WORKSPACE_DIR bash spark-sdk-dist/install-tools.sh
LATEST_RELEASE="$LATEST_RELEASE" DIST_DIR="$DIST_DIR" WORKSPACE_DIR=$WORKSPACE_DIR bash spark-sdk-dist/install-tools.sh
if [ $? -ne 0 ]; then
echo "Error: install-tools.sh script failed to execute successfully."
echo "Please check the logs above for more details."
rm -rf $TEMP_DIR
exit 1
fi

Copilot uses AI. Check for mistakes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@salvador-barboza salvador-barboza merged commit 70324c8 into main Jul 15, 2025
2 checks passed
@salvador-barboza salvador-barboza deleted the upgrade-tools branch July 15, 2025 21:11
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