-
Notifications
You must be signed in to change notification settings - Fork 13
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
Remove addl properties #25
Conversation
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.
Do you have a concrete example of what was happening in #22? I'm a bit unclear on what the behavior of filling in the probe section is before and after this patch.
@acmiyaguchi generally the problem was that previously, if were filling this in:
then we would end up with (for e.g. 1 probe):
And the transpiler would do the correct thing, and ignore the However, if there were no fill-in probes, we would end up with something like:
Which the transpiler would see as the pseudo-map type, resulting in a schema element of With this change, the result of no probes to fill-in would be:
...which, upon inspection, still returns this from the transpiler:
Hmm, it seems to me the transpiler should output an empty row here, do you agree? We'd need to check that that is acceptable for BQ. |
Previously, some sections would have an 'additionalProperties' section that remained after fill-in; this was because they didn't have any probes that filled the sections in. Instead of keeping that additionalProperties, we now remove it. This way the resulting schema is what we hope - an empty struct.
* update test with schema key deletion * add explanation for propogate
b16a3de
to
2f1df2f
Compare
The type is a string because an empty object is not a well defined structure. There needs to be at least one field, even if it's just a dummy/placeholder value. I think instead, you should consider using the |
@acmiyaguchi that seems reasonable as well. I think an empty struct type would be most preferable (since it would match the expected schema of the ping) but deleting it would be second-best. |
Looking at the BigQuery docs again, it looks like it is possible to have a empty struct. I also think that we might want to set |
I won't be using these for validation, currently we'll be using the generic glean schema for validation and the strict one for the BQ tables. We can update this later if that proves too lenient. |
Given that BQ does not support empty structs, we'll have to remove these from the schema instead. |
Previously we set additionalProperties to false. This leads to structs with no elements, which are not allowed in BQ tables. This commit deletes those, and propagates that deletion to parents. As such, sometimes entire metrics sections are left out of ping schemas. * Add documentation for propagate
@acmiyaguchi this now deletes |
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.
Looks good to me.
Fixes #22