Repository navigation
feat(projects): delete Openship-managed DNS records on project delete - #1887
Open
Raphael-Penning wants to merge 1 commit into
Open
Raphael-Penning wants to merge 1 commit into
Raphael-Penning wants to merge 1 commit into
Conversation
Deleting a project dropped its domain rows via FK cascade but left the DNS records Openship auto-created (Cloudflare / DigitalOcean) in the zone. Project teardown now releases them, reusing the same `releaseRecords` path as single-domain removal, so only records carrying the Openship ownership marker are deleted. - New `deleteDnsRecords` delete option (API default true), skipped for record-only deletes; records are released only after the row drops, and a provider failure is reported as a `dns_records` step without blocking the delete. - Deletion preview lists the project's custom domains; the dashboard delete modal shows them with a default-on checkbox. Closes oblien#1886
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.
Closes #1886
Problem
Deleting a project removed its domain rows (FK cascade) but left the DNS records Openship auto-created through a connected DNS provider (Cloudflare / DigitalOcean) in the zone.
Change
dns_recordsstep. It reads the project's domain hostnames before the row drops. After the row is deleted, it callsreleaseRecordsfor each hostname, covering<host>and_openship-challenge.<host>. This is the same path single-domain removal uses, so it deletes only records that carry the "Managed by Openship" marker. The operator's own MX, SPF and CAA records at the apex are never touched.deleteDnsRecordsflag onDELETE /projects/:id, accepted in the query or the body. It defaults totrue. InternalteardownProjectcallers (PR previews, transfer) default tofalse.customDomains.Tests
project-delete-options.test.ts: covers the default (true) and opting out via the body and the query.project-teardown.record-only.test.ts: new DNS cases:project-delete.controller.test.ts: expectation updated.