Closed Bug 1562870 Opened 6 years ago Closed 6 years ago

Generate Conditioned profiles

Categories

(Testing :: Raptor, enhancement, P2)

enhancement

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: tarek, Assigned: tarek)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Create a Taskcluster Fetch job that produces/updates a collection of profiles into reusable artifacts

I think there are a couple of different things that will be needed here.

  1. some kind of "heavy" conditioning, which is done over time or relatively infrequently. This one is all about populating data in some way, wants versioning, etc. It's important that this can be parameterized to accommodate different behaviours and scenarios.

  2. quick "light" conditioning that mostly just bumps timestamps and ensures that periodic tasks are up-to-date (like safe browsing downloads). This one consumes a "heavy" profile and ensures its ready for a specific test or tests. This one is all about ensuring timestamps are fresh, doesn't need to persist for a long time, and needs to be fast enough to run before each and every tests.

The work is happening now in https://github.com/tarekziade/conditioned-profile and will eventually be added in our tree

Blocks: 1537944

Generates conditioned profiles
This is a work in progress. Pushing it so the patch is grabbable

status update: (will do one more Friday before I leave for 2 weeks) Nick I am :ni you so you get that update

try of the day (contains a cold and a heavy profile for the latest nighly, generated from linux)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f798181b2371f07a0304f4e3c044d834fd35748

The permanent link to the latest version of the indexed artifacts is https://tools.taskcluster.net/index/gecko.v2.try.latest.firefox/conditioned-profile
So if you want the heavy one, this is the permalink:

https://index.taskcluster.net/v1/task/gecko.v2.try.latest.firefox.conditioned-profile/artifacts/public/conditioned_profile/profile-linux-heavy-days-vanilla.tgz

next step is to push and vendor everything in mozilla-central so the CLI can be used from the task without downloading my binary release

Flags: needinfo?(nalexander)

Nicholas,

Following your comment at https://phabricator.services.mozilla.com/D38211#inline-232434 , I wanted to give here more details about my plans, to make sure it sounds good to you and we are aligned.

I think the key points of this project is to make sure:
1/ anyone that needs a profile can grab it using an URL of a zipped directory
2/ it's easy to change+add scenarii that produces said directoty, using a webdriver client
3/ the TC task runs smoothly for all the gecko flavors we're going to use to build profiles

After some discussions with David Burns about how android+webdriver is/will work in our testing environment, my plan to make this work for Android is to run geckodriver on the host, driving the target android build from within an emulator.

I am aware of https://bugzilla.mozilla.org/show_bug.cgi?id=1525126 and I know that there's a similar effort going on for WPT, so it seems to be
the path forward. If you think there's a better way please let's talk asap. I will surely ping Geoff as well to validate this model (I was planning to have him + someone from the TC team as reviewers once my try build is using a fully vendored version of the code -- today probably)

About the tools used: I am not using Marionette as you mentioned, the current code was recycled from a previous project that uses Arsenic, which is an equivalent of the selenium Python client. It drives geckodriver, chromedriver etc.. the same way, and I will probably need to tweak its behavior for the emulator, but I don't think that will require much work on that side.

I am completely agnostic about the tool that's used to produce the profile, as long as it produces the right HTTP webdriver calls, it's an implementation detail. An arsenic scenario is just a function that drives the browser, like other tools would do -- see https://github.com/tarekziade/conditioned-profile/blob/master/condprof/scenario/heavy.py#L57-L86

So, I am curious to understand what would be the benefit of moving to another toolchain for the MVP, as long as the profiles are built and it's easy to modify/add new scenarii. If there's a bigger plan in your mind, happy to discuss it. Once everything is plugged and working, using webdriver client A or webdriver B should not be too hard since everything is loosely coupled in the project -- but I can't think of a use case that's not possible with any webdriver client.

Depends on: 1567119

Thinking about extending this work to android, I am reminded of https://searchfox.org/mozilla-central/source/testing/mozharness/scripts/android_emulator_pgo.py, which generates and retrieves fennec profiles for pgo builds; I believe :mshal is the expert on android pgo. android_emulator_pgo.py and all of our existing android continuous integration tasks rely on the AndroidMixin, https://searchfox.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/testing/android.py, to run and manage the emulator (or connect to a physical device on bitbar) and mozdevice, https://searchfox.org/mozilla-central/source/testing/mozbase/mozdevice/mozdevice, to access the device (install an app, launch an app, push/pull files).

Attachment #9078460 - Attachment description: Bug 1562870 - generate conditioned profiles [WIP] → Bug 1562870 - generate conditioned profiles r?gbrown,pmoore

Thanks Geoff, I updated the patch and added you and pmoore as reviewers + added on Phab the list of stuff that remains to be done.
I will be back on that work in August

Depends on: 1572404
Blocks: 1573432
No longer blocks: 1573432
Depends on: 1573432
Depends on: 1576726
Blocks: 1576837
Depends on: 1574849
Depends on: 1577815
Attachment #9078460 - Attachment description: Bug 1562870 - generate conditioned profiles r?gbrown,pmoore → Bug 1562870 - generate conditioned profiles r?gbrown
Depends on: 1578559
Depends on: 1559120
Depends on: 1579998
Depends on: 1567642

Geoffrey, do you have a bit of time to do a new review ? I think it's ready to land (besides the bitbar worker types that we'll need to tweak)

Flags: needinfo?(gbrown)

Done!

Flags: needinfo?(gbrown)
Attachment #9078460 - Attachment description: Bug 1562870 - generate conditioned profiles r?gbrown → Bug 1562870 - generate conditioned profiles r?gbrown,bc,aerickson
Pushed by tziade@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0ba466d216a generate conditioned profiles r=gbrown,bc,aerickson
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

This has landed so clearing NI.

Flags: needinfo?(nalexander)
Version: Version 3 → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: