Repository navigation
fix(otel): remove project placements in the project deletion transaction - #74
Merged
Merged
Conversation
ubaidkhalidarbisoft
approved these changes
Sep 29, 2026
4 tasks done
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
Ports the transactional project deletion hook from apache#9091 and uses it in the Claude Code OTel plugin, so a deleted project's OTel placements are always removed with it. Previously a project linked to a revoked and hidden OTel connection could be deleted while its placement row was left behind.
Why placements could be left behind
Placements were cleaned up by the Config UI after the project was deleted, and only for connections the project page could see. Hidden connections are excluded from that lookup, so for a project whose only connection was revoked and hidden, the UI skipped both the preflight and the cleanup:
Project deletion hook (from apache#9091)
plugin.ProjectDeleteHookinterface.BeforeDeleteProjectruns inside the core deletion transaction, before the project's records are deleted. Returning an error aborts the deletion and rolls everything back.DeleteProjectnow deletes the blueprint in the same transaction, instead of committing it separately first. A failure later in the deletion no longer leaves a project without its blueprint.BlueprintManager.DeleteBlueprintInTransactiondoes the blueprint deletion using the caller's transaction.DeleteBlueprintuses it and still owns its own transaction.TimeAftercutoff, and deleting a project still removes itsuser_project_mappingrows, now inside the same transaction.Claude Code OTel
DELETE /plugins/claude_otel/projects/:projectName/placementsendpoint and its service function, which only the old UI cleanup used.AI Throughput Overview: defect coverage
Test plan
user_project_mappingrows are still removed on deletion.Notes for reviewers