Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows changes to make the HOME env var work #442

Merged
merged 1 commit into from Jul 20, 2016

Conversation

@larsbergstrom
Copy link
Contributor

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
Member

aneeshusa commented Jul 20, 2016

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),

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

Add 4 spaces of indentation.

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

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

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

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

Add 4 spaces of indentation.

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

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

# Set home directory, to avoid adding `cd` command every time
'HOME': r'C:\buildbot\slave\{}\build'.format(
self.builder_name),
})

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

Subtract 4 spaces of indentation.

# Set home directory, to avoid adding `cd` command every time
'HOME': r'C:\buildbot\slave\{}\build'.format(
self.builder_name),
})

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

Subtract 4 spaces of indentation.

@larsbergstrom
Copy link
Contributor Author

larsbergstrom commented Jul 20, 2016

Latest commit fixes servo/servo#12231

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

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

-4 spaces indentation please

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

Also please add this to the other make_step function.

@larsbergstrom larsbergstrom force-pushed the larsbergstrom:more_windows branch from 2295426 to 239bcf8 Jul 20, 2016
@larsbergstrom
Copy link
Contributor Author

larsbergstrom commented Jul 20, 2016

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
Member

aneeshusa commented Jul 20, 2016

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
Member

aneeshusa commented Jul 20, 2016

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

@@ -109,6 +113,17 @@ def make_step(self, command):
elif arg == './etc/ci/upload_nightly.sh':
step_kwargs['logEnviron'] = False
step_env += envs.upload_nightly
if self.is_windows:
# s3cmd on Windows only works within msys
step_env['MSYSTEM'] = 'MSYS'

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

Use another envs.Environment here.

This comment has been minimized.

Copy link
@larsbergstrom

larsbergstrom Jul 20, 2016

Author Contributor

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.

This comment has been minimized.

Copy link
@aneeshusa

aneeshusa Jul 20, 2016

Member

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.

This comment has been minimized.

Copy link
@larsbergstrom

larsbergstrom Jul 20, 2016

Author Contributor

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
Member

aneeshusa commented Jul 20, 2016

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

larsbergstrom commented Jul 20, 2016

@bors-servo r=aneeshusa

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2016

📌 Commit 239bcf8 has been approved by aneeshusa

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2016

Testing commit 239bcf8 with merge 8f6afa9...

bors-servo added 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

bors-servo commented Jul 20, 2016

☀️ Test successful - travis

@bors-servo bors-servo merged commit 239bcf8 into servo:master Jul 20, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.