Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Comments

Windows changes to make the HOME env var work#442

Merged
bors-servo merged 1 commit intoservo:masterfrom
larsbergstrom:more_windows
Jul 20, 2016
Merged

Windows changes to make the HOME env var work#442
bors-servo merged 1 commit intoservo:masterfrom
larsbergstrom:more_windows

Conversation

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jul 19, 2016

There are two big changes here:

  1. Make setting the HOME env var work properly, filling in the builder name
  2. Just allow exceptions to fail to load buildbot and log normally. Right now, the print is being eaten by something, so it's super hard to debug failures with dynamic steps.

r? @edunham


This change is Reviewable

@aneeshusa
Copy link
Contributor

I mentioned this in #316 (comment) but unswallowing the exception here won't help. The exception Buildbot encounters is actually internal and occurs after our dynamic step is finished, when Buildbot tries to load the next step. We aren't respecting some of Buildbot 8's internal invariants, causing the exception. You can find out more about this by looking at the log files/digging into the source code of buildbot and the buildbot-travis project I linked.

step_env += envs.Environment({
# Set home directory, to avoid adding `cd` command every time
'HOME': r'C:\buildbot\slave\{}\build'.format(
self.builder_name),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add 4 spaces of indentation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the ), can then go on the next line for balance.

@larsbergstrom
Copy link
Contributor Author

Latest commit fixes servo/servo#12231

# s3cmd on Windows only works within msys
step_env += envs.Environment({
'MSYSTEM': 'MSYS',
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-4 spaces indentation please

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please add this to the other make_step function.

@larsbergstrom
Copy link
Contributor Author

OK, I think this addresses all of the formatting requests.

Note that I left the removal of the print statement and try block around the dynamic steps because otherwise right now there's no way (AFAIK) to debug the exception, as it gets swallowed, printed to /dev/null, and the only way you can tell is when you queue a job to that builder the steps look "off." @edunham mentioned she might switch it to use buildbot's logging infrastructure instead.

@aneeshusa
Copy link
Contributor

Please keep the print and try block intact. The log you need to look at is /home/servo/buildbot/master/twistd.log on servo-master1; search for setText to jump to the exception trace. Removing the try will not help because it exception is not thrown within our dynamic step, but after that step is finished, in the internals of buildbot when it tries to start the next step.

+1 for integrating with buildbot's logging infrastructure in the future though.

@aneeshusa
Copy link
Contributor

BTW, I started looking into that exception if you want to chat on IRC about it.

step_env += envs.upload_nightly
if self.is_windows:
# s3cmd on Windows only works within msys
step_env['MSYSTEM'] = 'MSYS'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use another envs.Environment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm, when I was using envs.Environment, the debugging seemed to indicate that it wasn't overwriting it - we were still getting the old value in testing. I can give it another try, though, and see what happens.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a stylistic change we can always make later, so I'm OK with this as-is if we need the PR for windows nightlies now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's already in deployment as-formatted, so I'm kinda tempted to get this landed (since I already feel bad about having an ad-hoc branch in production).

@aneeshusa
Copy link
Contributor

After some IRC chat it turns out I was looking at the wrong thing for the exception handling and removing the try is the best thing to do here; this is r=me with or without using an envs.Environment for the MSYSTEM and PATH variables.

@larsbergstrom
Copy link
Contributor Author

@bors-servo r=aneeshusa

@bors-servo
Copy link
Contributor

📌 Commit 239bcf8 has been approved by aneeshusa

@bors-servo
Copy link
Contributor

⌛ Testing commit 239bcf8 with merge 8f6afa9...

bors-servo pushed a commit that referenced this pull request Jul 20, 2016
Windows changes to make the HOME env var work

There are two big changes here:

1) Make setting the `HOME` env var work properly, filling in the builder name
2) Just allow exceptions to fail to load buildbot and log normally. Right now, the `print` is being eaten by something, so it's super hard to debug failures with dynamic steps.

r? @edunham

<!-- 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/442)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - travis

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants