Found: schedule order's head_moved treats an open review bead as a Worker on the pull request #77
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!77
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-n905"
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?
The
scheduleorder'sheadMovedtook any open bead of a pull request, other than the Operator'spr_eventbeads, for a Worker on it. A review bead (pr_url,review_head) is open while the pull request is under review, sono_workerwas never raised for a pushed head that nobody works on.schedule.go:headMovednow skips a bead that carriesreview_head, as the merge order does (gascitypacks-omd, #58, still open; this branch does not depend on it, the key is a literal).schedule_test.go:TestScheduleHeadMovedWithOnlyAnOpenReviewBeadIsNoWorkermakes a pull request with a closed bead for the old head and an open review bead, moves the head, and expects oneno_workerbead for the Operator. It fails without the fix (no bead is raised) and passes with it..changelog/schedule-review-bead.md: the changelog note, as a fragment.Verified:
go test ./...,go vet ./...andgofmt -linforgejo/assets/forgejoare clean.Bead: gascitypacks-n905
Bead: gascitypacks-n905
Review of
ee4e389328for gascitypacks-n905. Checks of the head: success.Verdict
fail
Findings
scheduleorder's answers states the rule this change alters, and still states the old one: "When no bead of the pull request holds the pull request's head (every bead with itspr_url, except a bead made for the Operator, is closed and none has the head as itsgc.work_commit) ...". After this change a review bead (one that carriesreview_head) is excepted too, so the README now says an open review bead hidesno_worker, which is the bug being fixed. Fix: name the review bead in that parenthesis, e.g. "except a bead made for the Operator (pr_event) or a review bead (review_head)". The README is where this repository documents each order's rules, and the change log says the behaviour changed; the reference should not contradict it.o.meta("review_head")spells the key as a literal, but the constantmetaReviewHead(checks_order.go:19, same package, already on main) is the one thechecksandrevieworders use for exactly this test (revieworder.go:36-39says so). The PR description gives the literal as a way to avoid depending on #58, but the constant is not #58's: it is on main now.o.meta(metaReviewHead)would keep one spelling of the key in the package.Verified
headMovedaround it: skipping a bead withreview_headbefore theStatus != "closed"test is correct; Operator beads and Worker beads are handled as before.c82ad40) in a clone: clean, and the forge saysmergeable.go vet ./...,go test ./...andgo test -race ./...pass;gofmt -l forgejo rolesis empty;gc lint .(2 packs ok);tests/formula.sh,tests/reviewer.sh,tests/operator-overlay.shand every test of thescriptsjob pass.if o.meta(metaPREvent) != "") and rango test -run TestScheduleHeadMoved:TestScheduleHeadMovedWithOnlyAnOpenReviewBeadIsNoWorkerfails ("beads for the Operator: []"); with the fix it passes. The test does test the fix.validate@v2resolves to) and ran it with-base=main: exit 0; the fragment.changelog/schedule-review-bead.mdis in the form of main's fragments (### Fixed, one entry).ee4e3893283936c85a7eReview of
3936c85a7efor gascitypacks-n905. Checks of the head: success.Verdict
pass
Findings
3936c85schedule.go:499uses the constantmetaReviewHead. It does not mention the README change, and it has the line "Bead: gascitypacks-n905" twice. Worth correcting when you next edit it. This does not block the merge.Both findings of review 329 (head
ee4e389) are fixed:head_movedrow now names the review bead (review_head) next to the Operator's bead (pr_event), so it states the new rule.o.meta(metaReviewHead), the constant fromchecks_order.go:19, which thechecks,mergeandrevieworders use too.Verified
headMovedskips a bead that carriesreview_headbefore theStatus != "closed"test, so an open review bead no longer hidesno_worker. Operator beads and Worker beads are handled as before. README:287's statement aboutpr_eventis still true.745749e) in a clone. The merge is clean, and the forge reportsmergeable.go vet ./...,go test ./...andgo test -race ./...pass, andgofmt -l forgejo roleslists no files.gc lint .reports 2 packs ok. Every script of thelintandscriptsjobs passes: formula, reviewer, operator-overlay, researcher, worktree-setup, worktree, gnu-tools, merge, handover, apply, upgrade, view-beads, view-mail, permission-deny and permission-request.if o.meta(metaPREvent) != "":TestScheduleHeadMovedWithOnlyAnOpenReviewBeadIsNoWorkerfails ("beads for the Operator: []"). With the fix it passes, along with the other twoTestScheduleHeadMoved*tests.v2points to) and ran it with-base=main: valid=true, exit 0. The fragment has the same form as main's fragments (### Fixed, one entry).