Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Bug 1613483 - Add all Browsertime tests with visual metrics to Fenix repo. #9087

Merged
merged 29 commits into from
Mar 17, 2020

Conversation

gmierz
Copy link
Contributor

@gmierz gmierz commented Mar 10, 2020

This pull request adds Raptor-Browsertime tests to the tests run on the Fenix-repo branch.

To be able to run Raptor-Browsertime on the Fenix branch, a few things had to be changed.

  1. A new docker image is added for the visual-metrics tasks which require some special packages not available in the other dockers. (A fetch-content script is added here as well, it will be removed when this bug is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1621264).
  2. A single_dep.py loader is added to handle the only-for-attributes setting that the visual-metrics tasks depend on.
  3. Multiple toolchain fetches needed to be added here to get the various components needed to run browsertime with visual metrics.
  4. Finally, all Browsertime tests are added to a cron task to run at the same frequency as Raptor tests.

In preparation for a full migration, these tests will run for 1 week, and if everything works fine, the Raptor-Webext tests will be disabled and these will be promoted.

@codecov-io
Copy link

codecov-io commented Mar 10, 2020

Codecov Report

Merging #9087 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #9087      +/-   ##
============================================
- Coverage     19.54%   19.53%   -0.01%     
  Complexity      511      511              
============================================
  Files           329      329              
  Lines         13136    13136              
  Branches       1741     1741              
============================================
- Hits           2567     2566       -1     
  Misses        10345    10345              
- Partials        224      225       +1
Impacted Files Coverage Δ Complexity Δ
...c/main/java/org/mozilla/fenix/components/Search.kt 91.66% <0%> (-8.34%) 2% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34144fd...7de2abf. Read the comment docs.

Copy link
Contributor

@JohanLorenzo JohanLorenzo left a comment

Choose a reason for hiding this comment

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

It looks great to me overall! Thank you very much for do this huge amount of work! I know it's not easy to reach this point, but you did!

I see some great things in the PR and few that would need to be improved. Please let me know what you think about the points below. I'll be happy to review the PR again 🙂

taskcluster/fenix_taskgraph/target_tasks.py Show resolved Hide resolved
taskcluster/docker/visual-metrics/Dockerfile Show resolved Hide resolved
taskcluster/docker/visual-metrics/fetch-content Outdated Show resolved Hide resolved
taskcluster/ci/browsertime/kind.yml Show resolved Hide resolved
taskcluster/ci/visual-metrics/kind.yml Show resolved Hide resolved
taskcluster/fenix_taskgraph/transforms/visual_metrics.py Outdated Show resolved Hide resolved
taskcluster/fenix_taskgraph/transforms/visual_metrics.py Outdated Show resolved Hide resolved
taskcluster/fenix_taskgraph/transforms/visual_metrics.py Outdated Show resolved Hide resolved
taskcluster/ci/browsertime/kind.yml Show resolved Hide resolved
@gmierz
Copy link
Contributor Author

gmierz commented Mar 13, 2020

The commit Restart testing, and set user to root in visual-metrics Docker. has some Browsertime and visual metrics tests in it. The visual-metrics failure is a known intermittent where Browsertime fails to write the video. I don't know why the ui-test-x86-debug might be failing, it seems like it's unrelated to this PR. In either case, this is ready for another review round.

Copy link
Contributor

@JohanLorenzo JohanLorenzo left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for porting these tests over 😃

Comment on lines 64 to 69
group_attr = None
if only_attributes:
for attr in only_attributes:
if attr in task.attributes:
group_attr = attr
break
if not group_attr:
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think we can simplify the logic with these 3 lines.

Suggested change
group_attr = None
if only_attributes:
for attr in only_attributes:
if attr in task.attributes:
group_attr = attr
break
if not group_attr:
continue
if only_attributes:
if not any(attr in task.attributes for attr in only_attributes):
continue

@gmierz
Copy link
Contributor Author

gmierz commented Mar 17, 2020

@JohanLorenzo I've removed the fetch-content script from the docker and ran a full set of tests and they are going well. Would you be able to merge this?

@JohanLorenzo
Copy link
Contributor

👍

I ran https://hg.mozilla.org/build/braindump/file/tip/taskcluster/taskgraph-diff/ to be sure the existing graphs aren't changed in an unexpected way. I saw the toolchain and the docker image tasks added, to them, which is good.

Thus, here we go!

@JohanLorenzo JohanLorenzo merged commit a457755 into mozilla-mobile:master Mar 17, 2020
@gmierz
Copy link
Contributor Author

gmierz commented Mar 17, 2020

Great, thanks for the reviews and merge @JohanLorenzo! :)

@JohanLorenzo JohanLorenzo removed the request for review from tomprince March 17, 2020 17:40
severinrudie pushed a commit to severinrudie/fenix that referenced this pull request Mar 18, 2020
…repo. (mozilla-mobile#9087)

* Add visual-metrics docker type.

* Add required browsertime toolchain fetches.

* Add browsertime tests for technical and visual metrics.

* Run browsertime tests in a cron task.

* Run visual metrics on all browsertime tests.

* Use spaces instead of tabs, and resolve visual-metric nits.

* Enable browsertime on pull request for testing.

* Restrict PR tests to amazon on browsertime.

* First attempt using multi_dep.

* Add a primary dependency to browsertime.

* Try by not popping.

* Debug prints.

* Make one grouping per browsertime task.

* Try without the multi_dep transform.

* Delete dependent-tasks in visual-metrics transformer.

* Update setuptools installed and copy run-on-tasks-for.

* Use get when getting run-on-tasks-for.

* Add new pinned requirements.

* Try it.

* Set run-on-tasks-for properly.

* Remove print statement.

* Remove single_dep loader, and print statements.

* Remove run-on-tasks-for testing setting.

* Restart testing, and set user to root in visual-metrics Docker.

* Remove testing settings.

* Remove fetch-content from Docker.

* Change attributes grouping method.

* Run all tests as a check.

* Undo testing changes, and fix a bad test name.
@liuche liuche mentioned this pull request Mar 24, 2020
32 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants