Skip to content

fix(operation): show task failures and preserve readable logs - #438

Open
lixd wants to merge 2 commits into
kubeclipper:masterfrom
lixd:fix/task-failure-display
Open

lixd wants to merge 2 commits into
kubeclipper:masterfrom
lixd:fix/task-failure-display

Conversation

@lixd

@lixd lixd commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

A failed task can have no shell output, and a log request can fail after receiving only part of its content. The operation log dialog now keeps the failure cause visible and supports reading the remaining output.

  • Show Task Result as a separate failure summary that remains visible when the node is collapsed, with node address, status and duration above the execution log.
  • Preserve existing output during refresh or read failures, expose read errors with retry controls and retain API-provided error reasons.
  • Serialize log reads by delivered byte offset, drain terminal log chunks, allow reopening independently of stale requests and ignore late responses after reset.
  • Keep task and operation lookup errors visible, wrap long log lines and avoid forcing the scroll position.

This builds on the log-read error handling already merged in #437.

Which issue(s) this PR fixes:

No linked issue.

Special notes for reviewers:

Validation:

  • All 11 Jest suites passed: 74 tests, including message-only and reason-only errors, API reasons alongside generic messages, failed-request retry, reopening before a stale request resolves or rejects, terminal-tail reads, UTF-8 byte offsets, task lookup recovery and collapsed failure summaries.
  • ESLint on the changed JavaScript and JSX files.
  • Production webpack build.
  • The log layout and real failed/succeeded task records were checked in an isolated Linux deployment before integrating the latest upstream error-reason and retry-label changes. Those integration changes are covered by the current unit tests.

Companion backend PR: kubeclipper/kubeclipper#1022

The companion backend change adds service-control diagnostics to the existing task log API; this PR introduces no API schema change.

Does this PR introduced a user-facing change?

Operation logs now keep task failure summaries visible, preserve received output during read failures and provide retry controls without losing the final log tail.

Additional documentation, usage docs, etc.:

None.

Signed-off-by: lixd <xueduan.li@gmail.com>
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.54839% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.65%. Comparing base (c8ec5fe) to head (8079eee).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
...tion/actions/PipelineLogDialog/RightLogContent.jsx 82.35% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
+ Coverage   47.30%   55.65%   +8.34%     
==========================================
  Files           7       12       +5     
  Lines         613     1008     +395     
  Branches      176      308     +132     
==========================================
+ Hits          290      561     +271     
- Misses        250      359     +109     
- Partials       73       88      +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: lixd <xueduan.li@gmail.com>
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.

1 participant