-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: translations integration tests #210
base: main
Are you sure you want to change the base?
feat: translations integration tests #210
Conversation
/taskcluster integration |
1 similar comment
/taskcluster integration |
1533737
to
7ed60d4
Compare
/taskcluster integration |
4b3955e
to
772cbc8
Compare
/taskcluster integration |
ae81007
to
a00d42d
Compare
/taskcluster integration |
266add0
to
b1c9bd2
Compare
/taskcluster integration |
18dcc67
to
e2fe3b9
Compare
5020b6a
to
4e1bb62
Compare
/taskcluster integration |
e290224
to
797676f
Compare
/taskcluster integration |
797676f
to
f86a21c
Compare
/taskcluster integration |
f86a21c
to
2b31466
Compare
/taskcluster integration |
2 similar comments
/taskcluster integration |
/taskcluster integration |
2b31466
to
ee36134
Compare
/taskcluster integration |
aa6e1da
to
df10b2b
Compare
/taskcluster integration |
The old version is causing issues in mozilla-releng#210, because `get_ancestors` is not properly memoized.
The old version is causing issues in mozilla-releng#210, because `get_ancestors` is not properly memoized.
347f64d
to
037b86d
Compare
/taskcluster integration |
037b86d
to
65a4e01
Compare
/taskcluster integration |
65a4e01
to
3df9d12
Compare
/taskcluster integration |
3df9d12
to
b62891a
Compare
@ahal - this is ready for review again, but I'm going to leave it in Draft until I'm able to update the new I have integration tests running in https://stage.taskcluster.nonprod.cloudops.mozgcp.net/tasks/groups/Vb5IURGhS5mLQy5np8IOAg (the only change between what that's running from and the latest is some updates to comments and commit messages). |
498ab38
to
d2ab427
Compare
/taskcluster integration |
d2ab427
to
b2f9a79
Compare
/taskcluster integration |
I've updated to point at production, and a fresh round of integration tests are running in https://stage.taskcluster.nonprod.cloudops.mozgcp.net/tasks/groups/WQwObYW7RmOWREX_YUPpXQ. Nothing notable has changed since I wrote the quoted comment and now. |
b2f9a79
to
94d3f2c
Compare
/taskcluster integration |
There's a lot here, but the essence of this is using `get_ancestors` to find tasks that are upstream of those in `task-graph.json` that we should also rerun in staging. This necessitates some massaging of the task definitions we receive from `get_ancestors` to get them in a similar form, but is other straightforward and unremarkable. Note that the massaging is done in `util/integration.py` to centralize it, and make the return value consistent regardless of where the tasks came from.
…egration tests This ensures that any tasks which will be run in the staging cluster that are upstream of other tasks will be referred to correctly in the downstream tasks.
`attrmatch` will always return true if `kwargs` is empty; therefore we can't call it unless we have excludes, otherwise we'll reject all tasks.
This came up during some additional testing of translations integration tests where the deadline of the `all-pipeline` task was set further in the future than the staging cluster allows. Another commit in this PR already ensures that datestamps are approriate for any ancestor tasks found - there's no harm in doing the same for tasks that come from `task-graph.json`. (Arguably, it's even a feature that we lower the expiration time, as these tasks outlive their usefulness very quickly.)
This might be the most hacky thing we're doing here so far, but it's necessary for translations integration tests, where cached ancestor tasks will have a `REV` that doesn't match the `REF`, leading to errors such as: ``` [vcs 2024-12-20T16:35:08.992Z] executing ['git', 'config', '--global', '--add', 'safe.directory', '/builds/worker/checkouts/vcs'] [vcs 2024-12-20T16:35:08.994Z] executing ['git', 'clone', 'https://github.com/mozilla-releng/staging-firefox-translations-training', '/builds/worker/checkouts/vcs'] [vcs 2024-12-20T16:35:08.995Z] Cloning into '/builds/worker/checkouts/vcs'... [vcs 2024-12-20T16:35:10.747Z] executing ['git', 'fetch', '--tags', '--force', 'https://github.com/mozilla-releng/staging-firefox-translations-training', 'refs/heads/main'] [vcs 2024-12-20T16:35:10.949Z] From https://github.com/mozilla-releng/staging-firefox-translations-training [vcs 2024-12-20T16:35:10.949Z] * branch main -> FETCH_HEAD [vcs 2024-12-20T16:35:10.955Z] executing ['git', 'fetch', '--no-tags', 'https://github.com/mozilla-releng/staging-firefox-translations-training', 'refs/heads/main'] [vcs 2024-12-20T16:35:11.128Z] From https://github.com/mozilla-releng/staging-firefox-translations-training [vcs 2024-12-20T16:35:11.128Z] * branch main -> FETCH_HEAD [vcs 2024-12-20T16:35:11.133Z] executing ['git', 'checkout', '-f', '-B', 'refs/heads/main', '876ad1a2de046271a45c979551c8650e5e1b75a2'] [vcs 2024-12-20T16:35:11.135Z] fatal: reference is not a tree: 876ad1a2de046271a45c979551c8650e5e1b75a2 ``` Removing the `REV` will cause the `REF` to be used without issues: ``` [vcs 2024-12-20T18:15:48.936Z] executing ['git', 'config', '--global', '--add', 'safe.directory', '/builds/worker/checkouts/vcs'] [vcs 2024-12-20T18:15:48.938Z] executing ['git', 'clone', 'https://github.com/mozilla-releng/staging-firefox-translations-training', '/builds/worker/checkouts/vcs'] [vcs 2024-12-20T18:15:48.939Z] Cloning into '/builds/worker/checkouts/vcs'... [vcs 2024-12-20T18:15:50.544Z] executing ['git', 'fetch', '--tags', '--force', 'https://github.com/mozilla-releng/staging-firefox-translations-training', 'refs/heads/main'] [vcs 2024-12-20T18:15:50.758Z] From https://github.com/mozilla-releng/staging-firefox-translations-training [vcs 2024-12-20T18:15:50.758Z] * branch main -> FETCH_HEAD [vcs 2024-12-20T18:15:50.763Z] executing ['git', 'fetch', '--no-tags', 'https://github.com/mozilla-releng/staging-firefox-translations-training', 'refs/heads/main'] [vcs 2024-12-20T18:15:50.926Z] From https://github.com/mozilla-releng/staging-firefox-translations-training [vcs 2024-12-20T18:15:50.926Z] * branch main -> FETCH_HEAD [vcs 2024-12-20T18:15:50.931Z] executing ['git', 'checkout', '-f', '-B', 'refs/heads/main', 'FETCH_HEAD'] [vcs 2024-12-20T18:15:51.929Z] Switched to a new branch 'refs/heads/main' ```
94d3f2c
to
da526ed
Compare
/taskcluster integration |
1 similar comment
/taskcluster integration |
This adds support for running the translations training pipeline as part of integration tests. The first two commits, which add support for fetching upstream tasks that didn't run as part of a decision task and support for rewriting dependencies to the yet-to-be-scheduled tasks are the interesting parts. The other few commits are pretty boring, and simply fix a minor bug and enable the translations tests.
Note that these depends on #228, a yet to be opened PR in https://github.com/mozilla/translations to add a pipeline cronjob. It's currently running against the staging repository and working well though.