Repository navigation
CI: 문서만 다시 맞춘 push는 마지막 초록 verify를 재사용한다 - #1151
Merged
Merged
Conversation
…ane reads A push that only merges main to resolve a conflict in a guide, or only edits documentation, ran every lane the pull request plans again. The plan now reuses the pull request's latest green run and plans `policy` alone when both hold: - What the pull request adds to main as it is now differs from what that run's head added only in paths no lane but `policy` reads. The plan merges that head into the current main with `git merge-tree` and compares the tree with this run's merge, so a conflict resolved in code, or any change to code, a guide a test reads or a contract, fails it. - Main has changed none of the paths the pull request changes that a lane reads since the main that run checked (pull request #1133's re-merge brought main's changes to six files it also changed). Each pull request run keeps a plan record (the `ci-plan` artifact) naming the run whose lanes ran and the main and head they checked; a reusing run records that run. The plan job reads earlier runs with `actions: read` and fetches commits and trees only. No run, no record, a record for another head, or a lookup, download, fetch or comparison that fails keeps the plan the change needs and says why in the summary. docs/TESTING.md, the pr.yml header and CONTRIBUTING.md describe the rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #1149
Summary
충돌을 풀려고 main을 합쳐 push하면, 바뀐 것이 문서뿐이어도 PR이 계획한 레인이 처음부터 다시 돕니다.
이제 그런 push는 이 PR의 마지막 초록
verify를 재사용하고policy만 돌립니다. plan 요약에 재사용한 실행 ID가 남습니다.재사용은 두 조건이 모두 참일 때만입니다.
policy만 읽는 경로(문서,design/,POLICY_ONLY)에서만 다릅니다. 코드, 테스트가 읽는 가이드, 계약이 다르면 다시 돕니다.각 PR 실행은 레인이 실제로 확인한 main과 head를
ci-plan아티팩트로 남깁니다. 재사용한 실행은 원래 실행을 가리켜, 비교는 항상 레인이 돈 실행과 합니다.머지 직전
premerge-check.py는 지금처럼 merge 결과에서 돕니다.Review
policy(리눅스 잡 1개, 약 70초)는 돕니다. 스크립트 테스트와 불변식이 바뀐 문서를 읽기 때문입니다. brief의 "레인을 다시 돌리지 않고"보다 하나 더 돕니다.scripts/ci-plan.pyplan- 재사용 분기는NotReused, git 실패,OSError,ValueError를 모두 일반 plan으로 돌립니다. 통과로 가는 길은 두 조건이 참일 때 하나뿐입니다.scripts/ci-plan.pystill_stands- 충돌이 난 merge-tree 결과는 충돌 표시가 남은 채 비교되어, 코드 충돌을 다르게 푼 push는 A에서 걸립니다..github/workflows/pr.ymlplan 잡 -actions: read권한,GH_TOKEN, 기록 업로드(continue-on-error: 업로드 실패는 다음 실행이 일반 plan이 될 뿐).Evidence
python3 -m unittest discover -s scripts/tests -p 'test_*.py'360개 통과.persistence.rs충돌을 풀어 A가 걸리고, B만 따로 봐도 main과 겹친 레인 경로 6개로 걸립니다.ci-plan.py를 바꿔 전체 레인입니다. 문서만 다시 push해 재사용이 실제로 일어나는지는 이 PR에서 따로 확인합니다.재생 결과 (재사용과 main 겹침 사례)
재생: 각 실행의 merge commit 첫 부모를 그 실행의 main으로 보고, head를 그 main에 합쳐 다시 만든 merge로 이 PR의 판정을 돌렸습니다.
docs/VERIFICATION.md한 줄persistence.rs충돌을 코드로 해결hided/tests/it/core_move.rs를 바꿈memory.rs등 4개를 바꿈pr.yml을 바꿈design/tokens.json등 10개를 바꿈나머지 44개는 PR이 레인이 읽는 경로를 바꿔 재실행입니다.