-
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.
/taskcluster integration |
84ac1f8
to
2e835cf
Compare
/taskcluster integration |
2e835cf
to
f6766e8
Compare
/taskcluster integration |
(Whoops, should've moved this back to draft awhile ago. Some tasks that expired uncovered some edge cases here that are proving tricky to work through.) |
f6766e8
to
69680e9
Compare
/taskcluster integration |
f2ac6de
to
f542db5
Compare
/taskcluster integration |
b1a3d68
to
2367f90
Compare
/taskcluster integration |
cf5dc54
to
544c3f6
Compare
/taskcluster integration |
b093a37
to
d6d7273
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.
…xci-artifact tasks This work uncovered a small bug in the `firefoxci_artifact` transform where fetches would not be mirrored for tasks without a docker image; this is being fixed here as well.
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' ```
d6d7273
to
21cf563
Compare
/taskcluster integration |
Latest testing is having two issues:
I'm going to try this all again on Monday. |
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.