feat: 도메인 소유 축 이관과 레코드 표 신설 - #122
Merged
Merged
Conversation
A domain row has always named a VM, and everything about it was reached through that VM: who may see it, which organisation scopes it, who hears when its name is reclaimed. A name issued on its own has no VM to reach any of that through, so ownership moves to the workspace, which is what the VM was being asked about. The organisation comes with it, held on the row because workspaces carry none — vms and llm_api_keys hold their own for the same reason. vm_id becomes nullable and answers the narrower question of which VM the name serves. An equality constraint ties it to the kind in both directions, so a kind that serves none cannot claim one and a kind that serves one cannot lose it. domain_records is one row per record set, which is the unit the provider takes and therefore the unit that succeeds or fails. Split per value, two rows of one set could disagree about whether the set is in the zone. The generation counter beside it is per domain: an edit changes a domain's set as a whole, and one counter orders those pushes where one per set would let two edits race. The NOT NULL on the two new columns is deliberately absent. A deploy that fails its health window restores the previous release's jar and does not undo the migrations the new one applied, so a NOT NULL column that jar's entity does not know would leave it unable to insert here at all. Tightening belongs to the release after the one that writes them. The admin scope guard now reads the organisation off the domain, which is where the listing beside it already read it; two sources for one decision is a row that lists and then 404s. The VM-scoped guards take a nullable id and refuse it as "no such domain" rather than unboxing it into a 500.
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.
📝 작업내용
vm_id는 「이 이름이 어느 VM을 서빙하는가」로 축소하고 nullable화vm_id를 등가식으로 결속. 서빙하지 않는 종류의 VM 보유와 서빙하는 종류의 VM 상실을 양방향 차단vms와llm_api_keys가 같은 형태Long으로 바꿔 null을 404로 거절. 종전에는 언박싱 NPE로 500domain_records신설. 한 행이 rrset 하나이고 제공자가 받는 단위와 동일renew_due_at추가. EXTERNAL 이름의 연장 기한이고 인덱스에서 REMOVED 제외resource_type에DOMAIN,domain_kind에EXTERNAL추가. 값 전용 파일로 분리⭐️ 검증
💬 리뷰 포인트
rrdatas의text[]채택. 이 스키마의 유일한 배열이고 다른 다치 컬럼은 전부 jsonb이며, 제공자 호출과의 1:1 대응이 근거vmId를 언박싱하는 잔여 세 자리. 라우트 기점 루프 둘과 CUSTOM 조기 반환 검증기라 구조적 도달 불가로 판단