Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse yaml for buildbot steps #325
Conversation
|
Having not looked at any of the rest of the implmentation, that's a really nice YAML configuration file! |
6ea740c
to
abfd027
|
A note I left myself yesterday: We don't need the
|
|
Also, to check that this works properly you can rename |
|
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, 2 of 2 files at r5, 3 of 3 files at r6, 1 of 1 files at r7, 4 of 4 files at r8, 2 of 2 files at r9, 3 of 3 files at r10, 2 of 2 files at r11. a discussion (no related file): a discussion (no related file): Comments from Reviewable |
|
This is an awesome PR! @edunham and I just spent some time reviewing it line by line and were in awe of how much cleaner everything will be after this. Nice work! |
|
These changes are beautiful, and were uniquely easy to review because of how well you structured your commits. Now our only changes are lines to add back into
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, 2 of 2 files at r5, 3 of 3 files at r6, 1 of 1 files at r7, 4 of 4 files at r8, 2 of 2 files at r9, 3 of 3 files at r10, 2 of 2 files at r11. Comments from Reviewable |
|
Thanks, I'm a stickler for using git commits + messages effectively :) Quick question about keeping the duplicates - the only two tests that should be duplicated are |
|
Yes, just lockfile/manifest_changed. The Cargo.lock file contains a list of all of the crates and versions used across all platforms. But, in a given platform-specific build, only a subset of those might get touched. Further, different platforms (cef, stylo, servo, and gonk) even have their own different Cargo.lock files that are only touched on those builds! That check tends to catch errors on builds that are not performed by the original author (e.g., MacOS package updates for people who only have linux). |
|
This seems to get rid of the |
|
@Manishearth the DynamicServoFactory.make_step method uses a little magic - sorry, heuristics In the future, we can make |
|
@larsbergstrom should we be running the lockfile and manifest checks on all the other builders as well, e.g. |
|
Yes, because each platform might pull in platform-specific packages which won't have been updated in the committer's lockfile. |
|
What's the equivalent of |
abfd027
to
eb3fad2
|
Added back pkill (note, it's first removed then added back in a later commit), and updated the steps.yml file. I also added a few TODO comments to do both of those things for Windows as well. |
|
@aneeshusa I think we want |
|
But yes, feel free to skip it on Windows for now! |
eb3fad2
to
d720a97
|
Fixed the build error. |
|
Reviewable just made me go through every commit again, but showed everything unchanged from before you rebased as being empty diffs. Still looks good, though :) Reviewed 9 of 9 files at r12, 1 of 1 files at r13, 1 of 1 files at r14, 2 of 2 files at r15, 2 of 2 files at r16, 1 of 1 files at r17, 3 of 3 files at r18, 1 of 1 files at r19, 4 of 4 files at r20, 2 of 2 files at r21, 2 of 2 files at r22, 8 of 8 files at r23, 1 of 1 files at r24, 3 of 3 files at r25, 1 of 1 files at r26, 4 of 4 files at r27, 2 of 2 files at r28, 2 of 2 files at r29, 1 of 1 files at r30. Comments from Reviewable |
|
Do we need to quote the commands in the yaml file? We might have some steps that has special characters that may be parsed incorrectly? |
|
Yaml is pretty good that way, it uses newlines so you rarely need to quote |
d720a97
to
195e548
|
|
We should be running pkill (or the platform-specific equivalent) at the start and end of each build, but this is really a CI detail, not something that is integral to the list of steps, so remove it for now.
The steps gzipping build logs did not have logfiles listed, so they were not available for download from the web interface. The only way to get the logs is via ssh/scp, which works just as well for non-gzipped logs. This will cut down on build times.
The existing mechanism for chaining environment dictionaries is a hack that Guido has noted as abuse of the '**' mechanism: https://mail.python.org/pipermail/python-dev/2010-April/099459.html Create a subclass that allows 'adding' in a single expression, as copy() + update() takes two lines. Use str.join for listing PATHs to keep lines short. This also exposed an error in the Windows PATH, with a missing semicolon between r'C:\msys64\usr\bin' and r'C:\Windows\system32'. Move the environments into a separate file to keep them all together. Rename the various environment variables for clarity and consistency. The environments.py file now passes flake8; this should be added to our test suite.
In order to move the build steps to the main servo repository, they must be converted from python code that requires the Buildbot library to be installed (to manually build steps) into more declarative steps. This commit starts this conversion by using heuristics to convert a list of shell commands (akin to those in a .travis.yml or .appveyor.yml file) into the appropriate Buildbot Steps. The doc factory and windows factory still use hardcoded steps; see the comments in the code for more details. The android nightly factory now uses a relative instead of absolute path for the .apk file to make the Jinja templating unnecessary.
This automatically runs pkill for each build. It is cleaner to put this in the main configuration instead of the lists of steps because this is a CI-related cleanup task, not a necessary step to run the build + test suite. Also, this ensures that the pkill step cannot be forgotten when adding new builders. Note: this doesn't work on Windows yet.
This was used a long time ago for bors, but Buildbot now reports status indirectly via Homu.
Also rename LINUX_RESERVED_SLAVES to LINUX_SLAVES, since all of our builders are now on reserved instances.
As a stepping-stone to having builder steps live in the main Servo repo, switch to a simple data format to express builder configuration (lists of strings accessed via yaml.safe_load) instead of needing to run or import arbitrary untrusted Python code. Currently, the YAML file is still part of the master configuration, but it is now ready to be moved to the main Servo repo.
Use linux-dev to run all lints because it is the fastest builder; these are platform-independent. Ensure that the lockfile_changed.sh and manifest_changed.sh scripts are run for every builder, since these are platform-dependent. Note: these should also be added for the Windows builder. This is also meant as an example of how much easier a YAML file makes it to edit our build scripts; note the lack of needing to know about `logfiles` or other parameters which have been forgotten in the past.
This test requires the flake8 python module; to ensure it is installed, add a requirements.txt file. Travis-CI will automatically install the dependencies specified in that file.
Currently, the only other python files are the test suite.
195e548
to
acf76a1
|
Rebased again; sorry to make you sit through another Reviewable session! |
|
@edunham I think this is probably good to go, right? At least, reviewable is just telling me it's a rebase with no edits, and I think everything is signed off... |
|
@larsbergstrom I agree, let's land it now and then test carefully. @bors-servo r+ |
|
|
Use yaml for buildbot steps A bunch of changes here including various removals and rearrangements; I'd recommend checking this commit by commit (including commit messages). This a) simplifies the Buildbot master configuration and b) uses YAML to configure build steps instead of Python code. This allows us to PR the YAML file over to the main servo repo for #316; I'd like to see this landed before working on the rest of #316. cc @edunham @shinglyu <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/325) <!-- Reviewable:end -->
|
|
aneeshusa commentedApr 18, 2016
A bunch of changes here including various removals and rearrangements; I'd recommend checking this commit by commit (including commit messages).
This a) simplifies the Buildbot master configuration and b) uses YAML to configure build steps instead of Python code. This allows us to PR the YAML file over to the main servo repo for #316; I'd like to see this landed before working on the rest of #316.
cc @edunham @shinglyu
This change is