Skip to content

Conversation

@jklukas
Copy link
Contributor

@jklukas jklukas commented Nov 2, 2020

This translates the retention_days setting from Glean repositories.yaml
to mozPipelineMetadata.expiration_policy.delete_after_days in all generated
JSON schemas for the application.

We will need a further step in the ops logic to act on this schema-level
metadata, setting the appropriate table-level retention policy in BQ.

This translates the `retention_days` setting from Glean repositories.yaml
to `mozPipelineMetadata.expiration_policy.delete_after_days` in all generated
JSON schemas for the application.

We will need a further step in the ops logic to act on this schema-level
metadata, setting the appropriate table-level retention policy in BQ.
@jklukas
Copy link
Contributor Author

jklukas commented Nov 2, 2020

See diff of generated-schemas which demonstrates that only pings for glean-js-tmp are affected as expected. glean-js-tmp is currently the only app defining a retention policy in Glean's repositories.yaml.

Copy link
Contributor

@acmiyaguchi acmiyaguchi left a comment

Choose a reason for hiding this comment

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

I'm ambivalent about breaking the API, but I don't think there are use-cases of the package being used outside of bigquery-etl. It does look like the right way to do things though.

@robhudson you don't happen to still be using the msg package?

"glean_client_info",
}

def __init__(self, repo, app_id, **kwargs): # TODO: Make env-url optional
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you bump the major version on the package?

There's a utility function in the bigquery-etl glam package that assumes the repo argument is a string, and that the output format of the get_repos is a list of tuples.

https://github.com/mozilla/bigquery-etl/blob/ef8007345885e489740c435196e939061634c76d/bigquery_etl/glam/utils.py#L69

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bumped from 0.2.0 to 0.3.0

@pytest.fixture
def glean():
return glean_ping.GleanPing("glean", "org-mozilla-glean")
return glean_ping.GleanPing({"name": "glean", "app_id": "org-mozilla-glean"})
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be a test that includes the retention_days field from the repo metadata.

@jklukas jklukas requested a review from acmiyaguchi November 2, 2020 21:26
@jklukas jklukas merged commit 96ed0f3 into master Nov 2, 2020
@jklukas jklukas deleted the glean-retention branch November 2, 2020 21:49
acmiyaguchi pushed a commit that referenced this pull request Dec 7, 2020
…166)

This translates the `retention_days` setting from Glean repositories.yaml
to `mozPipelineMetadata.expiration_policy.delete_after_days` in all generated
JSON schemas for the application.

We will need a further step in the ops logic to act on this schema-level
metadata, setting the appropriate table-level retention policy in BQ.
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.

3 participants