Skip to content

Block v2 Storage creation - #399

Merged
em3s merged 1 commit into
mainfrom
feat/issue-398-remove-v2-storage-metadata
Jul 11, 2026
Merged

em3s merged 1 commit into
mainfrom
feat/issue-398-remove-v2-storage-metadata

Conversation

@em3s

@em3s em3s commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Block v2 Storage creation. POST /graph/v2/storage/{storage} is removed, so no new Storage can be minted; new labels reference storage via datastore://<namespace>/<table> URIs. Read and update of existing storages stay available. Phase 1 of removing Storage (#398). Breaking change for clients that create storages.

Closes #398

Why create-only is enough

getStorage already resolves both datastore:// URIs and legacy storage names:

fun getStorage(uri: String): StorageEntity? =
    when {
        uri.startsWith("datastore://") -> StorageEntity.empty.copy(type = DATASTORE)  // new labels
        else -> storages[EntityName.fromOrigin(uri)]                                  // existing labels
    }

So blocking creation is sufficient: new labels can only carry datastore:// URIs (first branch), and existing labels keep resolving via the storages map (second branch). The read path is unchanged — hence this PR is 2 files, and :server:test stays green.

Deleting the whole Storage type now would be larger and riskier: it removes the storages source the second branch depends on, forcing a rewrite of the read path and the in-use guard in the same change. Deferring avoids that coupling.

Changes

  • Remove Storage creation (StorageController POST).
  • Keep read (GET), update (PUT), the Storage type, and getStorage as-is — creation is simply unreachable now.

Follow-up (separate PR)

Once doctor confirms no active label references a non-datastore:// storage, the type, its DDL, and the getStorage legacy branch are provably dead and can be deleted mechanically.

How to Test

  • POST /graph/v2/storage/... → no longer routable.
  • Existing labels still materialize; a label with a datastore:// storage works.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Opus 4.8

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Jul 8, 2026
@em3s em3s changed the title feat(server): remove v2 Storage metadata and enforce datastore:// URI Remove v2 Storage metadata and enforce datastore:// URI Jul 8, 2026
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jul 8, 2026
@em3s
em3s force-pushed the feat/issue-398-remove-v2-storage-metadata branch from 6326076 to 0ecfc61 Compare July 9, 2026 08:23
@em3s
em3s changed the base branch from main to feat/disallow-hyphen-in-v3-names July 9, 2026 08:30
Base automatically changed from feat/disallow-hyphen-in-v3-names to main July 11, 2026 04:37
@em3s em3s changed the title Remove v2 Storage metadata and enforce datastore:// URI Block v2 Storage creation (Phase 1 of removal, #398) Jul 11, 2026
Remove the Storage create endpoint (POST /graph/v2/storage/{storage}) so
no new Storage can be minted. New labels reference storage via
datastore:// URIs; read and update of existing storages stay available.

This is Phase 1 of removing the v2 Storage type (#398). Because
GraphDefaults.getStorage already resolves both datastore:// URIs and
legacy storage names, blocking creation alone drains new labels to
datastore:// with no read-path change. The dead Storage type, DDL, and
read branch can be deleted mechanically in a follow-up once `doctor`
confirms no active label references a non-datastore:// storage.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@em3s
em3s force-pushed the feat/issue-398-remove-v2-storage-metadata branch from dfb136e to 279394b Compare July 11, 2026 06:16
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 11, 2026
@em3s em3s changed the title Block v2 Storage creation (Phase 1 of removal, #398) Block v2 Storage creation Jul 11, 2026
@em3s
em3s merged commit 77472c0 into main Jul 11, 2026
2 checks passed
@em3s
em3s deleted the feat/issue-398-remove-v2-storage-metadata branch July 11, 2026 06:32
@em3s em3s self-assigned this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove v2 Storage metadata — enforce datastore:// URI

1 participant