Skip to content

Checkout the latest version at cron start#2889

Merged
suhaibmujahid merged 2 commits into
mozilla:masterfrom
suhaibmujahid:auto-deploy
May 21, 2026
Merged

Checkout the latest version at cron start#2889
suhaibmujahid merged 2 commits into
mozilla:masterfrom
suhaibmujahid:auto-deploy

Conversation

@suhaibmujahid
Copy link
Copy Markdown
Member

Resolves #2888

Fetch tags and checkout the latest release tag at the top of scripts/cron_common_start.sh. This ensures the cron run uses the latest bugbot release by querying the GitHub Releases API and checking out the returned tag.
Copy link
Copy Markdown

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

Automates cron deployments by making each cron run update the working tree to the latest published mozilla/bugbot GitHub Release, removing the need for manual redeploy steps (per #2888).

Changes:

  • Fetches remote tags at cron start.
  • Resolves the latest GitHub Release tag via the GitHub API and checks out that tag before running the cron workload.
Comments suppressed due to low confidence (3)

scripts/cron_common_start.sh:3

  • The release tag command substitution is unquoted. If the tag contains characters that trigger word-splitting/globbing (or is empty), git checkout can receive the wrong arguments. Assign the tag to a variable and git checkout --detach "$tag" (or git switch --detach) with proper quoting, and validate it’s non-empty.
git fetch --tags && git checkout $(curl -s https://api.github.com/repos/mozilla/bugbot/releases/latest | jq -r '.tag_name')

scripts/cron_common_start.sh:3

  • curl -s hides HTTP/network failures and the GitHub API is subject to rate limiting; this can cause intermittent empty/invalid tag values. Consider using curl -sSf with timeouts/retries and (if available in the cron environment) an authenticated request via Authorization: Bearer $GITHUB_TOKEN to make failures explicit and more reliable.
git fetch --tags && git checkout $(curl -s https://api.github.com/repos/mozilla/bugbot/releases/latest | jq -r '.tag_name')

scripts/cron_common_start.sh:3

  • This introduces a new runtime dependency on jq, but the repo didn’t previously invoke it in any scripts. If the cron host image doesn’t guarantee jq is installed, startup will fail. Either ensure jq is part of the runtime environment or switch to a parser already guaranteed to exist (e.g., Python).
git fetch --tags && git checkout $(curl -s https://api.github.com/repos/mozilla/bugbot/releases/latest | jq -r '.tag_name')

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/cron_common_start.sh Outdated
@suhaibmujahid suhaibmujahid enabled auto-merge (squash) May 21, 2026 00:54
@suhaibmujahid suhaibmujahid merged commit b706804 into mozilla:master May 21, 2026
3 checks passed
@suhaibmujahid suhaibmujahid deleted the auto-deploy branch May 21, 2026 10:14
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.

Automatically deploy new bugbot releases

3 participants