feat(plugin): resolve connections by id#3139
Conversation
Add a direct connection_id lookup to the plugin HostService API and expose it through HostClient.GetConnectionByID. This keeps config_item_id scoped to scraper-derived connections while allowing plugins attached to MissionControl::Connection items to resolve the underlying connection id through duty's hydrated connection lookup and RBAC checks.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
WalkthroughThis PR adds ID-based connection resolution to the Mission Control plugin system. The proto schema extends ChangesConnection ID-based lookup support
Sequence DiagramsequenceDiagram
participant Plugin
participant hostClient
participant GetConnection
participant getConnectionByID
participant dutyConn
Plugin->>hostClient: GetConnectionByID(ctx, connectionID)
hostClient->>GetConnection: GetConnection(ctx, ConnectionId lookup)
GetConnection->>getConnectionByID: getConnectionByID(ctx, connectionID)
getConnectionByID->>dutyConn: Get(connectionID)
dutyConn-->>getConnectionByID: connection
getConnectionByID-->>GetConnection: ResolvedConnection
GetConnection-->>hostClient: ResolvedConnection
hostClient-->>Plugin: ResolvedConnection
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Add a direct
connection_idlookup to the plugin HostService API.This keeps
config_item_idscoped to scraper-derived connections, while allowing plugins attached toMissionControl::Connectionitems to resolve the underlying connection id.The host implementation uses duty's connection lookup so hydration and RBAC stay centralized.
Summary by CodeRabbit
Release Notes