Skip to content

Add scheduled discovery of documented operator examples - #4559

Open
evanchooly wants to merge 1 commit into
audits-generatorfrom
audits-monitoring
Open

evanchooly wants to merge 1 commit into
audits-generatorfrom
audits-monitoring

Conversation

@evanchooly

Copy link
Copy Markdown
Member

Part of step 6 of the operator-audit plan: scheduled discovery. Stacked on #4558.

Problem solved

Nothing watched the docs for new examples. The example inventory from #4558 only changes when someone reruns fetch.py by hand, so an example added or renamed upstream goes unnoticed. .github/workflows/operator-discovery.yml runs weekly (Mondays 06:17 UTC) and on demand, with contents: read only. It does this:

  1. Makes a sparse, blobless git clone of mongodb/docs's operator pages and includes.
  2. Runs audits/discover.sh, which works in a throwaway worktree of HEAD:
    • fetch.py local lists the pages;
    • inventory re-reads them, and inventory.diff shows the change against the committed inventory;
    • candidate regenerates and writes gaps.json;
    • integrate runs the candidate's tests under Critter, then reflection.
  3. Writes summary.md as the job summary and uploads every report for 90 days.

The job fails only when integration fails. A changed inventory is a proposal to review, not a failure, and the job never commits, promotes or files issues.

I ran discover.sh locally against e4b0c153:

The offline PR check (audits.yml) now also triggers on the generated namespace and the runner.

Decisions for review

  • A git clone, not the API. Fetching through GITHUB_TOKEN would make about 1,300 calls, over its 1,000-per-hour limit. A sparse clone takes about 5 seconds, and git verifies every blob itself.
  • No publisher job yet. The publisher (Publish audit findings as issues without duplicates (operator audits step 6b) #4556) files findings from a capability-coverage report. That report comes from the discovery/coverage pipeline, which has no accepted production baseline yet, and the plan says to add the publisher only once reports are reliable. Adding that job means granting issues: write and choosing a target repository, both of which are yours to approve. For now nothing in CI can write issues.
  • One server. Integration runs the tests' default MongoDB 8.2. A capability-driven server matrix waits until generated cases declare requirements.
  • Generated cases are not owners in the inventory. Generation derives them from these examples on every run, so the summary lists them as "without a handwritten owner" and marks each one generated or with its gap.

Review status

Self-reviewed only (the independent reviewer is at its weekly limit until Nov 26, and Codex and Copilot are out of quota). The scheduled job itself only runs once it reaches master.

This branch has not been deployed

No deployments
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