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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error in SchemaStore when schema fields are missing #192

Merged
merged 5 commits into from
Jul 5, 2022

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Jul 5, 2022

Currently we return an error from get_schema or get_all_schema in SchemaStore if a schema cannot be constructed due to it's fields not being present in the database. This isn't the behaviour we expect, rather we want to ignore any schemas which can't be fully constructed.

馃搵 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@codecov
Copy link

codecov bot commented Jul 5, 2022

Codecov Report

Merging #192 (05eab8a) into main (54e2aff) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
- Coverage   93.62%   93.62%   -0.01%     
==========================================
  Files          42       42              
  Lines        3155     3152       -3     
==========================================
- Hits         2954     2951       -3     
  Misses        201      201              
Impacted Files Coverage 螖
aquadoggo/src/db/stores/schema.rs 97.77% <100.00%> (-0.05%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 54e2aff...05eab8a. Read the comment docs.

@sandreae sandreae marked this pull request as ready for review July 5, 2022 08:50
Copy link
Member

@adzialocha adzialocha left a comment

Choose a reason for hiding this comment

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

Nice! Thank you for fixing this!

I'd add some more comments on why certain things are the way there are, but otherwise its ready to go!

aquadoggo/src/db/stores/schema.rs Show resolved Hide resolved
aquadoggo/src/db/stores/schema.rs Show resolved Hide resolved
@sandreae sandreae requested a review from adzialocha July 5, 2022 10:54
@adzialocha adzialocha merged commit 73369cc into main Jul 5, 2022
@sandreae sandreae mentioned this pull request Jul 18, 2022
@adzialocha adzialocha deleted the fix-error-logic-in-schema-store branch August 19, 2022 15:20
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.

Error handling in SchemaStore
2 participants