-
Notifications
You must be signed in to change notification settings - Fork 90
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
Support crater runs on Windows #399
Support crater runs on Windows #399
Conversation
Thanks, this looks great!
ring/OpenSSL are only used for HMAC at the moment, you can switch to the |
☔ The latest upstream changes (presumably #400) made this pull request unmergeable. Please resolve the merge conflicts. |
ab6f8f5
to
07fd80d
Compare
Unit tests are now running on AppVeyor, I had to change the heartbeat unit test to allow for successive timestamps to be equal. The |
You need to run |
07b8926
to
942515e
Compare
There's been some interest in getting this working, so I'm going to pick it up again. One issue that arose was the fact that docker doesn't set the Is this a blocker for doing proper |
Nah, of course it would be nice to get it working but it's not a blocker. |
3e8dab2
to
4f4bf57
Compare
4f4bf57
to
70d22ae
Compare
Some of this is kinda hacky, but I think it's ready for review. All unit tests and minicrater tests now pass on the azure instance I'm using for testing (once I adjust the hard-coded docker image to one which is compatible with Windows 1803). I'm curious if you have a more elegant way to separate out the I still need to integrate my Windows-specific provisioning instructions into the crater docs. That still depends somewhat on what version of Windows the |
70d22ae
to
61fdedf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this mostly looks good! Huge thanks for working on it! Left a few comments.
df0fd33
to
78cfcbb
Compare
Add steps for provisioning a Windows box to run `crater` This adds detailed set-up instructions for running `crater` on a Windows box. Obviously this depends on #399. I also tried to explain some of the complexity around Docker image compatibility.
5243fb1
to
9a5aa01
Compare
@pietroalbini should be ready for a final review. |
Also ensure that we get platform-specific line endings when checking out the expected logs.
Successive calls to `UTC::now` are not guaranteed to be monotonically increasing (indeed, they're not even guaranteed to be monotonically non-decreasing thanks to leap seconds and daylight saving time). However, the heartbeat unit test expects two timestamps constructed on either side of a database insert to not be equal. This test fails occasionally on AppVeyor. Perhaps they have an especially coarse clock (Spectre mitigation)? This test can still fail during a leap second or time zone adjustment, but such failures will be much rarer.
Due to rust-lang/rustup#1540, installing the docs on Windows can be slow enough to time out a fresh rustc install. Marking this `Command` as `quiet` increases the timeout.
Previously, `Crate::id` was used to define the location of the source directory of a crate on the filesystem as well as their identifier in generated reports. This meant paths containing "/" were passed as arguments to `docker --mount` on Windows.
This test will always on Windows because its docker engine does not yet support the `State.OOMKilled` flag. We move it out of `full` and into its own minicrater run (which is disabled on Windows).
This is obselete now that we normalize newlines in `*.expected.json` files.
This also adds a section in the provisioning docs about the "Enable Win32 long paths" option. Precise instructions are behind a Stack Overflow link, because this option is unstable and may change.
eb182fa
to
cdae40c
Compare
@pietroalbini. Rebased with |
@bors r+ Awesome! |
📌 Commit cdae40c has been approved by |
Support crater runs on Windows Resolves #149. This allows builds to run on [the newly added docker image](rust-lang/crates-build-env#5). In order to run successfully, you'll need to correctly [configure the Docker host](https://github.com/rust-lang/crater/blob/master/docs/agent-machine-setup-windows.md) ~~and `crater`'s `work` directory should have an ACL to enable full-access by the `"Authenticated Users"` group. This allows the container to write to the newly created `target` directories.~~ ~~The changes in the first commit don't belong in the finished product: Windows' permissions are [fundamentally different than the POSIX ones](https://en.wikipedia.org/wiki/Access_control_list) so I need to think more about how to change the current API to be more cross-platform. However, `.exe`s are executable by default on Windows and user remapping isn't done within the container anyways, so my changes were enough to this PR up and running.~~ ~~I couldn't get OpenSSL to link properly when building crater on Windows, despite setting `OPENSSL_DIR`, so I've temporarily reverted "switch from ring to openssl" to let me run tests. This should be un-reverted before this is merged.~~ ~~The last commit points to a self-published version of the docker image, not a `rust-ops` published one. An official version can be published once I get [CI up and running](rust-lang/crates-build-env#5 (comment)) for the Windows image.~~ The concerns listed above have all been resolved. The ACL change seems to have been obsoleted by later versions of Docker on Windows.
☀️ Test successful - checks-travis, status-appveyor |
I think bors failed to push it. |
What is going on with it... |
Resolves #149.
This allows builds to run on the newly added docker image. In order to run successfully, you'll need to correctly configure the Docker host
andcrater
'swork
directory should have an ACL to enable full-access by the"Authenticated Users"
group. This allows the container to write to the newly createdtarget
directories.The changes in the first commit don't belong in the finished product: Windows' permissions are fundamentally different than the POSIX ones so I need to think more about how to change the current API to be more cross-platform. However,.exe
s are executable by default on Windows and user remapping isn't done within the container anyways, so my changes were enough to this PR up and running.I couldn't get OpenSSL to link properly when building crater on Windows, despite settingOPENSSL_DIR
, so I've temporarily reverted "switch from ring to openssl" to let me run tests. This should be un-reverted before this is merged.The last commit points to a self-published version of the docker image, not arust-ops
published one. An official version can be published once I get CI up and running for the Windows image.The concerns listed above have all been resolved. The ACL change seems to have been obsoleted by later versions of Docker on Windows.