Repository navigation
Delete a namespace and everything it owns, like PHP - #678
Merged
Merged
Conversation
DELETE /api/namespaces/{namespace} (dw namespace:delete, the SDK's
deleteNamespace) follows PHP's NamespaceController::destroy over
NamespaceLifecycleCleanup. One transaction deletes the namespace's rows
in PHP's order, matching each table by the run, instance or namespace
columns the verified schema has, and reports each table's non-zero
count under PHP's keys. Native also clears its own poll receipts and
worker incarnations for the namespace. A missing namespace answers PHP's
404 namespace_not_found; deleting needs an admin, like updating.
Native does not delete external payload objects yet, so a namespace that
still references one refuses with PHP's 503
external_payload_storage_driver_unavailable before changing anything.
The new reviewed namespace-delete fixture runs through the unchanged
published PHP SDK: one search attribute definition and one started run,
the exact counts published PHP 2.5.14 reports, the 404s afterwards, the
SDK's typed refusal of a second delete, an untouched run elsewhere and
the freed workflow ID. PHP's asynchronously filled timeline, timer and
lineage projections may be counted. Embedded has no HTTP namespaces.
Every runtime module repeated the same fifteen-line bound list on its Store impl, which Sonar counts as duplicated new code. store_methods! holds the list; namespace cleanup uses it.
|
Member
Author
|
Merged into the #675 train at |
12 tasks
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.



Native now serves
DELETE /api/namespaces/{namespace}, whichdw namespace:deleteand the published SDK'sdeleteNamespacecall. It follows published PHP'sNamespaceController::destroyoverNamespaceLifecycleCleanup.Behavior
200 {name, status: "deleted", deleted}, with each table's non-zero count under PHP's keys.404 namespace_not_found(Namespace [name] not found.).503 external_payload_storage_driver_unavailableand changes nothing.Fixture first. The new reviewed
namespace-deletefixture uses the unchanged published PHP SDK. The namespace holds one search attribute definition and one started, unclaimed run. The fixture checks:ServerException404 for the SDK's own second delete;PHP fills its timeline, timer and lineage projections asynchronously, so those counts may be absent or positive. Embedded declares HTTP namespaces inapplicable.
Evidence
checkNamespaceDeleteaccepted the observation. Those counts are the fixture's expected values.ServerParityNamespaceDeleteContractTest.mjspasses 18/18: the PHP observation, counted projections and embedded pass, and 15 mutations are refused.--all-targetspasses: 228 unit tests and 396 execution tests.Refs #325.