Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

#258

Do not build a job the combined result already passed for the branch

merged · by keenan 15m ago · merged into main at 5f6163bb by keenan 11m ago

keenan opened this 15m ago

Closes #249. A landing lands the commit the combined result published — same tree, same workflow, same job, already run for the base branch. The push that moved the branch then queued all of it again, so one commit showed up twice in the run list and the runner did the same work twice.

The rule

Queueing asks whether a combined result for this branch already ran and passed this job at this commit. If it did, the push owes nothing: the run that tested the landing stays the one run for it.

  • ci/runs: CombinedResultPassed(repo, branch, sha, workflow, job) — one indexed query on runs_repo_sha, no scan.
  • server/ci.go: asked only for a push to the branch itself. A tag is a release build of its own, an event run is a new occurrence of one, and the candidate’s own queue call is the one being reused.

The exception

A job that deploys the site still runs. A combined result never deploys — it is not on the branch yet — so publishing the site is work it did not do. Repositories without a pages job, which is most of them, lose the duplicate entirely; a repository with one keeps a second run that genuinely does something different.

Not in this change

A fast-forward landing still builds the head on the base branch after the head’s own branch built it. Those runs select workflows by branch, so they are not the same work by construction. Only a combined result is queued as “a normal run for the base branch”, and that is what makes this dedupe exact rather than a guess about two branches meaning the same thing.

Testing

  • ci/runs: the query matches only a green run at the same repository, branch, commit, workflow and job; queued, running, failed, canceled and error runs are not evidence.
  • server: a white-box reconciliation test — a successful combined result at the branch tip means the push queues nothing, the surviving run is the candidate one, and the branch cursor still moves so the tip is not owed forever; and a job with pages: still queues its site run with the right path.

vole workflow run verify passes (format, vet, build, licenses, govulncheck, packages, deployment files, links, race suite), on a branch rebased onto the merged #246 and #247 work.

Docs: docs/change-requests.md says the landing no longer queues the same jobs again and names the site exception.

Discussion (0)

No discussion yet.