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

Refactor execution module #5162

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Refactor execution module #5162

wants to merge 4 commits into from

Conversation

nrc
Copy link
Contributor

@nrc nrc commented Jan 28, 2025

The goal was to breakup execution/mod.rs which is just too big, encapsulate caching, and generally tidy up starting execution given we have mock execution and caching with some kinda complicated interactions.

Copy link

qa-wolf bot commented Jan 28, 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 28, 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 30, 2025 4:48am

Comment on lines -266 to -270
assert!(
first.2.global.artifact_responses.len() < second.2.global.artifact_responses.len(),
"Second should have all the artifact responses of the first, plus more. first={:?}, second={:?}",
first.2.global.artifact_responses.len(),
second.2.global.artifact_responses.len()
Copy link
Collaborator

Choose a reason for hiding this comment

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

The assertion on the responses has been lost.

Copy link
Contributor

Choose a reason for hiding this comment

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

what is going onnnn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that was deliberate - it did seemed like an implementation detail which shouldn't be visible externally and wouldn't fail unless the assertion which is preserved failed or there is an engine problem

Copy link
Collaborator

Choose a reason for hiding this comment

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

I added the assertion specifically because I had a bug in the initial draft implementation of the artifact graph where I wasn't correctly moving the responses to exec_state. They don't originate there. It works now. But we have very few tests for behavior across multiple executions where caching comes into play. If you want to delete it, go ahead, but it makes me nervous how few tests exercise this.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 85.11364% with 262 lines in your changes missing coverage. Please review.

Project coverage is 86.02%. Comparing base (1e56537) to head (c59c304).

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/execution/geometry.rs 73.38% 107 Missing ⚠️
src/wasm-lib/kcl/src/execution/exec_ast.rs 86.89% 84 Missing ⚠️
src/wasm-lib/kcl/src/engine/mod.rs 57.14% 24 Missing ⚠️
src/wasm-lib/kcl/src/execution/state.rs 87.42% 20 Missing ⚠️
src/wasm-lib/kcl/src/execution/memory.rs 90.40% 12 Missing ⚠️
src/wasm-lib/kcl-test-server/src/lib.rs 0.00% 9 Missing ⚠️
src/wasm-lib/kcl/src/execution/cache.rs 98.24% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5162      +/-   ##
==========================================
+ Coverage   85.95%   86.02%   +0.07%     
==========================================
  Files          90       92       +2     
  Lines       32715    32716       +1     
==========================================
+ Hits        28121    28145      +24     
+ Misses       4594     4571      -23     
Flag Coverage Δ
wasm-lib 86.02% <85.11%> (+0.07%) ⬆️

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

@jtran jtran left a comment

Choose a reason for hiding this comment

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

I'm approving, but in case you weren't aware, we're trying to do a bug-fix-only release on Thursday this week (tomorrow) for demos next week. Any risky changes should wait until after the release to merge.

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.

3 participants