Add Slack org lifecycle notifications#907
Open
fuziontech wants to merge 1 commit into
Open
Conversation
Test Impact PlanDeterministic summary of how this PR changes tests, CI runners, and coverage-risk signals. Summary
Signals
Coverage risk: neutral or increased No coverage-reduction warnings detected. |
8e639ad to
625f80b
Compare
625f80b to
87621de
Compare
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.
Summary
Adds optional Slack operational notifications for org and managed-warehouse lifecycle events.
org_createdonly when an org row is newly inserted,org_deletedon successful admin deletion, plus warehouse provision/deprovision lifecycle notifications.DUCKGRES_NOTIFICATION_HASH_KEYto include a stable HMAC org reference for Slack-side correlation.Claude review follow-up
Ran Claude Code review with Sonnet. It found no blocking correctness or data-leak bugs. I addressed the non-blocking gaps it raised:
org_deletednotifications for successful admin deletes.duckgres_notifications_dropped_totalandduckgres_notification_delivery_failures_total.Final self-review follow-up
DUCKGRES_NOTIFICATION_HASH_KEY.Validation
go test ./internal/notifications ./controlplane/provisioninggo test ./internal/notifications ./internal/cliboot ./controlplane/provisioninggo test -tags kubernetes ./controlplane/provisionergo test -tags kubernetes ./controlplane/admin -run 'TestCreateOrg|TestRegisterAPI|TestCreateUser|TestListOrgs'go test -tags kubernetes ./controlplane/admin -run 'TestDeleteOrgRejectsWhenWarehouseStillExists|TestDeleteOrgSucceedsAfterWarehouseRemoved|TestDeleteOrgCascadesDeletedWarehouse$'just test-unitjust lintNote:
go test -tags kubernetes ./controlplane/adminstill reaches existing Postgres-container tests and fails locally because the container cannot start in this environment; narrowed admin handler tests pass.just lintinitially exposed a local tooling issue because the installedgolangci-lintbinary was built with Go 1.25 and panicked on Go 1.26 files. I rebuilt the samegolangci-lintv2.8.0 with local Go 1.26.4, then lint passed.