Last Comment Bug 753547 - make mozharness test scripts easier to run standalone
: make mozharness test scripts easier to run standalone
Status: NEW
[mozharness]
:
Product: Release Engineering
Classification: Other
Component: Mozharness (show other bugs)
: other
: All All
-- normal (vote)
: ---
Assigned To: Jordan Lund (:jlund)
: Chris AtLee [:catlee]
:
Mentors:
Depends on: 1007280 1007292
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-09 14:33 PDT by Aki Sasaki [:aki]
Modified: 2014-09-17 07:44 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fix installer_path (943 bytes, patch)
2012-06-06 10:46 PDT, Aki Sasaki [:aki]
k0scist: review+
Details | Diff | Splinter Review

Description User image Aki Sasaki [:aki] 2012-05-09 14:33:20 PDT
Specifically if we want to run without downloading anything.

Currently that's peptest and talos and jetperf; I think I can get them in the same fix.
Comment 1 User image Aki Sasaki [:aki] 2012-06-06 10:46:47 PDT
Created attachment 630628 [details] [diff] [review]
fix installer_path
Comment 2 User image Aki Sasaki [:aki] 2013-02-26 23:43:14 PST
Not actively working on this.
This is still a big want, and I'd be happy to block mozharness 1.0 on this.
We have found that although mozharness is designed to be both user- and automation-runnable, it's definitely being written more for the latter.
Comment 3 User image Jordan Lund (:jlund) 2014-03-18 21:52:25 PDT
I woul
Comment 4 User image Jordan Lund (:jlund) 2014-03-18 21:55:47 PDT
I would like to pick this up.

I have some ideas on how we can be more consistent for devs and not so painful for us to change existing scripts.

I can discuss this at our next mozharness meeting.
Comment 5 User image Jordan Lund (:jlund) 2014-05-06 09:48:46 PDT
==== status update

I have some time today to start working on this
Comment 6 User image Jordan Lund (:jlund) 2014-05-07 13:09:19 PDT
There are two things that I think we need to accomplish that would help a lot and not take much work:

1) make actions more standalone and only have two places for config items -> bug 1007280
   * the two places would be
       1. self.config: a r/o cfg
           eg: consolidated from in-tree, urls, and/or within mozharness's config/*
       2. self.live_config: r/w cfg
           eg: consolidated from: a cache of previous run state, outside forces like automation that are only known at run time (ie currently: buildbot_config), and also updated while the script runs actions (ie currently: buildbot_properties)
2) hide buildbot integration -> bug 1007292
Comment 7 User image Aki Sasaki [:aki] 2014-05-07 15:23:28 PDT
(In reply to Jordan Lund (:jlund) from comment #6)
> There are two things that I think we need to accomplish that would help a
> lot and not take much work:
> 
> 1) make actions more standalone and only have two places for config items ->
> bug 1007280
>    * the two places would be
>        1. self.config: a r/o cfg
>            eg: consolidated from in-tree, urls, and/or within mozharness's
> config/*
>        2. self.live_config: r/w cfg
>            eg: consolidated from: a cache of previous run state, outside
> forces like automation that are only known at run time (ie currently:
> buildbot_config), and also updated while the script runs actions (ie
> currently: buildbot_properties)

Ah.  Ok, this could be very cool.

Some comments:

* I'd be worried a bit about this thing getting crufty.  I'd be curious if, say,

    scripts/mobile_l10n.py [args] --locale es-ES
    scripts/mobile_l10n.py [args] --locale zh-TW

if the second call does the right thing.  You have the --clobber check, but sometimes clobber will nuke more than you want; in the case of l10n, above, we want to run the zh-TW repack in an un-clobbered workdir.  It's just something to keep an eye on and guard against, rather than a reason not to do this.

* We should log very loudly when any setting in this live config changes (after the initial setup, during runtime).

* self.buildbot_config is very large and ugly, and we only need a subset of it.  However, sometimes we want to access more of it than we initially intended.  Are you planning on dumping all of it into the live config, or only the portions we think are important?

> 2) hide buildbot integration -> bug 1007292

This may be problematic if we have a different live config at the beginning than at the end of the script run -- how does someone then replicate the run without the buildprops.json?


I think we're going to end up with some in-tree mozharness at some point, so that may end up hiding buildbot_config from the developer-facing stuff anyway.  Could still be worth a look, especially for keeping actions independent.
Comment 8 User image Jordan Lund (:jlund) 2014-05-07 21:42:28 PDT
(In reply to Aki Sasaki [:aki] from comment #7)
> (In reply to Jordan Lund (:jlund) from comment #6)
> > There are two things that I think we need to accomplish that would help a
> > lot and not take much work:
> > 
> > 1) make actions more standalone and only have two places for config items ->
> > bug 1007280
> >    * the two places would be
> >        1. self.config: a r/o cfg
> >            eg: consolidated from in-tree, urls, and/or within mozharness's
> > config/*
> >        2. self.live_config: r/w cfg
> >            eg: consolidated from: a cache of previous run state, outside
> > forces like automation that are only known at run time (ie currently:
> > buildbot_config), and also updated while the script runs actions (ie
> > currently: buildbot_properties)
> 
> Ah.  Ok, this could be very cool.
> 
> Some comments:
> 
> * I'd be worried a bit about this thing getting crufty.  I'd be curious if,
> say,
> 
>     scripts/mobile_l10n.py [args] --locale es-ES
>     scripts/mobile_l10n.py [args] --locale zh-TW
> 

ok so how about cache_config is usable if: 1) clobber is not in actions 2) class names are the same 3) c.get('disable_cache') is False

where we set (3) in configs like ones that use mobile_l10n.py. It means for now things like mobile_l10n.py will not use a cache but it is a quick clean way to remove chance of cruft.

> * We should log very loudly when any setting in this live config changes
> (after the initial setup, during runtime).

/me makes verbose methods for anything that mutates self.live_config

> 
> * self.buildbot_config is very large and ugly, and we only need a subset of
> it.  However, sometimes we want to access more of it than we initially
> intended.  Are you planning on dumping all of it into the live config, or
> only the portions we think are important?

my reply below also is a reply to your other comments regarding buildbot_config,

self.buildbot_config is turning into a bit of a beast to deal with. Since we are likely splitting mozharness, I don't think it's worth solving today. But I think there is still a use in some of what I am doing: 

How about we still replace self.set_buildbot_property() cases with live_config?

We can also replace some self attr assignments (eg: self.installer_url from desktop builds) with live_config.

This fills live_config with only props that are important and set during individual actions. This, with its caching capabilities, should still help make actions more independent and lessen the mention of 'buildbot' in mozharness scripts.
Comment 9 User image Aki Sasaki [:aki] 2014-05-07 22:27:25 PDT
(In reply to Jordan Lund (:jlund) from comment #8)
> How about we still replace self.set_buildbot_property() cases with
> live_config?
> 
> We can also replace some self attr assignments (eg: self.installer_url from
> desktop builds) with live_config.
> 
> This fills live_config with only props that are important and set during
> individual actions. This, with its caching capabilities, should still help
> make actions more independent and lessen the mention of 'buildbot' in
> mozharness scripts.

I agree here, except set_buildbot_property() has downstream effects (sent to buildbot, which gets picked up by Pulse and downstream consumers).  The downstream names and our runtime names might not match currently.  We can certainly try to make them match if possible, though.
Comment 10 User image Jordan Lund (:jlund) 2014-05-13 10:06:43 PDT
==== status update

I have been moved to 'Bug 932396 - implement "disable" action in slaveapi' and 'Bug 965691 - Create a Comprehensive Slave Loan tool'

I am not actively working on this. I intend to take another stab at it once those are completed or I have some breathing room.

Note You need to log in before you can comment on or make changes to this bug.