-
Notifications
You must be signed in to change notification settings - Fork 6.2k
improve(go.d/sd/pipeline): add services config
#21269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new single-step "services" configuration format that simplifies service discovery by combining the legacy two-step "classify" and "compose" mechanisms into one. The services engine directly matches targets and generates configurations without an intermediate classification step.
Key changes:
- Added
ServiceRuleConfigandserviceEnginesupporting direct target-to-config transformation - Refactored pipeline to conditionally use either services or legacy path based on configuration
- Included conversion utility (
ConvertOldToServices) to migrate from old format to new
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| config.go | Adds ServiceRuleConfig struct, validation, and conversion function from legacy format |
| services.go | New service engine implementation with template-based matching and config generation |
| services_test.go | Unit tests for service engine covering match rules, config templates, and edge cases |
| pipeline.go | Updated to support both services and legacy paths with conditional initialization |
| sim_test.go | Test helper updated to support services-only mode with flag and path branching |
| pipeline_test.go | Integration tests for services mode and conversion function |
| compose.go | Extracted parseConfigTemplateData to be shared between composer and service engine |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR introduces a new, simplified configuration format for the service discovery pipeline — the
servicesblock — which unifies the existingclassifyandcomposesteps into a single, declarative phase.Example:
This replaces:
Summary
Test Plan
Additional Information
For users: How does this change affect me?