-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Migration plan: Move cmd/query/app code into jaegerquery extension #7800
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
base: main
Are you sure you want to change the base?
Conversation
- Move QueryOptions and UIConfig fields from cmd/query/app/flags.go into cmd/jaeger/internal/extension/jaegerquery/config.go (flattened, not embedded) - Add DefaultConfig() function to create default configuration - Add ToQueryOptions() method to convert Config to legacy QueryOptions for backward compatibility - Move flags_test.go to config_defaults_test.go with updated test names - Update factory.go to use new DefaultConfig() - Update server.go to use ToQueryOptions() for backward compatibility with cmd/query/app - Update server_test.go to use new Config structure directly Co-authored-by: yurishkuro <[email protected]>
Co-authored-by: yurishkuro <[email protected]>
Co-authored-by: yurishkuro <[email protected]>
|
@copilot > Move cmd/query/app/flags_test.go as well. I asked to move the types, not copy them. Move will require some refactoring in cmd/query/app/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7800 +/- ##
=======================================
Coverage 95.35% 95.36%
=======================================
Files 310 310
Lines 16075 16101 +26
=======================================
+ Hits 15329 15355 +26
Misses 578 578
Partials 168 168
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Move types from cmd/query/app/flags.go to new cmd/internal/flags/query.go file. This allows both cmd/query/app and cmd/jaeger/internal/extension/jaegerquery to import the shared types. Changes: - Created cmd/internal/flags/query.go with QueryOptions, UIConfig, and DefaultQueryOptions - Created cmd/internal/flags/query_test.go with test for DefaultQueryOptions - Updated cmd/query/app/flags.go to re-export types from cmd/internal/flags for backward compatibility - Updated cmd/jaeger/internal/extension/jaegerquery/config.go to embed flags.QueryOptions instead of duplicating fields - Deleted cmd/query/app/flags_test.go (moved to cmd/internal/flags/query_test.go) - Deleted cmd/jaeger/internal/extension/jaegerquery/config_defaults_test.go (test now in cmd/internal/flags) - Updated cmd/jaeger/internal/extension/jaegerquery/server_test.go to use flags.QueryOptions Co-authored-by: yurishkuro <[email protected]>
Done. Types moved to |
|
@copilot I don't need a new module cmd/internal/flags/query.go, the types should go into cmd/jaeger/internal/extension/jaegerquery/config.go Using type aliases in the original flags.go file is the right choice. |
I understand you want types in
Could you clarify which approach you'd prefer:
|
|
@copilot ok revert all code changes and instead come up with a plan / roadmap for moving all code from under cmd/query/app into cmd/jaeger/internal/extension/jaegerquery. Find a way to do this in increments, not a big bang move, and propose a logical directory structure. |
Co-authored-by: yurishkuro <[email protected]>
Created detailed migration plan with 8 incremental phases to move all code from cmd/query/app into cmd/jaeger/internal/extension/jaegerquery. Key aspects: - Incremental migration strategy (not big bang) - Proposed logical directory structure - Phase-by-phase breakdown with risks and benefits - Backward compatibility strategy using re-exports - Testing strategy per phase - Timeline estimates (17-23 days) - Success criteria and rollback strategy Each phase is independent and can be executed, tested, and rolled back separately. Co-authored-by: yurishkuro <[email protected]>
Done. All code changes reverted and created comprehensive migration plan in The plan outlines 8 incremental phases to migrate ~6400 lines from
Each phase is independent with its own testing strategy and rollback plan. Backward compatibility maintained via re-export layer. Estimated timeline: 17-23 days. |
This PR provides a comprehensive migration plan for incrementally moving all code from
cmd/query/appintocmd/jaeger/internal/extension/jaegerquery, establishing jaegerquery as the primary home for query service functionality in Jaeger v2.Background
The query service configuration was split between
cmd/jaeger/internal/extension/jaegerqueryandcmd/query/app/flags.go. Initial attempts to consolidate the configuration revealed deeper architectural issues requiring a complete migration strategy.What This PR Contains
Migration Plan Document
Created
MIGRATION_PLAN.mdin the jaegerquery extension directory outlining:Migration Phases Overview
Proposed Target Structure
Key Principles
Current State
All previous code changes have been reverted. The repository is in its original state, ready for the migration to begin phase by phase.
Next Steps
Review the migration plan and approve starting with Phase 1 (Configuration Consolidation), which has the lowest risk and establishes the foundation for subsequent phases.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.