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 R141 #1258

Merged
merged 12 commits into from
May 3, 2023
Merged

Release R141 #1258

merged 12 commits into from
May 3, 2023

Conversation

matus-tomlein
Copy link
Contributor

@matus-tomlein matus-tomlein commented Feb 15, 2023

This PR adds the refund schema for the snowplow ecommerce tracking.

Change Issue Issue PR
Add com.snowplowanalytics.snowplow.ecommerce/refund/jsonschema/1-0-0 #1259 #1260

@matus-tomlein matus-tomlein mentioned this pull request Feb 15, 2023
@igneel64 igneel64 marked this pull request as ready for review March 29, 2023 13:07
Copy link
Contributor

@igneel64 igneel64 left a comment

Choose a reason for hiding this comment

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

Has already been reviewed for #1256 , so I suppose everything is ok!

@AlexBenny AlexBenny requested a review from jbeemster April 3, 2023 07:52
@spenes
Copy link
Contributor

spenes commented Apr 25, 2023

Hi @matus-tomlein! I have two PRs (#1284 #1286) that are approved already. Would it be okay if I merge them to this PR to include them to the next release ?

@matus-tomlein
Copy link
Contributor Author

@spenes I have started the PR but actually @igneel64 is leading this release, so he is the better one to ask. But I don't see why not.

@spenes
Copy link
Contributor

spenes commented Apr 25, 2023

Thanks @matus-tomlein! I've merged the schemas.

@igneel64 Please let me know if you see any problem with merging them.

@igneel64
Copy link
Contributor

Hey @spenes :) As I checked, the schemas have been approved in their respective PRs so I see no problems from my side. Now it can be up to @jbeemster on when the deployment will happen.

}
},
"additionalProperties": false,
"required": ["inputs", "database", "query", "output", "cache", "ignoreOnError"]
Copy link
Member

Choose a reason for hiding this comment

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

@istreeter I always thought that (at least for Redshift) that you could not "add" new required fields and that this was a breaking change for the table. This was ingrained into me a long time ago so could well be outdated now and is likely not relevant for this schema given its being used to configure an enrichment and won't ever become a table in reality.

I would have thought that a new required field needs a major version bump generally?

Copy link
Contributor

Choose a reason for hiding this comment

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

The Redshift loader will now handle this gracefully, so technically there is nothing to worry about.

But....

You are correct, we shouldn't add a new field as a required field. Because it breaks the principles of using schema ver.

The guiding principle of schema versioning is: The latest version of a schema must describe all historic data. In this case, json that was valid against the 1-0-0 schema is not valid against the 1-0-1 schema, because it would be missing the ignoreOnError field.

I think it would be better to make ignoreOnError an optional field. And I don't think that causes any problems for how we want to use this schema.

cc @pondzix

Copy link
Member

Choose a reason for hiding this comment

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

The same issues is in the API enrichment bump also!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I made ignorOnError optional for both: SQL and API enrichments

@matus-tomlein
Copy link
Contributor Author

Sorry for messing with this release last minute, but we just got the go ahead from @istreeter to release a minor version of the mobile_context schema which a customer is waiting for so I took the opportunity to add it here.

It has been previously reviewed in R140, but based on this comment from Ian we postponed the release.

"required": ["size", "ttl"]
},
"ignoreOnError": {
"type": "boolean"
Copy link
Member

Choose a reason for hiding this comment

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

Not to nitpick - should this be nullable if this is not required?

Copy link
Contributor

Choose a reason for hiding this comment

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

So now we could omit ignoreOnError but not set explicitly null. With "type": ["boolean", "null"] we could omit and also set null. I can't see the reason why we shoudn't do that, so...I will add null ;)

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.

7 participants