Skip to content

fix(visualization, v1.2): define the render_error the table charts already call - #7905

Merged
aglinxinyuan merged 1 commit into
apache:release/v1.2from
kz930:backport/7260-render-error-v1.2
Aug 24, 2026
Merged

aglinxinyuan merged 1 commit into
apache:release/v1.2from
kz930:backport/7260-render-error-v1.2

Conversation

@kz930

@kz930 kz930 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Manual backport of #7260 to release/v1.2, replacing #7389, whose head branch lives in this repository and so could not be corrected by push.

The production half of the automated backport was already right: TablesPlotOpDesc and FigureFactoryTableOpDesc each define the render_error their generated TableChartOperator calls on two reachable branches, three lines apiece, exactly as on main.

The tests were what failed. Neither operator has a descriptor spec on this branch, so the automation resolved the missing files by taking main's whole, 113 lines and 102 lines against the 11 apiece that #7260 actually added. What came along asserts on behaviour that is not on this branch: main passes a message to each assert, this branch does not, so intercept[AssertionError](...).getMessage is null and six of the fourteen tests fail. Those messages arrived in later PRs that were not backported, and this one should not carry them.

Each spec here holds the one case #7260 added and the scaffolding it needs to run.

Any related issues, documentation, discussions?

Backport of #7260. Originally linked #7244. Replaces #7389, which can be closed.

How was this PR tested?

WorkflowOperator/scalafmtCheckAll and the two descriptor specs on this branch, 2 tests, both passing. For the record, the automated resolution was run on this branch first and failed 6 of 14: two cannot be empty cases per spec, plus at least 30 and non-negative in FigureFactoryTableOpDescSpec.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

…call (apache#7260)

### What changes were proposed in this PR?

`TablesPlotOpDesc` and `FigureFactoryTableOpDesc` both generate a
`TableChartOperator` that calls `self.render_error(...)` on two
branches, but neither generated class defines that method. Each now
defines it, in the same shape the other visualization operators use.

### Why are the changes needed?

Both branches are reachable — an empty input table, and a value column
left with only non-positive or null values. Executing each operator's
generated module against an empty frame raises `AttributeError:
'TableChartOperator' object has no attribute 'render_error'` instead of
showing the message the code was written to show. With the definition
added, the same run yields `Tables Plot is not available. Reason is:
input table is empty.`

### Any related issues, documentation, discussions?

Closes apache#7244

### How was this PR tested?

`WorkflowOperator/scalafmtCheckAll` and both operators' descriptor specs
(14 tests). Each spec now asserts its generated class defines
`render_error` and formats the operator's name. Separately, each
generated module was run locally against an empty frame before and after
the fix, with the `pytexera` and `plotly` imports stubbed — the before
run reproduces the `AttributeError`, the after run returns `Tables Plot
is not available. Reason is: input table is empty.`

### Does this PR introduce any user-facing change?

Yes. Those two cases now render the intended message instead of failing
the operator. Nothing changes on the path that produces a chart.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5)

---------

(backported from commit a96bf3e)

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: Xuan Gu <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan, @Yicong-Huang
    You can notify them by mentioning @aglinxinyuan, @Yicong-Huang in a comment.

@codecov-commenter

codecov-commenter commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.06%. Comparing base (33d5f1b) to head (8a0767a).
⚠️ Report is 13 commits behind head on release/v1.2.

Additional details and impacted files
@@                Coverage Diff                 @@
##             release/v1.2    #7905      +/-   ##
==================================================
+ Coverage           52.88%   53.06%   +0.18%     
- Complexity           2529     2564      +35     
==================================================
  Files                1078     1078              
  Lines               42367    42369       +2     
  Branches             4565     4566       +1     
==================================================
+ Hits                22404    22485      +81     
+ Misses              18646    18562      -84     
- Partials             1317     1322       +5     
Flag Coverage Δ *Carryforward flag
access-control-service 64.35% <ø> (ø)
agent-service 34.36% <ø> (ø) Carriedforward from 33d5f1b
amber 53.47% <ø> (+0.50%) ⬆️
computing-unit-managing-service 1.65% <ø> (ø)
config-service 56.06% <ø> (ø)
file-service 61.72% <ø> (ø)
frontend 47.32% <ø> (ø) Carriedforward from 33d5f1b
pyamber 93.07% <ø> (ø) Carriedforward from 33d5f1b
python 90.88% <ø> (ø) Carriedforward from 33d5f1b
workflow-compiling-service 58.69% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kz930

kz930 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@xuang7 May you take a look at it?

@kz930

kz930 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@aglinxinyuan May you take a look at it?

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Aug 24, 2026
Merged via the queue into apache:release/v1.2 with commit e49f337 Aug 24, 2026
22 checks passed
@kz930
kz930 deleted the backport/7260-render-error-v1.2 branch September 2, 2026 21:39
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