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

Interest in switching appveyor to docker #40711

Closed
TimNN opened this issue Mar 21, 2017 · 10 comments
Closed

Interest in switching appveyor to docker #40711

TimNN opened this issue Mar 21, 2017 · 10 comments
Assignees
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@TimNN
Copy link
Contributor

TimNN commented Mar 21, 2017

So apparently docker is available on windows [1] and appveyor [2] [3].

I was wondering if there was any interest in moving the appveyor builds to use docker -- which would make it easier to test windows builds locally without having to fiddle with msys / mingw / etc..

If there is interested (and no one else is interested in doing it) I would be interested in looking into that (after the LLVM 4.0 upgrade is done).

@alexcrichton
Copy link
Member

ZOMG YES PLEASE

Or more seriously, I would love to do this. It would:

  • Isolate us from changes in the AppVeyor environment (which happens from time to time)
  • Allow easy reproduction locally
  • Force us to write down what all our real dependencies are

I don't know if AppVeyor has support for this yet, but if they do then I see no reason to not implement this. I'd do it for OSX if I could...

@aidanhs
Copy link
Member

aidanhs commented Mar 24, 2017

Allow easy reproduction locally

Sadly, I suspect not many contributors have access to Windows server 2016 for isolating issues on ;)

(good idea regardless though)

@retep998
Copy link
Member

@aidanhs If you have Windows 10 Professional or Enterprise then you can use Windows Containers just fine.

@aidanhs
Copy link
Member

aidanhs commented Mar 24, 2017

Huh, neat. Thanks for pointing that out, I wasn't aware.

@alexcrichton
Copy link
Member

I believe AppVeyor has a new Visual Studio 2017 image and their list of updates claims an update to docker images, so maybe this is available now?

@TimNN would you be interested in poking around?

@TimNN
Copy link
Contributor Author

TimNN commented Apr 6, 2017

@alexcrichton: Sure, I'll look into it.

@TimNN TimNN self-assigned this Apr 6, 2017
@TimNN
Copy link
Contributor Author

TimNN commented Apr 7, 2017

I've started playing around with docker on windows and can report a first success: x86_64-pc-windows-gnu build and tested successfullyexcept for run-make, but we'll fix that in time in the container.

However one problem is already apparent: The size of the windows base image is ~10GB, though it luckily should be preloaded on windows servers with docker support (unless there are different versions of the image used). This nevertheless means that our current approach to caching docker images is no longer a viable option (at least I don't think so). Additionally just installing the necessary build tools (cmake, python, git, vcbuildtools) increases the image size by another 4GB, which will not be preloaded.

Thus I believe that before we can consider switching appveyor to docker we need to first consider alternative docker caching strategies, so that at least the base image can be excluded from the cache.


One possible caching strategy I could imagine:

  • hash the contents of the docker build directory
  • attempt to pull rust-lang/$image-$hash, where image is for example dist-x86_64-linux
  • if pull was unsuccessful build and push the image

Some thoughts on that method:

  • This may need some kind of stamp file to allow triggering a manual rebuild of images
  • This would probably need some logic to trigger a rebuild if the windows base image on appveyor changed (maybe include the image hash of the base image in our hash?)

@TimNN
Copy link
Contributor Author

TimNN commented Apr 8, 2017

Some other issues I encountered (although I haven't investigated them in depth yet):

  • I couldn't get volumes to work -- and even if they should work, some posts I read indicated volumes are implemented using smb / network shares, leading to serious performance problems.
  • Various problems with (console) i/o:
    • When attached with tty, some programs don't show their output (MSYS2-based programs don't output anything to console docker/for-win#262)
    • When not attached with tty some output is still not showing (eg. git download progress -- git checkout progress does work...), the terminal sometimes doesn't refresh / doesn't show the last few lines of output unless ENTER is pressed manually
    • Several operations feel kind of slow, eg. when doing a docker build it takes in the order of minutes to get from "the build container has stopped / disappeared from docker ps" to "the image has been created / appeared in docker images" (Although that may be a problem with my environment -- I'm testing in an Azure VM).

While I'll continue to investigate, my intuition says that it's a bit too early to use docker for windows for our ci builds.

@retep998
Copy link
Member

retep998 commented Apr 8, 2017

some posts I read indicated volumes are implemented using smb / network shares, leading to serious performance problems.

Even if there wasn't a performance problem, Rust is known for its high frequency of spurious failures when working off network drives due to assuming operations finish as soon as the function returns, despite that not actually happening because network drives. For example: #28002

@alexcrichton
Copy link
Member

Thanks for all the investigation @TimNN! Sounds like we unfortunately shouldn't jump the gun just yet :(

@Mark-Simulacrum Mark-Simulacrum added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. and removed A-infrastructure labels Jun 25, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants