Skip to content

Conversation

@shiyuhang0
Copy link
Collaborator

No description provided.

@shiyuhang0 shiyuhang0 changed the title CLI for cdc CLI for cdc changefeed Jun 12, 2025
Copy link
Contributor

@github-actions github-actions bot left a 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>

@pingcap-cla-assistant
Copy link

pingcap-cla-assistant bot commented Jun 26, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@github-actions github-actions bot left a 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>

Copy link

Copilot AI left a 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 changefeed command 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.

Copy link

Copilot AI left a 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.

@shiyuhang0 shiyuhang0 merged commit 1886dc2 into main Nov 14, 2025
7 checks passed
@shiyuhang0 shiyuhang0 deleted the cdc branch November 14, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants