Skip to content

ci: run doc tests on version bumps and support version overrides - #1848

Open
JakeSCahill wants to merge 1 commit into
mainfrom
ci-doc-test-triggers
Open

ci: run doc tests on version bumps and support version overrides#1848
JakeSCahill wants to merge 1 commit into
mainfrom
ci-doc-test-triggers

Conversation

@JakeSCahill

Copy link
Copy Markdown
Contributor

Summary

Closes the trigger gap that let the Console v3.9 UI rework break the quickstart doc test silently: the version-bump PR never ran the test (antora.yml is not in the paths filter), so the breakage only surfaced in nightly runs, which then failed for ~92 consecutive nights until #1846 fixed the selectors.

Changes

  1. Run the quickstart test on version-bump PRs. antora.yml pins the Redpanda and Console versions the test runs against, so a new versions paths filter now triggers the PR test step when it changes. UI or image breakage from a version bump is caught before merge instead of by the nightly.
  2. Support version overrides for dispatch and manual runs. The workflow_dispatch trigger gains optional inputs (redpanda_version, redpanda_docker_repo, console_version, console_docker_repo), and the dispatch/schedule test step maps them (or the same keys from a trigger-tests client_payload) to the env vars the test spec already resolves before falling back to antora.yml. This makes the previously unused trigger-tests dispatch hook actually useful: upstream repos can now ask the docs repo to test a specific version combination, and RC combos are testable manually today (for example redpanda_docker_repo: redpanda-unstable).

No behavior change for scheduled runs or ordinary PRs: with no overrides set, the env vars are empty and the test resolves versions from antora.yml exactly as before.

Upstream proposals enabled by this PR (not included)

  • Console GA: the console repo's existing repository-dispatch.yml can add a trigger-tests dispatch to this repo on v* tags with console_version in the payload. Caveat for the Console team: at tag-push time the release image may not be published yet, so the dispatch may belong at the end of the release pipeline instead.
  • Redpanda RC: Redpanda images build in Buildkite, so the dispatch belongs at the end of the RC build pipeline (after images publish to redpanda-unstable) with redpanda_version + redpanda_docker_repo: redpanda-unstable in the payload. A GitHub tag-push trigger would race image publication.

🤖 Generated with Claude Code

@JakeSCahill
JakeSCahill requested a review from a team as a code owner July 29, 2026 14:31
@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for redpanda-docs-preview ready!

Name Link
🔨 Latest commit 0abc697
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/6a6a0ead1a60b20009ba104c
😎 Deploy Preview https://deploy-preview-1848--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation test workflow adds optional Redpanda and Console version or Docker repository inputs, detects changes to antora.yml, exposes a versions setup output, and passes resolved values into the test job. The Redpanda Streaming quickstart now also runs when version configuration changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Trigger as Manual or repository dispatch
  participant Setup as setup job
  participant Filter as dorny/paths-filter
  participant Tests as Run all tests job
  participant Quickstart as Redpanda Streaming quickstart
  Trigger->>Setup: Start with optional version overrides
  Setup->>Filter: Check changed paths
  Filter-->>Setup: Return versions output for antora.yml
  Setup->>Tests: Provide version-related job output
  Tests->>Quickstart: Run when versions output is true
Loading

Suggested reviewers: feediver1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it misses the required template sections: Jira ticket, review deadline, page previews, and checks. Add the template’s Description, Page previews, and Checks sections, including the Jira ticket and review deadline.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: docs tests now run on version bumps and accept version overrides.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-doc-test-triggers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/test-docs.yml (1)

29-34: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Restrict the setup job to read-only permissions.

This job only checks out code and evaluates changed paths, but it currently inherits the workflow/repository default token permissions. Add an explicit contents: read permission to avoid exposing unnecessary write access.

Proposed fix
   setup:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     outputs:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test-docs.yml around lines 29 - 34, Add an explicit
read-only permissions block to the setup job, granting only contents: read.
Update the setup job configuration around its runs-on and outputs fields,
without changing the path-filtering or output behavior.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/test-docs.yml:
- Around line 29-34: Add an explicit read-only permissions block to the setup
job, granting only contents: read. Update the setup job configuration around its
runs-on and outputs fields, without changing the path-filtering or output
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dda9e6ec-7217-4fe6-a85e-e5f53b99146f

📥 Commits

Reviewing files that changed from the base of the PR and between 4e47021 and 0abc697.

📒 Files selected for processing (1)
  • .github/workflows/test-docs.yml

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.

1 participant