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 upMove buildbot logic to scripts in `/etc/ci` #316
Comments
|
How about the "steps"? |
|
Cool, I'll take a look next monday Ms2ger notifications@github.com 於 2016年4月16日 週六 下午3:37寫道:
|
|
Because we're executing arbitrary code from the git checkout, I don't feel comfortable moving the existing build scripts into the @Ms2ger I saw your comment about keeping the "steps" in and I started looking into it then. It can be done, but it's not quite as simple as @edunham's checklist makes out. Buildbot coordinates everything on the master and runs 'remote' shell commands on the workers, so we need a step that dynamically creates new steps from the git checkout; just running a script on the worker will make everything look like one step. I've prototyped a better solution for this, but it's a little hacky to achieve the dynamic steps behavior. (Buildbot Nine has explicit support for this though, so I feel comfortable using it as it appears to be sanctioned.) |
|
@Ms2ger @aneeshusa Excuse my ignorance, but what is the main benefit we want from steps? Is it for reusing the step? or more fine-grained selection of steps to run? or for error recovery or pin-pointing the failed step? I don't have much experience with buildbot so I'm curious. @aneeshusa : Thank you! Perhaps you can create a commit for your work so far so I can keep you as the author of that commit? |
|
@shinglyu See #325 for what I have so far (sorry it took me a while to get it together). I'd like to see #325 landed, then we can follow @edunham's checklist. We'll need to change the configuration so instead of having DynamicServoFactory be responsible for creating a bunch of steps, we have a step that reads the yaml file from the servo repo and dynamically adds more steps. This can be accomplished by modifying Sorry for being a bit terse; I'm going to bed now (it's 4:30 AM here...) but I can explain things in more detail tomorrow. |
|
I'm particularly interested in having separate logs for stdout of different steps |
|
@aneeshusa Thanks for putting together #325! A big part of the reason I'd like to see this separated out (i.e., the main benefit) is that improvements to the specific steps, processing of the per-step output (as noted by @Ms2ger), etc. can all be made by contributors without direct access to our CI infrastructure. Today, rolling out CI changes is and has to be a manual process, sometimes involving complicated coordination with landing of PRs into servo/servo. |
|
@aneeshusa So what you mean is that we have a step that reads the yaml, and modifies its When #325 landed, we can merge the yaml into |
|
@shinglyu yes, that's right. The current |
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 Can I PR the YAML file into main servo repo? Or do you want to do it yourself? |
|
@aneeshusa Sounds good. I'll do as you said. |
Move buildbot step to yaml This is a step of servo/saltfs#316 After this patch lands, we'll PR the saltfs code to read from this yaml file, and dynamically generate test steps at runtime. cc @aneeshusa @edunham <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10849) <!-- Reviewable:end -->
|
@aneeshusa I'm struggling to understand how salt and buildbot works together. I tried to setup the Vagrant VMs using the hack in #344, but I'm not sure what to do next. What is the minimal setup + step I can test the code you changed? And I'd be very grateful if you can explain how things works together, e.g. how the VMs work together and what triggers what. |
|
@shinglyu The Buildbot master is on the We also have a test suite that checks a few things about the Buildbot configuration; running it in Vagrant requires some extra steps but you can use We don't yet have a good story for testing Buildbot's functionality to this level (i.e. having the master running with some workers, sending builds and making sure they work properly). The VMs are all run individually right now, and don't connect to each other yet; we have mostly been using Vagrant to check files and permissions, not services yet. Since our testing story is weak, I would ask that in your PR you simply add a new builder that uses the updated logic in your PR (and keep the existing ones), so that we can test that one out without breaking our existing deployment. Improvements to testing are always welcome! The workflow I'd recommend is:
This could definitely be documented better, so feel free to update the wiki Buildbot and SaltStack pages with anything you found helpful. Also, I'm in the opposite time zone from you (EDT), but you should be able to catch me on IRC late my time/early your time. |
|
@aneeshusa Thank you! So I only have to work with I'll give it a try and get back to you, thank you :) |
|
@shinglyu Yup, that's right. Once we've deployed the new builder and made sure it works properly, we can switch over the other builders in another PR. |
|
@aneeshusa How do I start buildbot in the
|
|
@larsbergstrom Suggested me not to setup everything for testing, since it's too complicated and doesn't worth the effort. @aneeshusa I wonder how we can get the |
|
Are we still moving forward with this? |
|
I just got around to reviewing @shinglyu's PR a few days ago, so waiting for him to address the comments. It looks pretty close though already. |
|
I don't think this needs an absolute path - the docs use an relative path - so I'd like to look at the logs again (e.g. did we run the git step first?). However, since you rolled back, Buildbot no longer remembers anything about |
|
This has been rolled back out, and you can see the non-gated |
|
#424 should fix the "no such file or directory" error - failing to even exec is what tippped me off. |
Add linux dev yaml <!-- Please describe your changes on the following line: --> Sync `steps.yml` from saltfs and add `linux-dev-yaml` builder for testing steps.yml switchover. Helps with servo/saltfs#316. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because linux-dev-yaml is non-gated and other changes are running in production <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12200) <!-- Reviewable:end -->
|
Are we going anywhere with this? |
|
@Ms2ger TL; DR; Yes. At this point, we're successfully reading the steps from the servo repo but our new step creation is missing a few things. The latest development was #424 to fix a small bug in step lookup. It needs to be deployed but based on some previous testing in prod and looking at the log files, we need to do a little more tweaking when we create steps to avoid breaking Buildbot's internal invariants. (Buildbot 0.8.12 which we run doesn't explicitly support this behavior, but Buildbot 9 will.) I'm fairly sure I can figure it out based on the log files and this related project, which has a Buildbot contributor as one of the main authors. I'm hoping to look at this when I have some time later this week. |
…gstrom Respect Buildbot invariants when adding new steps This will prevent crashes when Buildbot tries to execute dynamically added steps. I'm not sure if I got everything needed, so this may require some followups. Part of #316. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/501) <!-- Reviewable:end -->
…arsbergstrom Propagate default workdir for newly created steps The StepsYAMLParsingStep is statically in the step list of the factory, so when starting a build Buildbot will call `setDefaultWorkdir` on each step. We need to save this value and propagate it to the steps we create on the fly to ensure they also receive a workdir value. Another step towards #316. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/502) <!-- Reviewable:end -->
|
The saltfs Buildbot configuration is now able to successfully run builds from the |
Sync Buildbot steps config from saltfs <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes are part of servo/saltfs#316 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just copy the steps configuration <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Now that our Buildbot configuration is successfully able to read the steps configuration from the main servo repo and run builds, sync the steps in the servo tree to match the latest steps.yml from the saltfs repo. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13611) <!-- Reviewable:end -->
…rsbergstrom Remove old DynamicServoFactory which reads from saltfs Now that the new dynamic factory is working (which reads the steps configuration from the main servo repo), remove the old one. However, re-use the old name (DynamicServoFactory instead of DynamicServoYAMLFactory) for concision and clarity. Fixes #316. Blocked on servo/servo#13611. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/504) <!-- Reviewable:end -->
…eeshusa:migrate-steps-from-saltfs); r=Ms2ger <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes are part of servo/saltfs#316 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just copy the steps configuration <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Now that our Buildbot configuration is successfully able to read the steps configuration from the main servo repo and run builds, sync the steps in the servo tree to match the latest steps.yml from the saltfs repo. Source-Repo: https://github.com/servo/servo Source-Revision: ff04558ce26203cc3eb63edc9a15a6e6622b814a
…; r=aneeshusa This is a step of servo/saltfs#316 After this patch lands, we'll PR the saltfs code to read from this yaml file, and dynamically generate test steps at runtime. cc aneeshusa edunham Source-Repo: https://github.com/servo/servo Source-Revision: fbc575407d68a516a2b15a0d1c74150a9011aa9c UltraBlame original commit: 0f5257cca654a68a59d6ff49c715a7f29e11dafe
…v-yaml); r=larsbergstrom <!-- Please describe your changes on the following line: --> Sync `steps.yml` from saltfs and add `linux-dev-yaml` builder for testing steps.yml switchover. Helps with servo/saltfs#316. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because linux-dev-yaml is non-gated and other changes are running in production <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: a4b6705c02910d6b4dfcc0b2a9e2c909dfc89ef9 UltraBlame original commit: bbefb3e62a926cfc6b4fddc6441b91d7d695d39c
…eeshusa:migrate-steps-from-saltfs); r=Ms2ger <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes are part of servo/saltfs#316 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just copy the steps configuration <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Now that our Buildbot configuration is successfully able to read the steps configuration from the main servo repo and run builds, sync the steps in the servo tree to match the latest steps.yml from the saltfs repo. Source-Repo: https://github.com/servo/servo Source-Revision: ff04558ce26203cc3eb63edc9a15a6e6622b814a UltraBlame original commit: 75eb5e296a1be66179f7f5691828dc136e95700f
…; r=aneeshusa This is a step of servo/saltfs#316 After this patch lands, we'll PR the saltfs code to read from this yaml file, and dynamically generate test steps at runtime. cc aneeshusa edunham Source-Repo: https://github.com/servo/servo Source-Revision: fbc575407d68a516a2b15a0d1c74150a9011aa9c UltraBlame original commit: 0f5257cca654a68a59d6ff49c715a7f29e11dafe
…v-yaml); r=larsbergstrom <!-- Please describe your changes on the following line: --> Sync `steps.yml` from saltfs and add `linux-dev-yaml` builder for testing steps.yml switchover. Helps with servo/saltfs#316. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because linux-dev-yaml is non-gated and other changes are running in production <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: a4b6705c02910d6b4dfcc0b2a9e2c909dfc89ef9 UltraBlame original commit: bbefb3e62a926cfc6b4fddc6441b91d7d695d39c
…; r=aneeshusa This is a step of servo/saltfs#316 After this patch lands, we'll PR the saltfs code to read from this yaml file, and dynamically generate test steps at runtime. cc aneeshusa edunham Source-Repo: https://github.com/servo/servo Source-Revision: fbc575407d68a516a2b15a0d1c74150a9011aa9c UltraBlame original commit: 0f5257cca654a68a59d6ff49c715a7f29e11dafe
…v-yaml); r=larsbergstrom <!-- Please describe your changes on the following line: --> Sync `steps.yml` from saltfs and add `linux-dev-yaml` builder for testing steps.yml switchover. Helps with servo/saltfs#316. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because linux-dev-yaml is non-gated and other changes are running in production <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: a4b6705c02910d6b4dfcc0b2a9e2c909dfc89ef9 UltraBlame original commit: bbefb3e62a926cfc6b4fddc6441b91d7d695d39c
…eeshusa:migrate-steps-from-saltfs); r=Ms2ger <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes are part of servo/saltfs#316 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just copy the steps configuration <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Now that our Buildbot configuration is successfully able to read the steps configuration from the main servo repo and run builds, sync the steps in the servo tree to match the latest steps.yml from the saltfs repo. Source-Repo: https://github.com/servo/servo Source-Revision: ff04558ce26203cc3eb63edc9a15a6e6622b814a UltraBlame original commit: 75eb5e296a1be66179f7f5691828dc136e95700f
…eeshusa:migrate-steps-from-saltfs); r=Ms2ger <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes are part of servo/saltfs#316 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just copy the steps configuration <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Now that our Buildbot configuration is successfully able to read the steps configuration from the main servo repo and run builds, sync the steps in the servo tree to match the latest steps.yml from the saltfs repo. Source-Repo: https://github.com/servo/servo Source-Revision: ff04558ce26203cc3eb63edc9a15a6e6622b814a UltraBlame original commit: 75eb5e296a1be66179f7f5691828dc136e95700f
Possibly of interest to @shinglyu.
Right now a lot of build logic is hard-coded in https://github.com/servo/saltfs/blob/master/buildbot/master/files/config/master.cfg . Ideally, Buildbot would only invoke scripts from https://github.com/servo/servo/tree/master/etc/ci.
It looks like the only templating in
master.cfgis to insert the value ofcommon.servo_home, which is set in https://github.com/servo/saltfs/blob/master/common/map.jinja because it differs between Mac and Linux.to deploy:
servo/servo; land them. servo/servo#10849servo/saltfschanging buildbot config to invoke the build scripts