A team designs a recovery workflow for degraded multi-agent releases. A failed multi-agent-release run should create an incident issue, while rollback must only run when an operator manually supplies a rollback SHA. Evaluate the following statements. 1. The detect job can open an issue for a failed agent release. 2. The rollback job runs automatically when multi-agent-release fails. 3. The rollback job can be held by required reviewers on production-rollback.
name: multi-agent-recovery
on:
workflow_run:
workflows: ["multi-agent-release"]
types: [completed]
workflow_dispatch:
inputs:
rollback_sha:
description: Last known good deployment SHA
required: true
type: string
permissions:
contents: read
issues: write
deployments: write
jobs:
detect:
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' }}
runs-on: ubuntu-latest
steps:
- name: Open incident issue
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue create \
--title "Agent release degraded" \
--body "Run ${{ github.event.workflow_run.html_url }} failed validation."
rollback:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
environment: production-rollback
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.rollback_sha }}
- name: Roll back production
run: ./ops/rollback.sh "${{ inputs.rollback_sha }}"Choose an answer
Tap an option to check your answer.
Correct answer: 1=Yes 2=No 3=Yes.
Why this is the answer
Statement 1 is correct. The detect job's if condition github.event.workflowrun.conclusion != 'success' ensures it runs only when the multi-agent-release workflow fails, and it uses gh issue create to open an incident issue. Statement 2 is incorrect. The rollback job has an if condition github.eventname == 'workflowdispatch', meaning it only runs when manually triggered via workflowdispatch, not automatically on multi-agent-release failure. Statement 3 is correct. The rollback job targets the production-rollback environment, which can be configured in GitHub to require reviewers, thus holding the job until approved.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed