Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 39763881720Coverage remained the same at 55.652%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
Sandbox run: a local Frontier server with Postgres and SpiceDB in Docker, called over the Connect protocol. The binary was built from #2014 with #2011 applied, so it has main plus #2008, #2011, #2013 and #2014. Deletion config used (for the projects with resources): app:
deletion:
enabled: true
resources:
resource/aoi: { project: block, organization: allow }
resource/workflow: { project: block, organization: allow }
resource/orderitem: { project: block_unless_deletable, organization: block_unless_deletable }
resource/insight: { project: allow, organization: allow }
|
| Check | Expected | Observed |
|---|---|---|
| Delete an empty project | 1 | 1 |
| Delete a project after its blocking resources were deleted | 1 | 1 |
| Delete a disabled project holding an insight | 1 | 1 |
| Delete an org with two projects, one disabled: events per project | 1, 1 | 1, 1 |
The project.deleted audit records for the same deletes were written as before:
| Check | Expected | Observed |
|---|---|---|
Delete an empty project: project.deleted audit records |
1 | 1 |
| Delete an org with two projects: audit records per project | 1, 1 | 1, 1 |
9b57ea6 to
54f916c
Compare
7f56a17 to
8a77632
Compare
The project delete now publishes app.project.deleted once the project row is deleted, for the DeleteProject RPC and for each project an org delete removes. A project that was already gone publishes nothing.
8a77632 to
1cdfbdc
Compare
Summary
The project delete now publishes the
app.project.deletedevent. The event name already existed and is offered as a webhook event, but nothing published it; project created, updated, and member events were already published. It goes out once the project row is deleted, for theDeleteProjectRPC and for each project an organization delete removes, the same way the organization delete publishesapp.organization.deleted. Stacked on #2013.Changes
core/deleter/service.go: afterDeleteModel,deleteProjectpublishesapp.project.deletedwith the project as the target and the project's organization. A project that was already gone returns without an event. A failure to publish is logged and does not fail the delete.Test Plan
core/deleter/service_test.goTestDeleteProject: a delete publishes oneapp.project.deletedevent with the project's organization and the project as the target; a project that was already gone publishes nothing.TestProjectDeleteKeepsTheRowAndRemovesAccess: oneapp.project.deletedevent for the project after the delete.TestOrganizationDeleteAlsoDeletesDisabledProjectsAndGroups: oneapp.project.deletedevent for each project of the deleted organization, the disabled one included.go test ./core/... ./internal/api/... ./pkg/server/...passes.TestEndToEndAPIRegressionTestSuite,TestEndToEndServiceUsersRegressionTestSuiteandTestEndToEndPATRegressionTestSuitepass.golangci-lint run ./core/deleter/... ./test/e2e/regression/...reports no issues.