Repository navigation
통과한 remote fixture의 run 폴더를 한 곳에서 지움 - #934
Merged
Merged
Conversation
Two of the three remote delivery journeys ended with only the process cleanup, so a passing run left its accounts and staged binaries, about 400 MB each, under agents/runs/. The twenty remote core journeys repeated a six line match to avoid the same omission. A fixture is now started only through Fixture::journey, which takes the journey as a closure and ends the run by how it went: the owned processes stop first, a pass removes the directory, a failure keeps it and returns the first error with the path. The rule lives in support/run.rs and is held by its own tests. The remote core fixture also resumes a node a journey stopped before it ends it, which only one journey's failure path did by hand.
The pane shim created the timing file before it wrote it, and the test takes the file's existence as the command's end, so a read in between saw an empty file and failed with "cannot parse integer from empty string". The shim now writes a temporary file and renames it.
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.
Closes #899
Summary
remote_delivery의 세 journey 중 첫 번째만 통과 뒤 run 폴더를 지웠고, 나머지 둘은 프로세스만 정리해서 통과한 실행마다 계정과 staged 바이너리 약 400 MB가agents/runs/에 남았습니다.Fixture::journey(|fixture| { ... })로만 시작하고, 끝 처리(finish,hided/tests/it/support/run.rs)가 소유 프로세스를 먼저 멈춘 뒤 통과면 폴더를 지우고 실패면 남기며 첫 오류를 폴더 경로와 함께 돌려줍니다. 테스트는 더는 지우거나 남기는 코드를 쓰지 않습니다.remote_core의 스무 개 journey가 각자 여섯 줄match를 복사해 쓰고 있어 같은 구조로 바꿨습니다(이쪽은 이미 지우고 있었습니다).start는 비공개가 됐습니다.SIGCONT(멈춘 node 재개)를remote_corefixture의stop으로 옮겼습니다. 다른 journey가SIGSTOP뒤에 실패해도 같은 방식으로 정리됩니다.cannot parse integer from empty string으로 실패했습니다. 임시 파일에 쓰고 rename합니다.Review
hided/tests/it/support/run.rs- 규칙 전체입니다. 통과했지만 프로세스가 종료를 확인하지 못했으면 폴더를 남기고 실패시킵니다(teardown은 단언). 실패한 journey 뒤의 teardown 실패는 journey의 오류를 가리지 않습니다.hided/tests/it/support/remote_core.rs의stop- 모든 node에SIGCONT를 보낸 뒤 종료합니다. 멈추지 않은 프로세스에는 영향이 없습니다.hided/tests/it/support/remote_delivery/mod.rs끝의 C shim - 타이밍 파일을.tmp로 쓰고 rename합니다. 별도 커밋(Write a fixture command's timing file whole)이라 따로 볼 수 있습니다.remote_core.rs의 스무 곳은 기계적 변환입니다(let mut fixture = Fixture::start()?; let journey = (|| {->Fixture::journey(|fixture| {와 끝의match삭제, clippy가 요구한&fixture->fixture24곳). 본문은 들여쓰기도 그대로입니다. diff가 크게 보이는 이유입니다.Evidence
support::run::tests의 4건이 통과합니다(통과하면 폴더가 없다, 실패하면 폴더와 자기 오류를 남긴다, 실패한 journey 뒤 teardown 실패가 journey 오류를 가리지 않는다, 통과했어도 종료 미확인이면 폴더를 남긴다). 이 4건은 기본 lane(rust workspace)에서 돌고 ignore가 아닙니다.remote_delivery::ending_the_recipients_registration_ends_the_senders_answer_wait_and_says_why를 격리 Herdr 0.9.3로 한 번 돌려 통과했고agents/runs/에rd-*폴더가 남지 않았습니다(45 s). 바꾸기 전 코드에서는 이 journey의 끝에remove_run_dir호출이 없는 것을 코드로 확인했고, 실행으로 재현하지는 않았습니다(run 하나가 약 400 MB).run kept at <path>와 함께 남았습니다(실패하면 남긴다는 쪽의 실제 관찰). 원인은 위의 shim이고, 고친 뒤 재실행이 통과했습니다.remote_core::a_node_of_another_build_or_the_cores_own_machine_is_refused를 한 번 돌려 통과했고rc-*폴더가 남지 않았습니다(6 s).verify-cargo.sh lint(fmt와 clippy-D warnings),check-no-attribution.py,check-no-workstation-identity.sh,check-harness-ignore-anchor.sh.scripts/check-runtime-gates.sh(verify-cargo.sh test전체,verify-web.sh전체, Herdr pin과 schema 비교)가 이 브랜치에서 종료 코드 0으로 끝났습니다.remote mailbox (ubuntu-latest)가remote_delivery세 개와remote_core스무 개를 모두 돌려 통과했습니다(3m15s). 로컬에서는 각 한두 개만 돌렸습니다.finish단위 테스트가 근거입니다.remote mailbox (macOS), nightly)은 돌리지 않았습니다.