Skip to content

Added cronjob to fetch for latest release and notify in UI#882

Merged
sarika-pf9 merged 7 commits intomainfrom
private/main/cron-for-upgrade
Sep 9, 2025
Merged

Added cronjob to fetch for latest release and notify in UI#882
sarika-pf9 merged 7 commits intomainfrom
private/main/cron-for-upgrade

Conversation

@sarika-pf9
Copy link
Copy Markdown
Collaborator

@sarika-pf9 sarika-pf9 commented Sep 8, 2025

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

image image image

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.

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot Bot left a comment

Choose a reason for hiding this comment

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

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".

Comment thread image_builder/cronjob/version-checker.yaml
Comment thread image_builder/cronjob/version-checker.yaml
Comment thread image_builder/cronjob/version-checker.yaml
@bito-code-review
Copy link
Copy Markdown
Contributor

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Other Improvements - Deployment Script Update

Makefile - Enhanced deployment commands by adding a new copy command for the version-checker YAML and minor adjustment to the run-local command.

New Feature - Version Checker Cronjob Addition

version-checker.yaml - Introduced a new CronJob configuration along with associated RBAC settings to automate version checking and update notifications.

Feature Improvement - Provisioner Enhancement

vjailbreak-image.pkr.hcl - Updated packer configuration by adding a provisioner block for transferring the new version-checker file and adjusting file move commands.

Copy link
Copy Markdown
Contributor

@bito-code-review bito-code-review 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 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-76
      The 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

AI Code Review powered by Bito Logo

Comment thread image_builder/cronjob/version-checker.yaml
@sarika-pf9 sarika-pf9 requested a review from geet-pf9 September 8, 2025 12:01
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Sep 8, 2025

Bito Review Skipped - No Changes Detected

Bito didn't review this pull request because we did not detect any changes in the pull request to review.

Comment thread image_builder/cronjob/version-checker.yaml Outdated
Copy link
Copy Markdown
Collaborator

@OmkarDeshpande7 OmkarDeshpande7 left a comment

Choose a reason for hiding this comment

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

LGTM

@sarika-pf9 sarika-pf9 merged commit 5b71ff8 into main Sep 9, 2025
12 checks passed
@sarika-pf9 sarika-pf9 deleted the private/main/cron-for-upgrade branch September 9, 2025 09:26
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Sep 9, 2025

Bito Automatic Review Failed - Technical Failure

Bito encountered technical difficulties while generating code feedback . To retry, type /review in a comment and save. If the issue persists, contact support@bito.ai and provide the following details:

Agent Run ID: f3881b39-b14b-40e8-af89-c36614478cfb

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.

UI doesn't detects if there's a new release

2 participants