Migrate emergency-rollback job to have optional github actions route#395
Open
jaredly wants to merge 4 commits into
Open
Migrate emergency-rollback job to have optional github actions route#395jaredly wants to merge 4 commits into
jaredly wants to merge 4 commits into
Conversation
…ions bridge Summary: - Adds an opt-in `USE_GITHUB_BRIDGE` path to `merge-branches.groovy`, preserving the existing Jenkins merge behavior as the default. - Adds a `merge-branches` GitHub Actions workflow in `webapp` plus a Python merge script that preserves Jenkins merge semantics. - Keeps Slack and Buildmaster notification ownership in Jenkins during bridge mode by downloading a workflow result artifact and calling `buildmaster.notifyMergeResult(...)` from Jenkins. - Extends `runGithubAction` with `dispatchAndWait(...)` so callers can get the completed Actions run id. Test Plan: - `python3 -m unittest deploy.merge_branches_test` - `python3 -m py_compile deploy/merge_branches.py deploy/merge_branches_test.py` - `actionlint .github/workflows/merge-branches.yml` - `git diff --check` - Local Groovy parse check for changed Jenkins scripts, with Jenkins `@Library` stripped for local parsing.
following https://khanacademy.atlassian.net/wiki/spaces/INFRA/pages/4712169576/Webapp+Deploys+Jenkins+-+GitHub+Project+Plan Issue: https://khanacademy.atlassian.net/browse/INFRA-10996 Test plan: 🤞 the workflow has a boolean that will allow us to test it out
…github actions route - Add `USE_GITHUB_BRIDGE` to `emergency-rollback.groovy`, defaulting to `false` - Keep the existing Jenkins rollback implementation as the default path - When bridge mode is enabled, dispatch `Khan/webapp/.github/workflows/emergency-rollback.yml` on `master` and wait for completion - Preserve Jenkins wrapper behavior for job notifications and follow-up deploy E2E trigger Context: This is the Jenkins side of migrating emergency rollback to GitHub Actions. During the bridge phase, Jenkins remains the operator entrypoint and keeps the old rollback path available as fallback. The GitHub Actions path runs rollback in `webapp` and sends rollback-specific Slack messages from Actions. Jenkins still controls the job-level `notify(...)` wrapper and triggers `../deploy/e2e-test` after a successful non-dry-run rollback. Test Plan: - `git diff --check -- jobs/emergency-rollback.groovy .tasks/migrate-jobs/emergency-rollback/implementation-log.md` - Groovy syntax check using a temporary copy with Jenkins `@Library` stripped and `src` on the classpath: - `perl -ne 'print unless /^@Library/' jobs/emergency-rollback.groovy > /tmp/emergency-rollback.compile.groovy` - `groovy -cp src -c UTF-8 /tmp/emergency-rollback.compile.groovy
csilvers
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
USE_GITHUB_BRIDGEtoemergency-rollback.groovy, defaulting tofalseKhan/webapp/.github/workflows/emergency-rollback.ymlonmasterand wait for completionContext:
This is the Jenkins side of migrating emergency rollback to GitHub Actions. During the bridge phase, Jenkins remains the operator entrypoint and keeps the old rollback path available as fallback.
The GitHub Actions path runs rollback in
webappand sends rollback-specific Slack messages from Actions. Jenkins still controls the job-levelnotify(...)wrapper and triggers../deploy/e2e-testafter a successful non-dry-run rollback.Issue: https://khanacademy.atlassian.net/browse/INFRA-11068
Test Plan:
git diff --check -- jobs/emergency-rollback.groovy .tasks/migrate-jobs/emergency-rollback/implementation-log.md@Librarystripped andsrcon the classpath:perl -ne 'print unless /^@Library/' jobs/emergency-rollback.groovy > /tmp/emergency-rollback.compile.groovy