Skip to content

feat(cli): use --node for dora logs node selection#1883

Open
GHX5T-SOL wants to merge 2 commits into
dora-rs:mainfrom
GHX5T-SOL:fix-1880-logs-node-flag
Open

feat(cli): use --node for dora logs node selection#1883
GHX5T-SOL wants to merge 2 commits into
dora-rs:mainfrom
GHX5T-SOL:fix-1880-logs-node-flag

Conversation

@GHX5T-SOL
Copy link
Copy Markdown
Contributor

Fixes #1880

Summary

  • make dora logs node selection explicit with --node/-n
  • reject the old dora logs DATAFLOW NODE shape in parser tests
  • update CLI/logging docs and user-facing hints to show the new form

Validation

  • cargo test -p dora-cli command::tests:: passed: 74 passed, 0 failed, 78 filtered out
  • cargo fmt --all -- --check passed
  • git diff origin/main..HEAD --check passed
  • gitleaks detect --source . --log-opts=origin/main..HEAD --redact --no-banner passed: no leaks found
  • cargo clippy -p dora-cli --all-targets -- -A clippy::unnecessary-sort-by -D warnings passed

Note: strict clippy without the allow currently hits the existing Rust 1.95 clippy::unnecessary_sort_by warning in binaries/coordinator/src/lib.rs:3698, outside this change.

@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented May 20, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@phil-opp
Copy link
Copy Markdown
Collaborator

This is a breaking change, right? Can we perhaps add a hidden positional argument that gives a better error message? E.g. something like 'use the --node argument' instead of just failing with a generic "unexpected argument" error?

There are also some docs that still use the old syntax after this PR, e.g. quickstart.md or the guide. These need to be fixed before merging.

@GHX5T-SOL GHX5T-SOL force-pushed the fix-1880-logs-node-flag branch from 8f941e6 to 17bb016 Compare May 20, 2026 13:25
@GHX5T-SOL
Copy link
Copy Markdown
Contributor Author

GHX5T-SOL commented May 20, 2026

Addressed this in 17bb016a:

  • added a hidden legacy positional node argument so dora logs <dataflow> <node> reaches a targeted runtime hint instead of a clap parse error
  • kept the --node path as the documented node filter
  • updated the stale quickstart and README.zh-CN references

Validation:

  • cargo fmt -p dora-cli -- --check
  • cargo test -p dora-cli command::tests::parse_logs -- --nocapture (6 passed, 0 failed)
  • cargo run -p dora-cli --bin dora -- logs my-dataflow sensor -> reports: "hint: use dora logs my-dataflow --node sensor instead"
  • git diff --check
  • git diff -- binaries/cli/src/command/logs.rs binaries/cli/src/command/mod.rs README.zh-CN.md docs/quickstart.md | gitleaks detect --pipe --redact --no-banner -> no leaks found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): convert dora logs to --node flag + positional dataflow (residual #1059 gap)

2 participants