-
Notifications
You must be signed in to change notification settings - Fork 5
DSCS-863: add minLength to all required schema fields, where applicable #138
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
base: main
Are you sure you want to change the base?
Conversation
| @@ -174,4 +175,4 @@ | |||
| "version": "2-0-5" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this version will also need to be bumped up accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am guessing this is a patch bump to 2-0-6 or would be consider this a minor change to 2-1-0 since this could start rejecting events from stores where the sku field is empty? Also not entirely clear if schema changes are entirely manual and this file is used to reflect what is up in snowplow.
|
@sharkySharks I like the idea and glad we are doing this. The file you're changing here is for documentation only. The correct steps to actually do what you're trying to do are below:
Let me know if any of this is unclear! |
|
@aniham thanks for the info on making the update. I just checked all the webpack configs and all urls are coming back as 404. Do i need to be allow listed before I can access?
|
|
@sharkySharks yes for QA you have to be on VPN, sorry forgot to mention earlier |
| @@ -9,7 +9,8 @@ | |||
| }, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I am thinking about this, should we also add minLength to the name field since it is also required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why "name" is a required field. I don't think we have any filters related to that in the code today. If we do, we can consider adding minLength otherwise I'd leave it as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we are unsure of the effects then I'll just keep the minLength added to sku and we can revisit name at a different point. I'm not sure we can be sure of all of the ways adding minLength to name will change things 😬
|
Update on testing, I was able to test this out in the qa environment locally, sent productPageView and addToCart events from localhost, saw them end up in the good bucket in qa kibana. Nothing in the bad bucket from those events. Not sure if other events need to be tested as well. I think we should also consider minLength for the required name field as well. Also, I do not have production promotion permissions in the snowplow console as far as I can tell. But latest code here is what I tested against. |
|
@sharkySharks this sounds right. I think you tested the right things though you should probably do a search through the repo to make sure no other events are using the product context (or if they are, to test those as well). Next steps will be:
After that is done, you should be able to publish your change here to prod! |
|
@sharkySharks note that once this change goes into prod, we're going to see a uptick of events going to the bad bucket - that is the correct behavior and what we want ofc - but worth keeping an eye out and doing some reporting on what changed. |
|
@krithikachandran I am good with using the major version upgrade, particularly if we think it is going to be a breaking change even if it is a bug fix. I will redeploy it out with that version and test. @aniham I don't have permissions to push the schema to prod when it is ready. I don't see that button, if you could check my permissions I can do that after I test the major version upgrade. |
|
@sharkySharks you're now |
f93f5f9 to
45a132d
Compare
95b938a to
c8340ed
Compare
|
Hey folks, I've updated this pr, I have not tested this yet as I want to get feedback on the potential changes first and then move forward with making the changes in snowplow for qa and run through all the testing paths once there is agreement on these changes. I went ahead and added This is coming out of numerous outages this year where required fields were empty and broke various parts of ML pipeline processing. |
| "query": { | ||
| "type": "string" | ||
| "type": "string", | ||
| "minLength": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this maps to phrase in productSearch request. If so, there are cases where it could be empty (when browsing a category page, gql query filters on a category but no phrase is provided).
| "properties": { | ||
| "code": { | ||
| "type": "string" | ||
| "type": "string", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have rarely seen finalAdjustments being set in price data. Doesn't look like it's marked as required, we can remove this
| "name": { | ||
| "type": "string" | ||
| "type": "string", | ||
| "minLength": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here if the search returns no results? We might still need the events but with empty fields?




Description
While we assert in the product schema that the
skufield is not null, it should also not be an empty string. Recently ran into some customer issues where an empty sku field left events unprocessed. This schema needs to be updated in the snowplow console, but I will wait for feedback here before making any schema changes. Also interested in the process for updating this schema within snowplow.Related Issue
Please see internal adobe jira issue DSCS-863.
Motivation and Context
skuis a required field, which means it should also not be empty.How Has This Been Tested?
Downstream processing pipelines for recommendations were breaking because the sku field was empty for some events for some customers. In those pipelines queries that assumed the sku would not be empty on product events have been updated to explicitly remove empty strings as well as the null values so that the pipelines do not error with missing sku information. Twofold, schema validation should also handle empty product event sku information so that events that do not meet our expectations fail fast and return accurate assumptions to our customers about which product information may be missing required sku data.
Screenshots (if appropriate):
Types of changes
Checklist