Added cronjob to fetch for latest release and notify in UI#882
Added cronjob to fetch for latest release and notify in UI#882sarika-pf9 merged 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Other comments (1)
- image_builder/cronjob/version-checker.yaml (83-83) The version comparison logic doesn't account for cases where the current version might be a development version higher than the latest release tag. Consider adding a check for this scenario to avoid downgrade suggestions.
💡 To request another review, post a new comment with "/windsurf-review".
Changelist by BitoThis pull request implements the following key changes.
|
There was a problem hiding this comment.
Code Review Agent Run #0a0b3e
Actionable Suggestions - 1
-
image_builder/cronjob/version-checker.yaml - 1
- Incomplete version comparison logic for downgrades · Line 83-90
Additional Suggestions - 1
-
image_builder/cronjob/version-checker.yaml - 1
-
GitHub API request without authentication · Line 71-76The GitHub API request lacks authentication, which could hit rate limits in production. Consider using a GitHub token for authenticated requests to increase the rate limit.
Code suggestion
@@ -71,6 +71,12 @@ - LATEST_TAG=$(curl -s "https://api.github.com/repos/platform9/vjailbreak/tags" | jq -r '.[0].name') + # Use GitHub token if available, otherwise make unauthenticated request + if [ -n "${GITHUB_TOKEN}" ]; then + echo "Using authenticated GitHub API request" + LATEST_TAG=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/platform9/vjailbreak/tags" | jq -r '.[0].name') + else + echo "Using unauthenticated GitHub API request (rate limited)" + LATEST_TAG=$(curl -s "https://api.github.com/repos/platform9/vjailbreak/tags" | jq -r '.[0].name') + fi
-
Review Details
-
Files reviewed - 3 · Commit Range:
a423d63..43d1a91- Makefile
- image_builder/cronjob/version-checker.yaml
- image_builder/vjailbreak-image.pkr.hcl
-
Files skipped - 1
- .github/workflows/packer.yml - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at mithil@platform9.com.
Documentation & Help
|
Bito Review Skipped - No Changes Detected |
|
Bito Automatic Review Failed - Technical Failure |
What this PR does / why we need it
This job is responsible for automatically checking the official GitHub repository for new releases. If a newer version tag is found, it updates the version-config ConfigMap in the cluster to notify the UI that an upgrade is available.
Which issue(s) this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged)fixes #883
Testing done
Summary by Bito
This pull request implements an automated version-checking mechanism across deployment and build scripts. It adds a new CronJob for scheduled version checks that updates a ConfigMap when new releases are detected, enhances the Makefile with commands to copy the version-checker configuration, and updates packer configuration to include the new file for deployment.