-
Notifications
You must be signed in to change notification settings - Fork 3
CLI for cdc changefeed #283
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.
license-eye has checked 694 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 187 | 1 | 506 | 0 |
Click to see the invalid file list
- internal/cli/serverless/changefeed/template.go
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
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.
license-eye has checked 727 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 196 | 1 | 530 | 0 |
Click to see the invalid file list
- internal/cli/serverless/changefeed/ui.go
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
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 pull request adds comprehensive CLI support for managing CDC (Change Data Capture) changefeeds in TiDB Cloud Serverless clusters.
Key Changes:
- Added new
changefeedcommand with CRUD operations (create, list, describe, edit, delete) - Implemented pause/resume functionality for changefeeds
- Added template command to help users with JSON configuration
- Integrated CDC API client methods into the existing client infrastructure
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/service/cloud/logic.go | Added Changefeed struct and GetSelectedChangefeed function for interactive changefeed selection |
| internal/service/cloud/api_client.go | Added CDC API client integration and implemented all changefeed-related API methods (create, delete, edit, get, list, start, stop, test, describe schema) |
| internal/mock/api_client.go | Added mock implementations for all new CDC API methods to support testing |
| internal/flag/flag.go | Defined new flag constants for changefeed operations (type, name, kafka, mysql, filter, start-tso, id, explain, template type) |
| internal/cli/serverless/cluster.go | Integrated changefeed command into the serverless cluster command structure |
| internal/cli/serverless/changefeed/ui.go | Created UI helper functions for interactive changefeed type selection and input descriptions for Kafka and MySQL configurations |
| internal/cli/serverless/changefeed/template.go | Implemented template command to display JSON configuration examples for Kafka, MySQL, and filter setups |
| internal/cli/serverless/changefeed/resume.go | Implemented resume command to restart paused changefeeds |
| internal/cli/serverless/changefeed/pause.go | Implemented pause command to stop running changefeeds |
| internal/cli/serverless/changefeed/list.go | Implemented list command to display all changefeeds with support for JSON and human-readable output |
| internal/cli/serverless/changefeed/edit.go | Implemented edit command to update changefeed configurations (name, kafka/mysql info, filter) |
| internal/cli/serverless/changefeed/describe.go | Implemented describe command to show detailed changefeed information |
| internal/cli/serverless/changefeed/delete.go | Implemented delete command with confirmation prompt for safe changefeed removal |
| internal/cli/serverless/changefeed/create.go | Implemented create command supporting both Kafka and MySQL sink types with optional start TSO |
| internal/cli/serverless/changefeed/changefeed.go | Main changefeed command entry point that organizes all subcommands |
💡 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 27 out of 27 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.