Skip to content

Delete extensions without implicit cleanup - #67

Open
IlyaasK wants to merge 1 commit into
hypeship/extension-read-frameworkfrom
hypeship/extension-delete-core
Open

Delete extensions without implicit cleanup#67
IlyaasK wants to merge 1 commit into
hypeship/extension-read-frameworkfrom
hypeship/extension-delete-core

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • delete extensions by canonical state ID and recorded project scope
  • treat coded extension not_found as converged success
  • recognize only the API's HTTP 400 resource_in_use dependency contract
  • direct operators to remove durable browser-pool references
  • preserve generic 400/404, project, and transport failures as diagnostics
  • validate state before mutation and perform no force or runtime cleanup

Why this is v1 work

This is the pure Delete core needed before Framework Delete and complete resource registration.

Intentionally unsupported

  • no Framework Delete adapter or resource registration
  • no force delete, implicit pool mutation, or runtime cleanup
  • no browser/session operation

Verification

gofmt -l cmd internal, go test -count=20 ./internal/resources/extension, extension race tests, full short tests, go vet ./..., go mod tidy -diff, and git diff --check all passed. Tests use a fake client and no network/container.

Acceptance status

No registered complete resource exists yet, so live acceptance testing is not applicable.

Remaining risk

Delete remains blocked while durable browser pools reference the extension. Terraform intentionally does not alter those dependencies implicitly.


Note

Low Risk
New isolated delete helper and tests only; no Framework registration or live resource wiring yet, with explicit non-mutation of browser pools on dependency errors.

Overview
Adds the extension delete core (deleteExtension) that the Terraform resource will call later: it deletes by state id and project_id, validates state before any API call, and maps API outcomes to diagnostics.

Idempotent delete: coded not_found responses are treated as success via projectscope.IsNotFound. Dependency blocking: only HTTP 400 bodies with resource_in_use are recognized as “in use”; operators get a message to remove durable browser pool references, with no implicit pool or runtime cleanup.

Other failures (generic 400/404, transport, missing client) surface as normal delete errors. Unit tests cover scope/identity, not-found success, in-use messaging, error classification, and pre-call state validation.

Reviewed by Cursor Bugbot for commit cb4e287. Bugbot is set up for automated code reviews on this repo. Configure here.

@IlyaasK
IlyaasK requested review from Sayan- and tnsardesai and removed request for Sayan- and tnsardesai July 11, 2026 06:57
@IlyaasK
IlyaasK force-pushed the hypeship/extension-read-framework branch from a789f61 to 992dde3 Compare July 13, 2026 13:34
@IlyaasK
IlyaasK force-pushed the hypeship/extension-delete-core branch 2 times, most recently from 33d82ee to d60c9e5 Compare July 13, 2026 14:32
@IlyaasK
IlyaasK force-pushed the hypeship/extension-read-framework branch 2 times, most recently from ca7698d to 768706f Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/extension-delete-core branch from d60c9e5 to 1ed2fbb Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/extension-delete-core branch from 1ed2fbb to a5debe6 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/extension-read-framework branch from 1cbbde5 to bb43138 Compare July 21, 2026 14:46
@IlyaasK
IlyaasK force-pushed the hypeship/extension-delete-core branch 2 times, most recently from 25f8375 to c7cd2bc Compare July 21, 2026 18:10
@IlyaasK
IlyaasK force-pushed the hypeship/extension-read-framework branch from 55234ad to 83939e3 Compare July 21, 2026 19:51
@IlyaasK
IlyaasK force-pushed the hypeship/extension-delete-core branch from c7cd2bc to 1f105b7 Compare July 21, 2026 19:51
@IlyaasK
IlyaasK force-pushed the hypeship/extension-delete-core branch from 1f105b7 to cb4e287 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/extension-read-framework branch from 83939e3 to d503c89 Compare July 21, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant