Bug 65200 - CSS Regions build bot should archive and upload output files
Summary: CSS Regions build bot should archive and upload output files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 57312
  Show dependency treegraph
 
Reported: 2011-07-26 12:24 PDT by Alexandru Chiculita
Modified: 2012-07-23 23:23 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.38 KB, patch)
2011-07-27 02:07 PDT, Alexandru Chiculita
aroben: review-
Details | Formatted Diff | Diff
Patch (5.26 KB, patch)
2011-07-28 00:38 PDT, Alexandru Chiculita
aroben: review-
Details | Formatted Diff | Diff
Patch (5.25 KB, patch)
2011-08-02 07:15 PDT, Alexandru Chiculita
aroben: review-
Details | Formatted Diff | Diff
Patch (5.21 KB, patch)
2011-08-02 07:25 PDT, Alexandru Chiculita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2011-07-26 12:24:08 PDT
Currently CSS Regions build bot does not store the output results. It should archive and upload the output to the buildbot master.
Comment 1 Alexandru Chiculita 2011-07-26 12:27:16 PDT
Make sure "features" are also taken into account when computing the file name of the archive folder. That way trunk snow leopard and css regions snow leopard will not overlap.
Comment 2 Alexandru Chiculita 2011-07-27 02:07:38 PDT
Created attachment 102108 [details]
Patch
Comment 3 Adam Roben (:aroben) 2011-07-27 05:07:51 PDT
Comment on attachment 102108 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102108&action=review

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:132
> +def determineExtraFeatures(build):

Can this be a member of the UploadBuiltProduct class?

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:134
> +    if (build.hasProperty("features")):

No need for the parentheses here.

I think using an early return would be clearer:

if not build.hasProperty('features'):
    return ''

Ditto for the len(features) check below.

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:141
> +

Missing an extra newline here.

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:623
>          if triggers:
>              self.addStep(ArchiveBuiltProduct)
>              self.addStep(UploadBuiltProduct)
> -            self.addStep(trigger.Trigger, schedulerNames=triggers)
> +            if triggers.count("upload-only") != len(triggers):
> +                self.addStep(trigger.Trigger, schedulerNames=triggers)

Is it OK to be passing "upload-only", which isn't a real trigger, to the schedulerNames parameter? Maybe it would be better to have some other way of specifying in config.json that you want the build uploaded. Then here you could do "if triggers or thatOtherThing:"
Comment 4 Alexandru Chiculita 2011-07-28 00:38:44 PDT
Created attachment 102233 [details]
Patch

Thanks for review! 

Added "upload" parameter that when set to "true" will upload the contents.
Comment 5 Adam Roben (:aroben) 2011-07-28 07:46:41 PDT
Comment on attachment 102233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102233&action=review

This is looking really close!

> Tools/BuildSlaveSupport/build.webkit.org-config/config.json:247
> +                      "upload": "true", "slavenames": ["adobe-mac-slave1"]

You can use a literal true value here. No need for the string. That will make the master.cfg logic simpler.

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:-131
> -

You should leave this extra line in place to match standard Python style.

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:133
> +    masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s%(extraFeatures)s/%(got_revision)s.zip", extraFeatures=lambda build:UploadBuiltProduct.determineExtraFeatures(build))

I'm surprised the lambda is needed.

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:741
> +            "upload": builder.pop("upload", None) == "true"

False would probably be a better default, especially once you start using a real True value instead of a string.
Comment 6 Alexandru Chiculita 2011-07-28 11:54:29 PDT
Comment on attachment 102233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102233&action=review

Thanks for the review.

>> Tools/BuildSlaveSupport/build.webkit.org-config/config.json:247
>> +                      "upload": "true", "slavenames": ["adobe-mac-slave1"]
> 
> You can use a literal true value here. No need for the string. That will make the master.cfg logic simpler.

Ok.

>> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:-131
>> -
> 
> You should leave this extra line in place to match standard Python style.

Ok.

>> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:133
>> +    masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s%(extraFeatures)s/%(got_revision)s.zip", extraFeatures=lambda build:UploadBuiltProduct.determineExtraFeatures(build))
> 
> I'm surprised the lambda is needed.

determineExtraFeatures will only be defined after this initialization. I'm new to python, so I might be wrong. The options that I found to be working are:
a. put the method at the module level 
b. use the lambda
c. move the method before masterdest, but I think it looks better to have the properties grouped at the top

>> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:741
>> +            "upload": builder.pop("upload", None) == "true"
> 
> False would probably be a better default, especially once you start using a real True value instead of a string.

Ok.
Comment 7 Adam Roben (:aroben) 2011-08-02 06:05:19 PDT
Comment on attachment 102233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102233&action=review

>>> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:133
>>> +    masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s%(extraFeatures)s/%(got_revision)s.zip", extraFeatures=lambda build:UploadBuiltProduct.determineExtraFeatures(build))
>> 
>> I'm surprised the lambda is needed.
> 
> determineExtraFeatures will only be defined after this initialization. I'm new to python, so I might be wrong. The options that I found to be working are:
> a. put the method at the module level 
> b. use the lambda
> c. move the method before masterdest, but I think it looks better to have the properties grouped at the top

The lambda seems OK. But you should rename the parameter to "properties", since what is passed is a Properties instance, not a Build instance.

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:140
> +    def determineExtraFeatures(build):

Same comment here about renaming "build" to "properties".
Comment 8 Alexandru Chiculita 2011-08-02 07:15:30 PDT
Created attachment 102644 [details]
Patch
Comment 9 Adam Roben (:aroben) 2011-08-02 07:18:56 PDT
Comment on attachment 102644 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102644&action=review

Just a couple of cosmetic issues this time. Looks great!

> Tools/BuildSlaveSupport/build.webkit.org-config/config.json:262
>                        "platform": "mac-snowleopard", "configuration": "release", "architectures": ["x86_64"], "features": ["css-regions", "css-exclusions"],
> -                      "slavenames": ["adobe-mac-slave1"]
> +                      "upload": true, "slavenames": ["adobe-mac-slave1"]

I'd recommend putting "upload": true on its own line above "slavenames".

> Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:135
> +                                extraFeatures=lambda properties:UploadBuiltProduct.determineExtraFeatures(properties))

Missing a space after the colon.
Comment 10 Alexandru Chiculita 2011-08-02 07:25:02 PDT
Created attachment 102647 [details]
Patch

Done.
Comment 11 WebKit Review Bot 2011-08-02 08:25:46 PDT
Comment on attachment 102647 [details]
Patch

Clearing flags on attachment: 102647

Committed r92191: <http://trac.webkit.org/changeset/92191>
Comment 12 WebKit Review Bot 2011-08-02 08:25:51 PDT
All reviewed patches have been landed.  Closing bug.