Conversation
|
Why should we use Azure Pipeline? Its configuration is out of scope for Windows support. |
|
Because AppVeyor has much more strict limits on parallel builds (for OSS projects), slower build times and less/other functionality. Right now this doesn't matter that much as the tests are only run for 1 Ruby, but if you want to get to a similar setup to Travis (many Rubies tested), this will get very relevant. Any reason why you think Azure Pipelines is not a good idea? |
Cost of Maintainance. I'm okay to use Travis and Appveyor only. I'm against to add the new CI platform that was duplicated process with existence CI. |
|
Then I suggest removing AppVeyor from this PR and only add the Azure Pipelines configuration. It will enable me much better to fix the Windows test failures as I get feedback on all 3 relevant platforms at the same time, in much less time. Agree? |
Don't agree. If you enabled only Windows, I will accept to merge this PR. It's better to make the small start at first. |
|
Ok. I removed AppVeyor and the Linux and macOS builds on Azure Pipelines and updated the initial PR description to match this stripped down PR. (This also makes it unnecessary to fix stuff like #6900, so this is good to merge right now. 🚀) |
|
To pull it out of the discussion on a code line at https://github.com/bundler/bundler/pull/6899/files/e182fcbeaa564f0d06a3a3d7fa62e3d8e132a873#diff-501fea893f314bd6414dabb1718c8127: This PR is currently on hold until I figure out what is going on with |
|
@janpio Thanks. I'm not familiar with Azure Pipeline yet. It's a good time to learn it for me. I also help to prepare to support the Windows environment. |
79e5f62 to
f26a978
Compare
dd27518 to
909c37f
Compare
909c37f to
b51b2be
Compare
|
Azure Pipelines can be pretty awesome - short wait times for builds and ok build times as well. And loads of different functionality if you need it. This PR is now good to merge as I found a workaround for #6902 that does not require any code changes in vendored https://dev.azure.com/janpio/bundler/_build/results?buildId=606 To activate Azure Pipelines for (For the template step, there should be a simple ruby template or just select an empty template - the actual build configuration is part of this PR and will come from here. No manual configuration should be necessary at all.) Then we should be able to start a build with the configuration of this PR by closing and reopening the PR or just merge this into (Ping me on Slack, username |
azure-pipelines/steps.yml
Outdated
| displayName: 'ruby bin/rake spec:deps' | ||
|
|
||
| - script: | | ||
| ruby bin/rspec --format progress -r rspec_junit_formatter --format RspecJunitFormatter -o rspec/bundler-junit-results.xml |
There was a problem hiding this comment.
this looks like it won't be testing against our chosen RubyGems versions, which is what the travis tasks handle
There was a problem hiding this comment.
Yes, I decided to not include this complexity already when there are >600 failing tests on Windows. From the PR description:
I chose not to adapt the rake travis task (yet) because it is much more complex than the "simple" bin/rspec test suite run which I could directly execute in the CI scripts of Azure Pipelines.
My idea was to start small, fix a few hundred failing tests, and then add the more complex build setup like you have it on Travis when the env differences will actually be visible and not hidden behind 600 test failures ;)
I would prefer to go forward with this much simpler build on Azure Pipelines, and revisit this later. Agree?
There was a problem hiding this comment.
I also think it's fine to start small and get bundler CI passing against any rubygems version, and later take care about completing the matrix and make sure bundler CI passes against all rubygems versions.
|
When Azure announced Ruby support for their Azure CI service, i was quick to jump onboard and looked into seeing if we could use it ourselves. But thinking about it over the past few weeks, i've been wondering if we're better off using AppVeyour instead. Appveyor is being used by most OSS Ruby projects on Github at the moment, and a lot of those Appveyor pipelines are being maintained by @MSP-Greg, who is a semi-regular contributor to the RubyGems and Bundler projects. If there was ever an issue with testing Bundler on Windows, we would have someone that is quite familiar with both domains to help resolve any issues. \cc @indirect thoughts? |
When Azure Pipelines (AP) was first announced, I thought I'd check into building Ruby trunk there. AP was new, MSFT obviously has resources far beyond what Travis & Appveyor have, and most importantly, it would run a lot of jobs parallel. I was trying code based on ruby-loco (largely PowerShell) and the ruby/ruby appveyor build code. A few notes:
Form bouncing around encouraging and helping with AV tests, the main issue I come across is the 'it takes too long'. AP will help with that. But, if I ported some repos over to AP, and the script doubled or tripled in size, most people would run away very quickly, as it's just too different from Travis. I'd certainly like to see bundler testing on Windows. I looked at it a long time ago, now I don't recall the difference between the 'bundler' testing in RG, vs the testing here. I haven't really looked at this PR, nor what work @janpio and @hsbt may have done. Off topic: I think many people in the OSS community don't like seeing a big guy (MSFT) rolling over a small guy (AV). AV has always been receptive to changes, but it takes forever to update their images (Ruby 2.6 isn't available yet), and they don't allow most accounts to test parallel (although Ruby CI runs two or three). At one point I posted several suggestions for AP, and several MSFT people were participating. They are supporting AP and they do want to see it adopted by the OSS community.... Sorry for the long post. I'm interesting in helping with whatever. |
|
I'm also happy to try out Azure Pipelines, since it seems like it will help us with our goal of running the Bundler tests on Windows. Once we have passing tests, we can compare Appveyor and Azure and see which one meets our needs best in the long run. I've added |
|
Thanks for adding the Azure Pipelines integration @indirect. As I removed the The Azure Pipelines tests of course will fail until I have all the Windows bugs fixes merged, which can take quite some time I suppose. Should I investigate if it is possible to configure Azure Pipelines to report "success" although the tests are failing? |
|
Maybe if you add |
|
That worked @deivid-rodriguez ❤️ Only the |
|
@janpio does the version of the gem matter? When you put it in the gemspec, you said On my machine, I was able to make it work by re-ordering the require. The script is currently running this command: When I changed it to this command instead, it seemed to work: Maybe give that a shot? |
Nope, that was just a copy paste thing from fastlane where we seem to be using that version.
That did indeed work ❤️ But why? |
80764be to
8ace8a5
Compare
|
It worked because our `bin/rspec` script loads some gems and then blocks off any more rubygems, to try to avoid issues when our specs run. The change loads the gem before our script
disables additional gem loads.
… On Feb 10, 2019, at 11:35 PM, Jan Piotrowski ***@***.***> wrote:
does the version of the gem matter?
Nope, that was just a copy paste thing from fastlane where we seem to be using that version.
When I changed it to this command instead, it seemed to wor
That did indeed work ❤️ But why?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Understood, it's always in the details ;) And that's a wrap, everything is working as it should now (I think):
I cleaned up the commits a bit, so this is good to merge now 🚀 |
|
Maybe you noticed that the "bundler.bundler" check is still in status "In progress - This check has started..." although on Azure Pipelines it has finished after ~40 minutes just fine. This seems to be a problem on Azure Pipelines caused by the numbers of tests failures of our build. I am in contact with their development team, who are working on a fix right now. Will update when there is news on this. |
a0e48c2 to
8ace8a5
Compare
|
👋 Apologies for the problem with the check not getting updated from Azure Pipelines. We had a bug in the check updater code when making a call to our Test Case Manager API. We sorted that out and we think that things should be 👍 from now on. |
|
Thanks @ethomson for the support with this, the Azure Pipelines check is indeed green now and this PR is finally really ready to merge 🚀 (I so want to work on decreasing that "671 failing tests" number!) |
|
@bundlerbot r+ |
6899: Windows CI: Azure Pipelines r=colby-swandale a=janpio ### What was the end-user problem that led to this PR? When I wanted to start to work on #6841 by adding a few tests, I quickly learned that bundler's test suite does not pass on Windows: #6868 ### What was your diagnosis of the problem? I decided to start working on fixing this, and created a few issues already: https://github.com/bundler/bundler/search?q=%22%5BWindows+test+failure%5D%22&unscoped_q=%22%5BWindows+test+failure%5D%22&type=Issues But it become clear to me, that the only way to really track the improvement was to add CI for Windows - otherwise opening PRs with improvements would not really make sense. ### What is your fix for the problem, implemented in this PR? This PR first makes it possible to run the test suite on Windows at all by "hiding" a bit of code behind `Gem.win_platform?` (`Spec::Manpages.setup` made it super complicated to run on Windows - and is not really necessary to run the test suite). It also works around a strange bug concerning `thor`'s (a vendored dependency) use of `readline` which crashes in strange ways on Windows (see #6902). And it adds applies a patch to the `readline` implementation used on CI (via RubyInstaller ruby) that otherwise blocks the tests (see #6907). Then it adds CI configuration for Azure Pipelines, a free for OSS CI platform. I configured the Azure Pipelines build to create a JUnit compatible report if the test suite and display it in the "Tests" tab of the build. ### Why did you choose this fix out of the possible options? I think disabling this code for Windows is a valid choice to get the ball rolling, later this will undone and the underlying problem will be fixed. I chose the workarounds for #6902 and #6907 as I couldn't find a proper bugfix yet - so this will be one of the things to be fixed using Windows CI. Azure Pipelines is a great CI platform for Windows (and later even multiple platforms if we choose to also run the tests on Linux and macOS). I chose not to adapt the `rake travis` task (yet) because it is _much_ more complex than the "simple" `bin/rspec` test suite run which I could directly execute in the CI scripts of Azure Pipelines. Co-authored-by: Jan Piotrowski <piotrowski+git@gmail.com> Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
Build succeeded |

What was the end-user problem that led to this PR?
When I wanted to start to work on #6841 by adding a few tests, I quickly learned that bundler's test suite does not pass on Windows: #6868
What was your diagnosis of the problem?
I decided to start working on fixing this, and created a few issues already: https://github.com/bundler/bundler/search?q=%22%5BWindows+test+failure%5D%22&unscoped_q=%22%5BWindows+test+failure%5D%22&type=Issues
But it become clear to me, that the only way to really track the improvement was to add CI for Windows - otherwise opening PRs with improvements would not really make sense.
What is your fix for the problem, implemented in this PR?
This PR first makes it possible to run the test suite on Windows at all by "hiding" a bit of code behind
Gem.win_platform?(Spec::Manpages.setupmade it super complicated to run on Windows - and is not really necessary to run the test suite).It also works around a strange bug concerning
thor's (a vendored dependency) use ofreadlinewhich crashes in strange ways on Windows (see #6902). And it adds applies a patch to thereadlineimplementation used on CI (via RubyInstaller ruby) that otherwise blocks the tests (see #6907).Then it adds CI configuration for Azure Pipelines, a free for OSS CI platform. I configured the Azure Pipelines build to create a JUnit compatible report if the test suite and display it in the "Tests" tab of the build.
Why did you choose this fix out of the possible options?
I think disabling this code for Windows is a valid choice to get the ball rolling, later this will undone and the underlying problem will be fixed.
I chose the workarounds for #6902 and #6907 as I couldn't find a proper bugfix yet - so this will be one of the things to be fixed using Windows CI.
Azure Pipelines is a great CI platform for Windows (and later even multiple platforms if we choose to also run the tests on Linux and macOS).
I chose not to adapt the
rake travistask (yet) because it is much more complex than the "simple"bin/rspectest suite run which I could directly execute in the CI scripts of Azure Pipelines.