Prevent glean metadata overrides form overwriting default metadata #280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#266 introduced a bug where the metadata for a ping set at the app-level might overwrite the app defaults in
moz_pipeline_metadata_defaults
. This is becauseGleanPing.apply_default_metadata
is called twice and the first call puts thedefault_metadata
dict in the ping and then the second call will update that dict in place so thedefault_metadata
will then have new values.For example, this can be seen in
pine.deletion-request
where the retention is set to 1130 but it's set to 10000 in probe-scraper.I made a pr against the generated schemas to show the changes this would make on the schemas mozilla-services/mozilla-pipeline-schemas#827. I'll go through those and make sure those are correct and won't unexpectedly delete things. All the changes are decreases in retention period except for pine deletion-requests and pageload which means that this bug shouldn't have deleted anything unexpectedly.