Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add testing the artifact graph when there's an execution error #5154

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Jan 27, 2025

Follow-up to #5068 to test artifact graph output when there's a KCL execution error. The frontend expects that we always generate it, even when there's an error.

Interestingly, the output is different for a cube when there's an error afterwards. Compare the generated output files of the old cube test vs. the new cube_with_error test. It's missing the outgoing solid3d_get_opposite_edge and solid3d_get_next_adjacent_edge commands and everything that results from them.

Copy link

qa-wolf bot commented Jan 27, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Jan 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jan 31, 2025 11:25pm

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.95%. Comparing base (e0ef10e) to head (5c4c045).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5154   +/-   ##
=======================================
  Coverage   85.95%   85.95%           
=======================================
  Files          90       90           
  Lines       32893    32906   +13     
=======================================
+ Hits        28272    28285   +13     
  Misses       4621     4621           
Flag Coverage Δ
wasm-lib 85.95% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@franknoirot franknoirot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool tests and code consolidation. That is interesting about the getOppositeEdge; is that because those are "post-extrude" commands? I guess I don't understand why they are interrupted by the later error, if that is what happens

@jtran
Copy link
Collaborator Author

jtran commented Jan 30, 2025

Correct. In do_post_extrude(), the engine messages are enqueued to the batch since the execution doesn't need the result. In the successful case, they're eventually flushed and sent to the engine. But when there's an error, nothing flushes.

As a consumer of the artifact graph, this is unintuitive. But I'm not sure if we should change it.

I'm pretty sure that it has always behaved this way, even in TS. Now it's revealed, thanks to our new tests.

@jtran jtran force-pushed the jtran/test-artifact-graph-when-error branch from 5b12d25 to dd8a2af Compare January 31, 2025 22:57
@jtran jtran force-pushed the jtran/test-artifact-graph-when-error branch from dd8a2af to 5c4c045 Compare January 31, 2025 22:58
@jtran jtran merged commit cffeb52 into main Jan 31, 2025
33 checks passed
@jtran jtran deleted the jtran/test-artifact-graph-when-error branch January 31, 2025 23:32
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.

2 participants