This is an archive of the discontinued LLVM Phabricator instance.

Allow users to force clean builds from the web
Needs ReviewPublic

Authored by rnk on Mar 1 2017, 10:13 AM.

Details

Reviewers
gkistanova
Summary

From time to time, buildbots may go red because the build directory
contains some bad intermediate state. For example, the CMakeCache.txt
file may be stale. Before this change, the only way to fix such a bot
was to contact the admin and wait for them to fix it. Now, users can
manually request clean builds without the help of a buildbot admin.

Also, clean the installation directories if we're doing a clean build.
Otherwise our packages uploaded to GCS may contain stale resource
directories or old executables that have been renamed.

Event Timeline

rnk created this revision.Mar 1 2017, 10:13 AM
gkistanova edited edge metadata.Mar 2 2017, 3:32 PM

Hello Reid,

Thanks for refactoring the ClangBuilder.

Unless I'm missing something, there are 3 changes in this patch:

  1. Clean property usage (in the title of this review item),
  2. Refactoring condition when a stage 1 build should install the results,
  3. Cleaning installed files and refactoring a bit the build files clean step on stage 2.

What do you think about splitting this to 3 patches?

zorg/buildbot/builders/ClangBuilder.py
633

Maybe using RemoveDirectory is more compatible? This command wouldn't work well on Windows targets.

654

You can skip this step and use FileDoesNotExist from zorg.buildbot.conditions.FileConditions in doStepIf of that cmake command instead.