Skip to content

feat(prow): generate chant's pipeline jobs as Prow jobs (#5189) - #5213

Merged
lex00 merged 1 commit into
mainfrom
feat/prow-generator
Nov 16, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/prow-generator

Conversation

@lex00

@lex00 lex00 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Closes #5189

chant build --components --generate prow writes the jobs chant generates for a component project as a Prow job config, and chant run --generate prow writes the scheduled Ops to one. The jobs are keyed by the GitHub repository's owner/name. It comes from --repo when given, and from the origin remote otherwise.

Each job is the Prow job of the matching kind.

  • The pull request plan and the check job are presubmits on the build cluster untrusted, with no Secret and no service account.
  • The jobs that run merged code are postsubmits on trusted and read the GitHub token from the Secret chant-github-token. These are the merge record, the apply on merge and the stale-notes job, and also the deploy and gated-wave pipelines.
  • A scheduled Op on a cron is a periodic. One on a push or a pull request is a postsubmit or a presubmit.

A job that holds a credential is never written as a presubmit, so the output has no PROW104 or PROW105 finding. The renderer refuses such a presubmit, and the loop options that would add one are refused by name. The generator's prow option moves the clusters and Secrets and names the service accounts.

Level 0 is unaffected, since no other generator's output changes.

I ran just check on this branch over current main. Eleven tests in files this change does not touch ran over the 5s unit budget under the full run's load, and those five files pass on their own. The other steps pass. The prow lexicon's 109 tests pass, including Prow's strict loader over every generated config.

The prow lexicon gains `generateComponentPipeline` and `generateOpPipeline`.
`chant build --components --generate prow` writes the jobs chant generates
for a component project as a Prow job config. `chant run --generate prow`
writes the scheduled Ops to one. The jobs are keyed by the GitHub
repository's owner/name. `--repo` names it, and without the flag chant
reads the checkout's origin remote.

The plan and the check are presubmits with no credential. The record and
the apply on merge are postsubmits that read the token from a Secret. So
are the deploy and gated-wave pipelines. A cron Op is a periodic. No job
that holds a credential is a presubmit. The PROW104 and PROW105 checks
find nothing on the output. An option that would add such a job is refused by name.
@lex00
lex00 added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 4c28776 Nov 16, 2026
10 checks passed
@lex00
lex00 deleted the feat/prow-generator branch November 16, 2026 13:14
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.

prow lexicon: generate chant's pipeline jobs as Prow jobs

1 participant