RESOLVED FIXED Bug 123559
build.webkit.org should have a clean build button
https://bugs.webkit.org/show_bug.cgi?id=123559
Summary build.webkit.org should have a clean build button
Ryosuke Niwa
Reported 2013-10-30 23:31:29 PDT
We should be able to trigger a clean build without having to ask buildslave owners to manually delete WebKitBuild directory.
Attachments
Adds the feature (8.87 KB, patch)
2013-10-30 23:36 PDT, Ryosuke Niwa
no flags
Reverted errornous changes to Authz (8.70 KB, patch)
2013-10-30 23:46 PDT, Ryosuke Niwa
no flags
Add a boolean to the existing forced scheduler (8.77 KB, patch)
2013-10-31 13:40 PDT, Ryosuke Niwa
darin: review+
Ryosuke Niwa
Comment 1 2013-10-30 23:36:05 PDT
Created attachment 215621 [details] Adds the feature
Ryosuke Niwa
Comment 2 2013-10-30 23:36:41 PDT
Comment on attachment 215621 [details] Adds the feature View in context: https://bugs.webkit.org/attachment.cgi?id=215621&action=review > Tools/BuildSlaveSupport/clean-build:3 > +# Copyright (C) 2012 Google Inc. All rights reserved. This is because I copied some code from delete-stale-files.
Ryosuke Niwa
Comment 3 2013-10-30 23:46:07 PDT
Created attachment 215622 [details] Reverted errornous changes to Authz
Csaba Osztrogonác
Comment 4 2013-10-31 05:20:06 PDT
Comment on attachment 215622 [details] Reverted errornous changes to Authz View in context: https://bugs.webkit.org/attachment.cgi?id=215622&action=review In general I like the idea to have a clean build feature on build.webkit.org, I have only some minor remarks. > Tools/ChangeLog:16 > + (CleanBuildIfScheduled.start): Added. Don't do a clean build if if this build wasn't schecueld by typo: schecueld > Tools/BuildSlaveSupport/build.webkit.org-config/make-passwords-json.py:12 > +#!/usr/bin/python > + > +import json > + > +with open('config.json', 'r') as config_file: > + config = json.load(config_file) > + passwords = {} > + for slave in config['slaves']: > + passwords[slave['name']] = 'a' > + > +with open('passwords.json', 'w') as passwords_file: > + passwords_file.write(json.dumps(passwords)) It is a good idea to have this script for testing. ;) But it would be great if we can avoid code duplication here. I mean we can move _create_mock_passwords_dict from mastercfg_unittest.py to this file. And then mastercfg_unittest.py can simple import and use it. And we can generate the password.json in this file in an "if __name__ == '__main__':" block. > Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:922 > + clean_scheduler = ForceScheduler(name="clean", > + builderNames=[str(builder['name']) for builder in config['builders']], > + reason=FixedParameter(name="reason", default="The 'Clean Build' button was pressed."), > + > + revision=StringParameter(name="revision", default="", regex=re.compile(r'^(\d*)$')), > + > + branch=FixedParameter(name="branch"), > + repository=FixedParameter(name="repository"), > + project=FixedParameter(name="project"), > + properties=[]) > + c['schedulers'].append(clean_scheduler) I prefer adding a new BooleanParameter to the existing ForceScheduler with clean name and False default value.
Alexey Proskuryakov
Comment 5 2013-10-31 09:36:44 PDT
How do we do clean builds now? Does it require logging in to the bot? IIRC buildbot's IRC bot can do clean builds, how does it achieve that without all the code added here?
Csaba Osztrogonác
Comment 6 2013-10-31 09:47:52 PDT
(In reply to comment #5) > How do we do clean builds now? Does it require logging in to the bot? Yes. > IIRC buildbot's IRC bot can do clean builds, how does it achieve that without all the code added here? webkitbot can't do clean builds now In my opinioin the change proposed by rniwa is the proper way to let committers trigger clean builds on the bots. If you log in on build.webkit.org with your SVN account (at right-bottom corner) you can trigger force build on a given revision now: http://build.webkit.org/builders/Apple%20Mavericks%20Debug%20%28Build%29 This change would add one more checkbox with "clean build" label.
Alexey Proskuryakov
Comment 7 2013-10-31 10:01:22 PDT
> webkitbot can't do clean builds now I'm not talking about webkitbot, I'm talking about one that's bundled with Buildbot itself. We used to run it, but no longer do.
Csaba Osztrogonác
Comment 8 2013-10-31 10:21:38 PDT
(In reply to comment #7) > > webkitbot can't do clean builds now > I'm not talking about webkitbot, I'm talking about one that's bundled with Buildbot itself. We used to run it, but no longer do. Ah, I misinterpreted. I checked buildbot's IRC bot, it seems it provides the same force build service as the web UI: http://docs.buildbot.net/0.8.6p1/manual/cfg-statustargets.html#status-IRC Unfortunately IRC bot can't authenticate users, but the web UI can. And I think some click is much more simpler than: ircbot: force build --revision 123456 --props=clean=True Apple Mavericks Release WK1 (Tests)
Ryosuke Niwa
Comment 9 2013-10-31 13:40:45 PDT
Created attachment 215673 [details] Add a boolean to the existing forced scheduler
Darin Adler
Comment 10 2013-10-31 14:07:02 PDT
Comment on attachment 215673 [details] Add a boolean to the existing forced scheduler View in context: https://bugs.webkit.org/attachment.cgi?id=215673&action=review > Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg:901 > # Validate SVN revision: number or emtpy string emtpy
Ryosuke Niwa
Comment 11 2013-10-31 14:13:16 PDT
Csaba Osztrogonác
Comment 12 2013-10-31 14:13:39 PDT
Comment on attachment 215673 [details] Add a boolean to the existing forced scheduler View in context: https://bugs.webkit.org/attachment.cgi?id=215673&action=review LGTM too. > Tools/ChangeLog:9 > + Add a new "clean" forced scheduler. When a build was created by this scheduler, CleanBuildIfScheduled > + step executes clean-build script that removes the WebKitBuild directory. Please update it before landing due to the latest change. > Tools/ChangeLog:16 > + (CleanBuildIfScheduled.start): Added. Don't do a clean build if if this build wasn't schecueld by typo: schecueld
Ryosuke Niwa
Comment 13 2013-10-31 14:20:05 PDT
Oops, I forgot to update the change log :(
Csaba Osztrogonác
Comment 14 2013-10-31 14:21:22 PDT
(In reply to comment #13) > Oops, I forgot to update the change log :( nevermind :)
Csaba Osztrogonác
Comment 15 2016-03-18 10:01:45 PDT
*** Bug 89391 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.