ci.yml: narrow push to main, move the e2e gate onto the pull request #80
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda#80
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #77. Blocked by branch protection being decided.
Why
Two problems, one fix.
The gate runs after the merge, not before.
e2eandpromoteare bothif: github.ref == 'refs/heads/main'. The comment inci.ymlgives thereasoning — "the two minutes of real Obsidian are spent on what is about to be
promoted." Under pull requests the merge is what is about to be promoted, so
the same reasoning moves the gate onto the PR. A failure then means "do not
merge" instead of "
mainis already broken and the deploy has been stoppedafter the fact."
Every PR runs CI twice.
pushandpull_requestboth fire on the same sha— confirmed on eight distinct shas in
action_run. The repo has 317pushrunsagainst 15
pull_requestruns.What to do
e2e: run onpull_requestand onmain.promote: staysmainonly.:stablemust still move only after a greengate on the commit that is actually deployed.
PR becomes how you ask for it, and exploratory branches stop paying.
Cost, measured not guessed
e2emoves from once per push tomainto once per PR. With 41 commits landingin a single day, consolidating those into one PR is a reduction in
real-Obsidian runs, not an increase.
Keep the comment block explaining why
on:is shaped this way — the current onerecords that CI previously triggered on
mainonly and therefore never ran,and that history is worth keeping.
Landed via PR #112, which was fast-forward merged as
796d617. It is the first pull request ever merged ontomainhere.pull_requestrun 482. The double run is gone.e2eran against real Obsidian and passed.promotewas skipped.main, run 489 passed build, e2e and promote.eu1.nectenda.com/api/healthreports796d617.CI / build (pull_request),CI / e2e (pull_request),Release note / release-note (pull_request).One thing this did not cover: tag pushes run the workflows as they are at the tagged commit. Pushing seven release tags onto old history queued 14 runs, which were cancelled. A
paths:-only push filter also fires on tags, ande2e.ymlis fixed for that in the #84 branch.