Repository navigation
feat(api): let a build name the run it retries, and name the used-run-id refusal - #1048
Merged
Merged
Conversation
…ti-user deployment Nothing bounded what one account could upload, and an upload was kept until its owner deleted it. In a multi-user deployment each owner may now hold 50 files and 1 GiB in total - an upload past either is refused with 409 upload_quota_exceeded - and an upload older than 30 days is deleted when the service starts and when its owner next uploads. Three variables override the numbers; 0 turns one off. A single-user deployment applies none. Closes #1045 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-limits # Conflicts: # contract/builder-api.yaml # src/kpubdata_builder/service/app.py
…ry-of # Conflicts: # CHANGELOG.md # contract/builder-api.yaml # src/kpubdata_builder/service/app.py
Collaborator
|
이 풀 리퀘스트의 브랜치를
CI 검사가 모두 통과하면 리뷰를 남기고 병합합니다. |
yeongseon
approved these changes
Oct 6, 2026
yeongseon
left a comment
Collaborator
There was a problem hiding this comment.
diff 를 읽었고 CLEAN 이라 승인합니다. kpubdata#812 의 "새 시도는 앞선 시도를 retry_of 로 가리킨다" 그대로이고, #1043 리뷰에서 제안한 run_id_ended 코드도 함께 들어왔습니다.
- 가리키는 run 은 호출자가 읽을 수 있는 run 이어야 한다 — 아니면 그 run 을 읽을 때 받는 답을 그대로 받습니다. 링크가 다시 보이는 값이라 이름을 대 보는 것이 그 run 에 대해 묻는 방법이 되면 안 된다는 판단이 맞고, 다른 사용자의 run 을 가리켰을 때와 없는 run 을 가리켰을 때가 같은 404 라는 테스트가 있습니다.
- 값이 세 곳(레지스트리, 매니페스트, 제출 기록)에 남아 재기동·eviction 뒤에도 같은 값으로 읽힙니다. 재기동한 서비스의 상태 조회까지 테스트합니다.
- 이벤트 저장소는 컬럼 하나를 더할 뿐이고, 컬럼이 없던 저장소를 다시 열면 기존 행이 남는다는 테스트가 있습니다.
retry_of가 있을 때만 인자를 넘기는 것(functools.partial)은build를 재정의한 하위 클래스를 깨뜨리지 않기 위한 것이라는 설명을 받아들입니다.
"하지 않는 것" 으로 남긴 둘 — 아직 도는 run 을 가리킬 수 있다, 한 run 을 가리키는 재시도가 여럿일 수 있다 — 은 막을 이유가 없어 그대로 둡니다. Studio 가 재시도 때 retry_of 를 보내는 것은 Studio 이슈로 따로 올려 주세요.
머지 순서 확인: 선행인 kpubdata-studio#756 이 main 에 있습니다. 머지 뒤 Studio main 의 CI 를 다시 돌려 drift 를 확인하겠습니다.
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 #1042 — 2부(
retry_of). 1부(재사용 거절)는 #1043.무엇을
kpubdata#812 §3: "새 시도는 앞선 시도를
retry_of로 가리킨다". #1043 리뷰의 후속 제안(거절 본문에run_id_ended코드)도 함께 넣었다. 이슈 Notes 에 적은 제안 그대로다 — 그 제안에 답을 받지는 못했고, #1043 리뷰가 "retry_of를 올릴 때"라고 한 것을 진행 신호로 읽었다. 기록 위치가 다르길 원하시면 여기서 바꾸면 된다.POST /build,POST /builds의 본문에 선택 필드retry_of(경로 안전한 run id;null은 없는 것과 같다).retry_of, 있을 때만 — 기존 매니페스트는 그대로), 제출 기록(run_submissions.retry_of, 컬럼 추가), 작업 스냅샷.GET /builds/{run_id}의BuildJob.retry_of. 레지스트리가 들고 있을 때도, 매니페스트에서 읽을 때도(재기동·eviction 뒤), 이벤트에서 읽을 때도(중단된 run) 같은 값이다.run_id_ended: 이미 끝난 run id 의 거절 본문에code를 넣고, 두 라우트에 이름 붙은 예시RunIdEnded를 더했다.호환성 — 하나 짚어 둘 것
BuilderService.build를 재정의한 하위 클래스가 있다(테스트에 12곳). 새 인자를 항상 넘기면 그것들이TypeError로 깨진다 — 실제로 깨졌다(12 failed). 그래서retry_of가 있을 때만 인자를 넘긴다(functools.partial). 재정의된build는 재시도가 아닌 모든 요청에서 전처럼 돈다.이벤트 저장소는 컬럼 하나를
ALTER TABLE … ADD COLUMN으로 더한다. 행은 건드리지 않고, 예전 저장소의 행은retry_of가 NULL 로 읽힌다.테스트 (
tests/unit/test_interrupted_run_status.py)retry_of를 말한다. 앞선 시도는 끝난 그대로다.null은 없는 것과 같다.code: run_id_ended(기존 테스트의 기대 본문을 고쳤다).검증
pytest tests/unit→4387 passed, 9 skipped(feat(uploads): per-user file count, total size and retention in a multi-user deployment #1046 을 합치기 전). 합친 뒤 계약·재시도·업로드·작업 5개 파일 →525 passed. 합친 뒤 전체 스위트는 다시 돌리지 않았다 — CI 에 맡긴다.check_contract_compat.py --base feat/issue-1045-upload-limits→contract compatible …: 1.84.0 -> 1.85.0.contractDrift.test.ts를 Builder 의 세 계약으로: 1.83.0577 passed, 1.84.0577 passed, 1.85.0(이 브랜치)579 passed.ruff,mypy src통과.# type: ignore없음.이 PR 이 하지 않는 것
retry_of로 가리킬 수 있다. 막을 이유를 결정 기록에서 찾지 못해 두었다.retry_of를 보내는 것 — Studio 쪽 변경이고 따로 이슈가 필요하다.🤖 Generated with Claude Code