-
Notifications
You must be signed in to change notification settings - Fork 18
New workflow for updating schema when rescoring metrics #464
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
|
This currently depends on a lot of smaller PRs that are open; once they are merged I can rebase this one and just have the features it adds. |
|
fyi We migrated docker-etl to GHA, so you should now be able to merge the PRs yourself without the deploy steps failing. |
|
Also since it seems related, there is a metric-hub with metric definitions, which look similarish to some definitions in this PR: https://github.com/mozilla/metric-hub |
Rather than being part of the ETL. These are still rather broken after the schema data changes, but this is the first step in refactoring them to work in the new world.
Now that we have the schemas scored in-tree we don't want to directly deploy tables for prospective rescores. Instead the approach we take is to make the metric-rescore command do two things: * Create templates for the post-rescore scored_site_reports, any routines that need to be updated as part of the rescore, and a template for a delta view that selects bugs that are changed by the rescore. * Replace: update the scored site reports templates with the new version from a rescore, and move the current version to an archive dataset, and similarly for routines modified by the rescore. The idea is that one first deploys the new scored site reports, to allow the change to be audited, and then deploys the change that replaces the original scored site reports with the new one once the rescore is ready to go.
This means that the `webcompat-site-rank-update` command will automatically generate the right schema templates rather than actually trying ot update prod.
If we deploy a rescore we want to first record the delta between the old scores and the new scores. This is a bit tricky because we want the update to the templates to go through the PR process and be deployed by the ETL, but we want to record the rescores before we actually update the schema. To solve this we add an extra lifecycle point in the schema update for tasks that run before deploying the schema. Here we call into metric_rescore to check for a metric rescore that a) isn't marked as staging and b) isn't deployed. If that's found we assume we're about to deploy it and record the score updates resulting from that change to the metric. This isn't a perfect system since the changes aren't at all atomic (e.g. the rescore could succeed, but the deploy fail), but it's probably good enough for something we do relatively rarely.
Checklist for reviewer:
referenced, the pull request should include the bug number in the title)
.circleci/config.yml) will cause environment variables (particularlycredentials) to be exposed in test logs
telemetry-airflow
responsibly.
Note for deployments: In order to push images built by this PR, the user who merges the PR
must be in the telemetry Github team.
This is because deploys depend on the
data-eng-airflow-gcr CircleCI context.
See DENG-8850 for additional discussion.