You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "det101 (via GitHub)" <gi...@apache.org> on 2026/09/29 03:35:18 UTC
[PR] [Improve][CLI] Add opt-in --debug pipeline diagnostics [seatunnel]
det101 opened a new pull request, #12545:
URL: https://github.com/apache/seatunnel/pull/12545
## Summary
- Add `--debug` / `SEATUNNEL_CLI_DEBUG=1` for opt-in agent pipeline diagnostics (`start` → `planner` → `skill` → `metadata` → `generator` → `validator` → `fix` → `dryrun` → `result`)
- Soft failures now include a short reason (e.g. `no_hocon_block`) and a hint to re-run with `--debug`
- On failure, print redacted truncated local/LLM validator details; default interactive behavior stays quiet
- Document the flag/env in en/zh README; add unit tests
Closes #12544
## Test plan
- [x] `cd seatunnel-cli && python3 -m pytest tests/test_debug_diagnostics.py -q`
- [ ] Manual: `seatunnel --debug` then trigger a soft failure / validator loop and confirm stage lines + `validator_detail` appear without leaking secrets
- [ ] Manual: without `--debug`, confirm normal UX is unchanged aside from clearer soft-fail reason text
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][CLI] Add opt-in --debug pipeline diagnostics [seatunnel]
Posted by "det101 (via GitHub)" <gi...@apache.org>.
det101 commented on PR #12545:
URL: https://github.com/apache/seatunnel/pull/12545#issuecomment-6116165612
Thanks @DanielLeens. Pushed a follow-up that covers the remaining items and is rebased onto current `dev`:
1. **High — prefixed credential keys.** `CRED_KV_RE` / the unquoted matcher now use `(?<![A-Za-z0-9])`, so `jdbc_password`, `s3_secret_key`, `access_token`, `truststore_password` and `api_token` are swapped before the LLM call and redacted in debug output. `${...}` placeholders are still left intact. Covered by redaction and replace/restore tests.
2. **Medium — `phase2=` summary.** `format_debug_line` runs string fields through `first_line_reason` (redact + single line). The snippet path was already redacted.
3. **Merge conflict.** Rebased onto latest `dev`. The only textual conflict was `cli.py`: kept dev's `_build_failure_report` and left credential replacement on the shared `credentials.py` helpers.
Local: `ruff check` clean, `python -m pytest tests` → 272 passed.
Please take another look.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][CLI] Add opt-in --debug pipeline diagnostics [seatunnel]
Posted by "det101 (via GitHub)" <gi...@apache.org>.
det101 commented on PR #12545:
URL: https://github.com/apache/seatunnel/pull/12545#issuecomment-6121101711
Thanks @DanielLeens for the follow-up. Pushed a small update for Issue 1:
- Removed the left `_KEY_BOUNDARY` look-behind from `CRED_KV_RE` / `_UNQUOTED_CRED_RE`, restoring the pre-PR suffix matching for camelCase names such as `accessToken`, `dbPassword`, and `clientSecret`.
- Extended the redaction and replace/restore tests with those shapes (plus the earlier snake_case prefixed keys).
Also rewrote the PR commit authors to `luxiaolong <li...@126.com>` so GitHub links them correctly.
Local: `python -m pytest tests/test_debug_diagnostics.py` → 37 passed.
Please take another look.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][CLI] Add opt-in --debug pipeline diagnostics [seatunnel]
Posted by "det101 (via GitHub)" <gi...@apache.org>.
det101 commented on PR #12545:
URL: https://github.com/apache/seatunnel/pull/12545#issuecomment-6051094140
Thanks @DanielLeens for the thorough review. Pushed a follow-up on this branch (`4c9d3d57`) that addresses all five items:
1. **High — redaction weaker than CLI creds.** Extracted `seatunnel_cli/credentials.py` and reuse it for both debug `redact_text` and the LLM `${_CRED_N_}` placeholder swap. Quoted HOCON/JSON (`secret_key` / `access_key` / `"password": "..."` / spaced single-quoted values) and token shapes (Bearer / `sk-` / AKIA) go through the same matcher; `${...}` placeholders are left intact.
2. **Medium — local validator always `fail`.** `_run_validator` now uses `local_result.startswith("VALID")`, matching `validate_hocon`.
3. **Medium — unescaped Rich markup.** `_show_debug` prints `Text(..., style=)` so snippets containing `[sink]` / `[/x]` are not parsed as markup.
4. **Medium — test isolation and coverage.** The autouse fixture resets the module flag; added tests for the missing redaction shapes, `_run_validator` `validator_detail` events, and markup-safe printing.
5. **Low — `enable_debug` mutating `os.environ`.** `--debug` now sets a process-local `_enabled` flag. `SEATUNNEL_CLI_DEBUG=1` still works independently.
Local: `python -m pytest tests` → 218 passed.
Please take another look.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][CLI] Add opt-in --debug pipeline diagnostics [seatunnel]
Posted by "det101 (via GitHub)" <gi...@apache.org>.
det101 commented on PR #12545:
URL: https://github.com/apache/seatunnel/pull/12545#issuecomment-6135925201
Thanks @DanielLeens. Renamed `test_cli_debug_flag_enables_env` → `test_cli_debug_flag_enables_debug` to match the process-local `--debug` flag (Issue 2).
Issue 1 (escaped / triple / unquoted credential shapes) looks fine as a separate follow-up since it matches pre-PR `dev` behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org