Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe documentation updates the ChangesDocumentation update
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Other Merge Risk: ⚪ Minimal · up to This documentation-only update does not affect runtime behavior and is safe to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
The command registers an existing data source (source.yaml) into the DM cluster; it does not create the configuration file. The surrounding "Flags description" section already documents create as creating upstream database sources, and config-file as pointing to a pre-existing source.yaml path.
7db470c to
17c7076
Compare
What is changed, added or deleted? (Required)
The usage example said "Use the following `operate-source` command to create a source configuration file", which describes the command backwards. The same document's own "Flags description" section (directly above) already states that `create` "Creates one or more upstream database sources" and that `config-file` "Specifies the file path of `source.yaml`" (an existing, pre-created input file) — i.e. the command registers an existing source file's contents into the DM cluster; it does not create the file.
Playground verification: deployed a live DM cluster (dm-master + dm-worker + dmctl v8.5.3) in a local Docker container and ran `operate-source create ./source.yaml`. No new file was written to disk, and `operate-source show` continued to report the source as registered even after `source.yaml` was deleted — confirming the command registers the source into cluster state rather than creating a file.
Source-code verification: `dm/ctl/master/operate_source.go` (`operateSourceFunc`) calls `common.GetFileContent(arg)` to read the existing `source.yaml`'s bytes, parses it with `config.SourceCfgFromYaml`, and sends the content over gRPC as `OperateSourceRequest{Config: contents, ...}`. The CLI never writes a file — it only reads one and transmits its content to dm-master.
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
operate-sourcecommand to refer to creating a data source.