Page MenuHomePhabricator

Allow the specification of a "mode" property on the LLDB Builder

Authored by zturner on Mar 4 2015, 10:23 AM.



The idea is that, if a builder goes red because of a failed atomic operation, we should be able to enter property "mode" with value of "fresh" from the build console and get the build working again without having to log into the machine.

Diff Detail

Event Timeline

zturner updated this revision to Diff 21216.Mar 4 2015, 10:23 AM
zturner retitled this revision from to Allow the specification of a "mode" property on the LLDB Builder.
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added reviewers: gkistanova, rfoos.
zturner added subscribers: Unknown Object (MLST), Unknown Object (MLST).
gkistanova edited edge metadata.Mar 10 2015, 10:12 AM

If I get the idea right, you need to reconcile the parameter "mode" with the property "mode", giving the priority to the property.
The patch as is wouldn't do what you want.

zturner updated this revision to Diff 21744.Mar 11 2015, 10:50 AM
zturner edited edge metadata.

Thanks for the pointers. To be honest I'm not very sure what I'm doing :) Does this look right?

No. Not really.
If I get what you are after, you need something like this:

from import WithProperties, Property

mode=Property('mode', default=svnMode),

And frankly, I'd rename 'svnMode' to just 'mode' to keep the naming consistent. Also please note that user provided mode would be passing through to the SVN object, so you might want to sanitize the values before calling SVN.

rnk added a subscriber: rnk.Mar 11 2015, 3:27 PM

We only need build properties if we want to be able to trigger different svn checkout modes manually from the web interface. If we don't need that, the original change was probably fine.

I think Rick originally had a concern that we wouldn't want to use
mode=fresh by default, and that it should only be used if the build
actually breaks, and someone can kick off a new build with mode=fresh from
the web interface.

I'm actually fine just making it the default, as I don't see any real
negative consequences. Or at least making it the default for my builder.

gkistanova accepted this revision.Mar 12 2015, 1:10 PM
gkistanova edited edge metadata.

Assuming you would fix the small issue with the line 59.


The check will always be true and you would never get 'update', since Property is an object renderable on a slave.
What you really want here is to use the 'default' parameter. Like this:

mode ="mode", default='update')

This revision is now accepted and ready to land.Mar 12 2015, 1:10 PM
chying added a subscriber: chying.Apr 15 2015, 1:28 PM

If I understand it correctly, you're trying to find a way to do clean svn checkout and clean build?

To do fresh checkout, you might want to use,

                         mode='full', method='fresh', .....))

as I don't think 'fresh' is a valid mode.

To do a clean build, you also need to delete build directory, because the object files are kept there based on build/compile step.

zturner closed this revision.Oct 15 2015, 1:53 PM