Repository navigation
fix: order what the device link tests race on - #2220
Merged
Merged
Conversation
A test's own sshd chose its port by binding port 0 and letting it go, and reported itself ready when any listener answered on that port. Another test's sshd took the port first, the test's sshd exited with "Address already in use", and the daemon signed in to the other server and stopped at host_key_changed (with-hide/hide-private#210). A server is now ready only when its own log says it listens, and one that lost the bind is started again on another port. The device pane asker asked the node for a credential as soon as its program started, before the holder wrote the pane's record as running, and was refused once with no retry (#503). The test now releases the asker after the node's proof of the pane, and a failed wait shows the asker's screen. The node's caller cap probe wrote its request to a connection the node had already answered and ended (#149), and the setup renderer's receipt wait gave up after 64 frames of a busy daemon (#294); one now only listens, the other waits by time. The remote hook's miss and the relay's non-binary frame (#173, #457) now say which stage ran out and which message arrived. The remote mailbox lane can be repeated by hand on a branch (repeat input).
The test sshd's log is appended to across restarts, so a restart took the first start's listening line for its own and returned before the server bound the port. A start now reads only what its own server wrote, and a restart that lost its port says so. A repetition run takes no retries, so one failure fails the job.
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 with-hide/hide-private#210
Closes with-hide/hide-private#503
Closes with-hide/hide-private#149
Closes with-hide/hide-private#294
Related: with-hide/hide-private#718 #719 (제품 쪽 후속), #173 (hook 시간 초과는 원인 미확정, 진단만 추가), #457 (relay, 진단만 추가), #339 #398 (WSL, 이슈에 원인과 남은 일을 적음)
Summary
기기 연결 테스트가 가끔 실패하던 원인 넷을 고쳤습니다. 제품 코드는 바뀌지 않고 테스트 보조 코드와 CI 입구만 바뀝니다.
host_key_changed로 끝났습니다. 이제 자기 sshd가 "listening"을 로그에 쓸 때까지 기다리고, 포트를 잃었으면 다른 포트로 다시 시작합니다.running으로 쓰기 전에 물어서 한 번 거절당했습니다. 테스트가 노드의 증명을 확인한 뒤에 풀어 주게 순서를 고정했습니다.133b05fe9가 이미 고쳤고, 남은 BrokenPipe는 상한 확인용 연결이 이미 닫힌 연결에 요청을 쓰던 테스트 경쟁이라 듣기만 하게 바꿨습니다.gh workflow run remote-mailbox.yml --ref <branch> -f repeat=10.Review
판단해 주세요: 반복 실행을 새 workflow가 아니라
remote-mailbox.yml의workflow_dispatch+repeat입력으로 둔 것.test_vt_cache.py가 vt-cache 사용 workflow 목록을 고정해서 새 파일은 정책 검사에 걸립니다.조심해서 볼 파일:
hided/tests/it/support/sshd.rs- 준비 판정을 연결 성공에서 자기 로그의 "Server listening ... port N."으로 바꾼 곳(macOS sshd로 문구 확인). 재시작(online(false)뒤online(true))은 로그가 이어 쓰이므로 spawn 뒤에 쓰인 부분만 읽고, 같은 포트를 잃으면 이유를 말하며 실패합니다.system_ssh에 이 경로를 확인하는 시험을 더했습니다.조심해서 볼 파일:
hided/tests/it/device_own_engine.rs- asker가 파일이 생길 때까지 기다리는 셸 반복. 상태를 기다리는 것이고 시간을 기다리지 않습니다.질문: #173의 11월 7일 실패는 hook이 제품 예산(
INTAKE_BUDGET1.65초) 안에 답을 못 받은 것입니다. 부하 때문에 예산을 못 지키는 경우를 테스트가 어떻게 다룰지(병렬도를 줄일지) 정하지 못해 이번엔 진단만 넣었습니다.후속 이슈: #149의 남은 틈(노드가 연결을 닫은 뒤에 자리를 돌려주는 것)은 제품 쪽이라 #718에, #503의 제품 쪽 경쟁(holder 기록이 Running이 되기 전의 첫
hide호출 거절)은 #719에 적었습니다. 테스트 쪽 원인은 이 PR이 고쳤습니다.반복 실행은
--retries 0으로 돌아, 한 번의 실패가 job의 실패입니다.Evidence
cargo check와clippy -D warnings(hided, hide-relay 테스트)가 통과합니다. 포트 충돌 메시지(Bind to port N on 127.0.0.1 failed: Address already in use)와 listening 문구는 이 Mac의 sshd에서 직접 확인했습니다.Address already in use와 데몬의host_key_changed가 함께 있는 것으로 확인했습니다.hide-holder/src/holder.rs의 spawn 뒤running기록 사이). 실패한 CI에는 asker 화면이 없었고, 이번 변경이 다음 실패 때 그 화면을 남깁니다.repeat=10으로 돌려 10회 모두 통과했고(33개 x 10, 재시도 0번,FLAKY줄 없음) https://github.com/with-hide/hide/actions/runs/42386421651 에서 볼 수 있습니다.--retries 0으로 다시repeat=10을 돌려 10회 모두 통과했습니다(33개 x 10,no flaky test) https://github.com/with-hide/hide/actions/runs/42429757957