perf: cache hosting verification calls#56
Merged
Conversation
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.
Summary
wt list --verify-hosting텍스트 모드에서 hosting note 생성과 row 출력이 같은 hosting 검증을 중복 실행하던 흐름을 제거했습니다.(provider, branch, baseRef)별 1회만 실행되도록 했습니다.wt cleanup --json도 같은 cache를 사용해 동일 branch가 여러 worktree에 나타날 때 repeated hosting lookup을 줄입니다.User impact
hostingChangeURL, legacyhostingChangeUrl,hostingReason,mergedViaHosting를 유지합니다.gh auth status/glab auth status와gh pr list/glab api외부 호출 횟수가 줄어드는 것입니다.Behavior
wt list --verify-hosting텍스트 출력은 worktree별 verify 결과를 한 번 계산한 뒤 note와 row 출력에서 재사용합니다.(provider, branch, baseRef)hosting merge query 결과를 재사용합니다.Safety
Tests
make fmt완료, exit code 0, stdout/stderr 없음.make test완료, exit code 0, 전체 Go package 테스트 통과.make check완료, exit code 0, stdout/stderr 없음.make premerge완료, exit code 0, 전체 Go package 테스트 통과.E2E guide
현재 repo 기준:
wt run perf/hosting-verify-cache -- make test wt run perf/hosting-verify-cache -- make check wt run perf/hosting-verify-cache -- make premerge호출 횟수 회귀는 fake runner 기반 테스트로 재현합니다.
E2E Done
wt run perf/hosting-verify-cache -- make testcmd/wt,internal/git,internal/hosting,internal/worktree테스트 통과wt run perf/hosting-verify-cache -- make checkwt run perf/hosting-verify-cache -- make premergeDocs