-
Notifications
You must be signed in to change notification settings - Fork 95
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
Update build process to add "null" as an allowed type for non-required properties #811
base: main
Are you sure you want to change the base?
Conversation
b6b1af3
to
536c02b
Compare
536c02b
to
6becf29
Compare
The
Should those schemas be changed so the |
|
Can you check |
Beyond the incident with the So this is mostly just guarding against future incidents like what happened with the For reference, I used the following query: select document_namespace, document_type, document_version, error_message, count(*) as error_count
from `moz-fx-data-shared-prod.monitoring.payload_bytes_error_all`
where
date(submission_timestamp) >= current_date() - 31
and error_message like '%found: Null'
and error_message not like '%/distro:%'
group by all
order by error_count desc |
Many telemetry properties aren't configured to be required, and if the property is omitted entirely in submitted telemetry then the associated column in BigQuery ends up with a null value. However, if such non-required properties aren't specifically configured to allow null values and telemetry is sent with an explicit null value for the property then validation will fail with an "unexpected type" error and the entire record will be rejected, despite the fact that from the BigQuery perspective it's functionally equivalent to omitting the non-required property entirely. IMO this behavior is detrimental (e.g. DENG-3588).
In order to mitigate the above problem, this PR updates the schema build process to try to automatically identify non-required properties and adjust their configuration to allow null values.
Checklist for reviewer:
./.github/push-to-trigger-integration <username>:<branchname>
For glean changes:
templates/include/glean/CHANGELOG.md
For modifications to schemas in restricted namespaces (see
CODEOWNERS
):