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

fix(jit): raise validation error for required fields #2754

Merged

Conversation

karatakis
Copy link
Collaborator

@karatakis karatakis commented Aug 25, 2024

Summary:
Fix validation of required fields to cover edge cases for the JIT module

Remember to test it with cargo test --features force_jit

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Aug 25, 2024
@karatakis
Copy link
Collaborator Author

karatakis commented Aug 26, 2024

Test case test-required-fields.md_5.snap needs discussion. I believe it should not fail, but the current implementation fails. This issue is open for discussion.

Edit: On second look and the tip from Meskill I think this point is invalid

@meskill meskill added the ci: test-jit Run all integration tests for the JIT optimized engine label Aug 26, 2024
@karatakis karatakis force-pushed the fix/validation-error-req-fields-alt branch from 16e7bd3 to 21a2ce8 Compare August 26, 2024 08:43
@meskill
Copy link
Contributor

meskill commented Aug 26, 2024

Test case test-required-fields.md_5.snap needs discussion. I believe it should not fail, but the current implementation fails. This issue is open for discussion.

Why do you think it should not fail? You have non-null list of non-null values and one of the values is null - according to spec the parent value should be resolved to null in that case and that is against the schema

@karatakis
Copy link
Collaborator Author

karatakis commented Aug 27, 2024

Looking at it today, @meskill, I think it is okay. I messed up the normal tests with the JIT tests

@karatakis karatakis force-pushed the fix/validation-error-req-fields-alt branch 3 times, most recently from 05c38b3 to e2b577b Compare August 27, 2024 08:26
src/core/jit/synth/synth.rs Outdated Show resolved Hide resolved
tests/execution/test-required-fields.md Show resolved Hide resolved
tests/execution/test-required-fields.md Show resolved Hide resolved
tests/execution/test-required-fields.md Show resolved Hide resolved
src/core/jit/synth/synth.rs Outdated Show resolved Hide resolved
src/core/jit/synth/synth.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 15 lines in your changes missing coverage. Please review.

Project coverage is 86.17%. Comparing base (7be002f) to head (932d935).
Report is 1 commits behind head on main.

Files Patch % Lines
src/core/jit/synth/synth.rs 16.66% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2754      +/-   ##
==========================================
- Coverage   86.21%   86.17%   -0.05%     
==========================================
  Files         255      255              
  Lines       25020    25030      +10     
==========================================
- Hits        21572    21570       -2     
- Misses       3448     3460      +12     

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

@karatakis karatakis force-pushed the fix/validation-error-req-fields-alt branch from db8eed2 to b86dc79 Compare August 27, 2024 13:02
@tusharmath tusharmath marked this pull request as draft August 27, 2024 13:20
@karatakis karatakis marked this pull request as ready for review August 27, 2024 13:24
@karatakis karatakis force-pushed the fix/validation-error-req-fields-alt branch from 957a114 to eff30b2 Compare August 27, 2024 13:25
@tusharmath tusharmath enabled auto-merge (squash) August 27, 2024 16:54
@tusharmath tusharmath merged commit aeb1043 into tailcallhq:main Aug 27, 2024
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: test-jit Run all integration tests for the JIT optimized engine type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants