From f18c41128c255533d90580692fb9f71089fd56a2 Mon Sep 17 00:00:00 2001 From: Danny Neira <16809145+dannyneira@users.noreply.github.com> Date: Wed, 10 Jun 2026 10:41:39 -0600 Subject: [PATCH 1/2] ci: add client oncall schedule ID to release docs workflow Hardcode the client on-call Grafana schedule ID (S1BRQ4BYUP5WN) in the oz agent prompt so reviewer assignment works without any additional variables. Uses --oncall-max-reviewers 2 to resolve both primary and secondary from the same schedule. Co-Authored-By: Oz --- .agents/skills/release_updates/SKILL.md | 4 ++-- .../scripts/resolve_oncall_reviewers.py | 4 ++-- .../release_updates/scripts/setup_environment.py | 10 +++++----- .github/workflows/release-docs-update.yml | 8 +++++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.agents/skills/release_updates/SKILL.md b/.agents/skills/release_updates/SKILL.md index c14b7d63..4f3dc3cb 100644 --- a/.agents/skills/release_updates/SKILL.md +++ b/.agents/skills/release_updates/SKILL.md @@ -39,7 +39,7 @@ They support the following: - Resolver script path (default): `.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py` -- `GRAFANA_API_KEY` environment variable. +- `DOCS_AGENT_GRAFANA_TOKEN` environment variable. ### Recommended @@ -185,7 +185,7 @@ python3 .agents/skills/release_updates/scripts/run_release_updates.py \ Notes: -- Requires `GRAFANA_API_KEY` in the environment. +- Requires `DOCS_AGENT_GRAFANA_TOKEN` in the environment. - Uses resolver script (by default): `.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py` - Repeat `--oncall-schedule-id` to resolve one reviewer per schedule, in order. diff --git a/.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py b/.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py index 3d43258f..ad891ee5 100644 --- a/.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py +++ b/.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py @@ -321,9 +321,9 @@ def parse_args() -> argparse.Namespace: def main() -> int: args = parse_args() - api_key = os.environ.get("GRAFANA_API_KEY") + api_key = os.environ.get("DOCS_AGENT_GRAFANA_TOKEN") if not api_key: - print("GRAFANA_API_KEY env var required", file=sys.stderr) + print("DOCS_AGENT_GRAFANA_TOKEN env var required", file=sys.stderr) return 1 users = get_oncall_users( diff --git a/.agents/skills/release_updates/scripts/setup_environment.py b/.agents/skills/release_updates/scripts/setup_environment.py index 9832f19b..77c4f501 100644 --- a/.agents/skills/release_updates/scripts/setup_environment.py +++ b/.agents/skills/release_updates/scripts/setup_environment.py @@ -179,7 +179,7 @@ def main() -> int: checks: dict[str, Any] = { "commands": {}, "gh_authenticated": None, - "grafana_api_key_present": None, + "docs_agent_grafana_token_present": None, "oncall_resolver_exists": None, "local_channel_versions_present": None, } @@ -252,10 +252,10 @@ def main() -> int: f"{resolver_path}. Pass --oncall-resolver-script.", ) - grafana_api_key_present = bool(os.environ.get("GRAFANA_API_KEY")) - checks["grafana_api_key_present"] = grafana_api_key_present - if args.require_oncall_reviewer and not grafana_api_key_present: - errors.append("Missing required env var for reviewer assignment: GRAFANA_API_KEY") + docs_agent_grafana_token_present = bool(os.environ.get("DOCS_AGENT_GRAFANA_TOKEN")) + checks["docs_agent_grafana_token_present"] = docs_agent_grafana_token_present + if args.require_oncall_reviewer and not docs_agent_grafana_token_present: + errors.append("Missing required env var for reviewer assignment: DOCS_AGENT_GRAFANA_TOKEN") report: dict[str, Any] = { "generated_at_utc": utc_now_iso(), diff --git a/.github/workflows/release-docs-update.yml b/.github/workflows/release-docs-update.yml index e85789bb..f454cf2c 100644 --- a/.github/workflows/release-docs-update.yml +++ b/.github/workflows/release-docs-update.yml @@ -120,6 +120,8 @@ jobs: # 1. workflow_dispatch succeeds. # 2. the channel-versions dispatch sender is tested. # 3. required secrets, variables, and cross-repo permissions are configured. + # WARP_AGENT_PROFILE should be set to the Docs Agent on prod Oz (oz.warp.dev). + # That agent has DOCS_AGENT_GRAFANA_TOKEN configured for on-call reviewer assignment. - name: Run release docs update with Oz uses: warpdotdev/oz-agent-action@v1 with: @@ -141,7 +143,7 @@ jobs: 4. Create and switch to a release docs feature branch before invoking `run_release_updates.py --create-pr`; the script refuses to create a PR from `main`. 5. Create or update a PR against `warpdotdev/docs` `main` only if generated changes exist. 6. Use a draft PR when create_draft_pr is true. Note: --pr-draft and --pr-auto-merge are mutually exclusive; never pass both. - 7. Assign on-call reviewers only when the active trigger's assign_oncall_reviewers value is true and the required Grafana schedule IDs and `GRAFANA_API_KEY` are available. + 7. Assign on-call reviewers only when the active trigger's assign_oncall_reviewers value is true and `DOCS_AGENT_GRAFANA_TOKEN` is available in the environment. 8. Run `npm run build` before considering the PR ready for review. 9. If no docs changes are needed, report a no-op result and do not open a PR. @@ -151,8 +153,8 @@ jobs: - all tasks: `python3 .agents/skills/release_updates/scripts/run_release_updates.py --create-pr --pr-base main` Include `--pr-draft` when create_draft_pr is true. - Always include `--pr-auto-merge` (marks the PR ready for review and enables squash auto-merge). + Include `--pr-auto-merge` when create_draft_pr is false (enables squash auto-merge and marks PR ready for review). + Never pass both --pr-draft and --pr-auto-merge together. When assign_oncall_reviewers is true, include: --assign-oncall-reviewer --oncall-schedule-id S1BRQ4BYUP5WN --oncall-max-reviewers 2 This resolves up to 2 reviewers (primary + secondary) from the client on-call schedule. - If GRAFANA_API_KEY is not set, skip reviewer assignment and log a warning. From bce4e008b7d12d9f50f196c01e11a18f9d958a55 Mon Sep 17 00:00:00 2001 From: Danny <16809145+dannyneira@users.noreply.github.com> Date: Thu, 11 Jun 2026 13:13:02 -0600 Subject: [PATCH 2/2] Update .github/workflows/release-docs-update.yml Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com> --- .github/workflows/release-docs-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docs-update.yml b/.github/workflows/release-docs-update.yml index f454cf2c..edf2fc0b 100644 --- a/.github/workflows/release-docs-update.yml +++ b/.github/workflows/release-docs-update.yml @@ -143,7 +143,7 @@ jobs: 4. Create and switch to a release docs feature branch before invoking `run_release_updates.py --create-pr`; the script refuses to create a PR from `main`. 5. Create or update a PR against `warpdotdev/docs` `main` only if generated changes exist. 6. Use a draft PR when create_draft_pr is true. Note: --pr-draft and --pr-auto-merge are mutually exclusive; never pass both. - 7. Assign on-call reviewers only when the active trigger's assign_oncall_reviewers value is true and `DOCS_AGENT_GRAFANA_TOKEN` is available in the environment. + 7. Assign on-call reviewers only when the active trigger's assign_oncall_reviewers value is true, the required Grafana schedule IDs are configured, and `DOCS_AGENT_GRAFANA_TOKEN` is available in the environment. 8. Run `npm run build` before considering the PR ready for review. 9. If no docs changes are needed, report a no-op result and do not open a PR.