Repository navigation
Conversation
기존에는 history 엔드포인트가 getPackageHistory로 전체 릴리즈를 조회(전건 presigned 서명 + diff 서브쿼리)한 뒤 메모리에서 뒤집어 슬라이스했다. 릴리즈 수백 건이면 cold isolate 캐시 미스마다 그만큼 낭비되므로, 관리용 전용 getPackageHistoryPage(LIMIT/OFFSET + COUNT, 서명·diff 생략, 무캐시)를 추가하고 핸들러만 교체한다. OTA(updateCheck)·롤백·중복검사·release.update가 공유하는 getPackageHistory 계약은 미변경. 응답 shape·기본값·정렬 동일. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks done
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.
요약
배경
getPackageHistory(전체 릴리즈 조회)를 호출한 뒤 메모리에서reverse().slice()로 잘라냈다.getPackageHistory는 조회한 모든 패키지에 presigned URL 서명 + diff 서브쿼리를 수행하고, 캐시는 isolate 메모리(5분)라 cold miss가 흔하다 → 릴리즈 677건 기준, 20개를 반환하려고 677건 전부를 서명·조회하는 구조.blobUrl·diffPackageMap을 사용하지 않음. 상세: FE-68 스펙의 사이드 이펙트 감사.변경 사항
storage/d1.ts— 신규getPackageHistoryPage(deploymentId, page, pageSize)LIMIT/OFFSET+ORDER BY uploadTime DESC, uploadTime 동률 대비 label 숫자 캐스팅(CAST(substr(label,2) AS INTEGER)) 보조 정렬 ("v10" < "v2" 문자열 비교 문제 회피)COUNT쿼리는 본 쿼리와 동일한deletedAt IS NULL필터 공유blobUrl/manifestBlobUrl은""(스키마가 required string, 소비자 전원 미사용 확인)mapPackageFromDB재사용 → 필드 구성 기존과 동일routes/management.ts— history 핸들러 교체getPackageHistory(전체) →slice().reverse().slice()getPackageHistoryPage호출. 응답 shape({ history, totalCount, page, pageSize })·기본값(page=1/pageSize=20)·최신순 정렬 모두 불변storage/storage.ts변경하지 않은 것 (의도적)
getPackageHistory본체 — OTA(updateCheck)·rollback·release.update(label 검색)·release.create(중복검사/diff 생성)가 "전체·오름차순·diff·presigned·캐시" 계약을 공유하므로 그대로 둠. updateCheck의 전체 조회 비효율은 핫패스라 별도 티켓으로 분리.테스트
page=2&pageSize=5→ v672→v668 / 범위 밖page=100→ 빈 배열 + totalCount 유지/updateCheck호출 → v677 + downloadURL 정상참고
blobUrl/manifestBlobUrl이 presigned URL → 빈 문자열로 바뀜. 웹·CLI·앱 스크립트 모두 미사용 확인했으나, 혹시 이 필드를 쓰는 외부 소비자가 더 있다면 머지 전에 짚어야 함.develop(main 직행 → develop 경유로 전환). main push 시 Workers Builds가 서버를 자동 배포하므로, develop 머지 시점에는 배포되지 않음.🤖 Generated with Claude Code