From 5feb06982d5e52b0d75842d766a1a33d335b2c83 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Fri, 13 Nov 2026 08:32:49 +0900 Subject: [PATCH] =?UTF-8?q?ci(release):=20needs=EA=B0=80=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20job=EC=9D=B4=20runner=20=EB=8C=80=EA=B8=B0=EC=97=B4?= =?UTF-8?q?=20=EB=92=A4=EB=A1=9C=20=EA=B0=80=EB=8A=94=20=EB=B9=84=EC=9A=A9?= =?UTF-8?q?=EC=9D=84=20=EC=A0=81=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 수동 release run 157에서 `app-image-release`는 gate가 끝나고 3시간 뒤에, `app-image-signing`은 이미지 job이 끝나고 2시간 뒤에 시작했다. runner label(`ubuntu-latest`)은 다른 job과 같고 environment도 없다. 원인은 `needs`다. Gitea는 runner에 실행할 수 있게 된 지 가장 오래된 job을 준다. 그 runner가 받는 모든 repo가 대상이다. `needs`가 없는 job은 run을 만들 때부터 실행할 수 있다. `needs`가 있는 job은 앞 job이 끝나야 실행할 수 있다. 그래서 그 시각 전에 만들어진 모든 job 뒤에 선다. 같은 시간대 두 repo의 job 시각이 이 순서와 맞는다. - 이미지 job(17:50 실행 가능): 17:47에 만들어진 프론트 run까지 먼저 돌았다. 17:51에 만들어진 run보다는 앞이었다. - 서명 job(21:01 실행 가능): 19:28에 만들어진 run까지 먼저 돌았다. 22:30에 만들어진 run보다는 앞이었다. release.yml에 그 비용과 측정값을 적고, 태그는 대기 중인 run이 없을 때 자르라고 적는다. main.yml `performance` 주석의 「만든 순서」도 「실행할 수 있게 된 순서」로 고친다. `needs`가 없는 job에서는 둘이 같다. 고르지 않은 안: - `needs`를 빼고 파일 순서에 맡긴다. gate가 실패해도 이미지가 publish될 수 있다. - 서명을 이미지 job에 합친다. 서명 키가 빌드하는 job에 들어간다. - runner를 늘린다. 이번 프로그램의 범위 밖이다. 대기는 runner가 바쁠 때만 생기고, release 비용(job 시간 합)에는 들어가지 않는다. 동작 변경 없음: 주석만 바꿨다. 검증: scripts/verify.sh docs(노트북) rc=0. release.yml을 읽는 시험 (DeveloperExperienceContractTest, JpaReleaseRenderingTest)은 주석 문구를 보지 않고, 넣은 주석에는 JPA gate 태스크 이름이 없다. --- .gitea/workflows/main.yml | 7 ++++--- .gitea/workflows/release.yml | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index a878e56a..457d83cf 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -344,9 +344,10 @@ jobs: # run (63), and on every push, where the nightly jobs it waited for are skipped (79). A throwaway # workflow started by hand reproduced it with nothing else in it (2026-11-11, three variants): # every job with both `needs` and `if` stayed Blocked, whatever the `if` said and whether or not - # the jobs it needed had passed. A job without `needs` is queued when the run starts, and the one - # runner (capacity 1) takes a run's jobs in the order they were created, which is their order in - # this file. A second runner would let this job overlap the others; it would still run. + # the jobs it needed had passed. A job without `needs` is runnable when the run starts, and the one + # runner (capacity 1) takes the job that became runnable first, so a run's jobs go in the order they + # were created, which is their order in this file. A second runner would let this job overlap the + # others; it would still run. performance: if: ${{ github.event_name != 'push' }} runs-on: ubuntu-latest diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8022ae99..05ace22e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -142,6 +142,16 @@ jobs: # Build, inventory and scan the image; on a tag also push it. It waits on every evidence job: # `needs` does not reach across workflows, so a gate in another file could still be running. + # + # What `needs` costs on this runner. Gitea gives the runner the job that became runnable first, + # across every repository the runner serves. A job without `needs` is runnable when its run is + # created; this one only when the last gate finishes, so it waits behind every job created before + # that moment, other repositories' jobs included. Manual run 157 (2026-11-12): the gates finished at + # 17:50 UTC and this job started at 20:52, after four frontend pull-request runs created between + # 17:03 and 17:47; app-image-signing waited two hours more the same way. Their job time is what a + # release costs; the wait is the queue's. On an idle runner the wait is zero, so cut a release tag + # when no other run is queued. Kept as it is: without `needs` an image could be published before a + # gate failed, and folding the signing into this job would put the key in a job that builds. app-image-release: needs: - release