feat: 노출 식별자를 UUID로 전환 - #28
Merged
Merged
Conversation
The scope segment was matched with /^\\d+$/ and parsed with Number(), so a UUID scope fell through as no scope at all: /console/<uuid>/vms rendered the unscoped list with no error. Both now test the UUID shape, which a section name can never look like.
Every identifier crossing the API boundary is a UUID in contract v0.38.0. The 92 id-typed parameters here become strings; page, size and the day counts stay numbers.
Number(params.vmId) on a UUID is NaN, which TypeScript still calls a number: the query fired with NaN and the page rendered blank rather than failing. Each page now passes the segment through and guards its shape, so a malformed address says so instead of showing an empty screen.
A <select> value is always a string, so Number(event.target.value) on a UUID gave NaN. In the capacity trend that NaN serialized to null in the query key and collided with the all-orgs cache entry.
orgs.slug is gone from contract v0.38.0, along with the ORG_SLUG_DUPLICATE error code. The org is identified by its UUID now.
The stored wizard draft was restored with a bare spread, so a draft written while ids were numbers would put numbers straight into the POST body. The shape is checked on load now and an incompatible draft is dropped whole.
Row selection, cross-page filter links and the approve form all held ids as numbers. The approve form's node field becomes a UUID input, and the node and image labels drop the '#id' suffix that a UUID makes unreadable.
Labels built as "신청 #$id" or "VM #$id" read as a short number a person could quote. A UUID tells the reader nothing, so the headings name the screen and the name fallbacks say the row is unknown.
Fixtures cross-reference each other by id, so uuid(n) maps the old integers onto UUIDs and keeps every reference intact; the padding also keeps the "newest first" sorts in their old order. The metrics handler's two magic VMs become named constants shared with the tests that assert what they produce. Numeric object keys were the quiet failure here: Record<string, T> accepts them, so the access-grant and event stores kept compiling while every lookup missed.
The scope regex fails silently: a URL that is read as unscoped still renders a page, so these assert the built path rather than what appears on screen.
The membership row was the last identifier the api still sent as the internal bigint; it is a UUID now, so the fixtures and the cross-link test that had to work around it go back to the normal shape.
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.
📝 작업내용
⭐️ 검증
💬 리뷰 포인트