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

Release/0.22.3 #204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Release/0.22.3 #204

wants to merge 2 commits into from

Conversation

pondzix
Copy link
Contributor

@pondzix pondzix commented Mar 26, 2024

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8435310588

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 80.697%

Totals Coverage Status
Change from base Build 8434104603: 0.1%
Covered Lines: 1250
Relevant Lines: 1549

💛 - Coveralls

@@ -277,7 +279,8 @@ class CasterSpec extends org.specs2.Specification { def is = s2"""
json"""{"XYZ": 42, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", IntValue(42)))),
json"""{"xyz": null, "XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))),
json"""{"XYZ": null, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))),
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))),
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), //Should be error?
json"""{"xyz": "invalid", "XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), // This one is null now! Should be error?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be error?

I think yes.

@@ -277,7 +279,8 @@ class CasterSpec extends org.specs2.Specification { def is = s2"""
json"""{"XYZ": 42, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", IntValue(42)))),
json"""{"xyz": null, "XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))),
json"""{"XYZ": null, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))),
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))),
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), //Should be error?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be error?

If line 280 and 281 are not errors, then I think it's ok for this one to also be not an error.

But I'm not strongly opinionated on this one, especially as it's a really weird edge case scenario, which we may never see in production. The important thing is: the loader doesn't break. And we've achieved that.

@istreeter
Copy link
Contributor

By the way, you might be wondering... why would a loader receive invalid data anyway, if it has already been validated by Enrich.

There are two scenarios that I know of:

  1. The user has patched a schema in Iglu. So Enrich validated it against the old schema, and the loader tries to load it according to the new schema. I have no sympathy for this scenario! Anything we do in this scenario is ok, as long as the loader does not break
  2. The data falls into one of the edge-case categories described over here

If you understand the second scenario, it might help guide you on what is the correct end behaviour.

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