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

CI: run on windows? #553

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

CI: run on windows? #553

wants to merge 4 commits into from

Conversation

cben
Copy link
Collaborator

@cben cben commented Mar 23, 2022

Don't know if it works, let's try :-)

'windows-latest` currently means Windows Server 2022
(https://github.blog/changelog/2022-01-11-github-actions-jobs-running-on-windows-latest-are-now-running-on-windows-server-2022/)

@cben
Copy link
Collaborator Author

cben commented Mar 23, 2022

🔴 ruby 2.5 to 3.0 fail with:

Run gem install rake bundler
ERROR:  Error installing rake:
	"rake" from rake conflicts with C:/hostedtoolcache/windows/Ruby/3.0.3/x64/bin/rake
Successfully installed bundler-2.3.9
1 gem installed

🔴 ruby 3.1, ruby-head, truffleruby-head pass bundle install 🎉 but fail with:

C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:159:in `rescue in create_default_data_source': No source of timezone data could be found. (TZInfo::DataSourceNotFound)
Please refer to https://tzinfo.github.io/datasourcenotfound for help resolving this error.
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:156:in `create_default_data_source'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:55:in `block in get'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:54:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:54:in `get'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/timezone.rb:235:in `data_source'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/timezone.rb:158:in `all_identifiers'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/timezone.rb:152:in `all'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:30:in `<class:UserInfo>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:3:in `<class:ResponseObject>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:2:in `<module:OpenIDConnect>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:1:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:7:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:7:in `block in <top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:6:in `each'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:6:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/connect_object.rb:52:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/connect_object.rb:52:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect.rb:101:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect.rb:101:in `<top (required)>'
	from D:/a/kubeclient/kubeclient/test/test_oidc_auth_provider.rb:2:in `require'
	from D:/a/kubeclient/kubeclient/test/test_oidc_auth_provider.rb:2:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:17:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:17:in `block in <main>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:5:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:5:in `<main>'
C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_sources/zoneinfo_data_source.rb:232:in `initialize': None of the paths included in TZInfo::DataSources::ZoneinfoDataSource.search_path are valid zoneinfo directories. (TZInfo::DataSources::ZoneinfoDirectoryNotFound)
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:157:in `new'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:157:in `create_default_data_source'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:55:in `block in get'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:54:in `synchronize'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:54:in `get'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/timezone.rb:235:in `data_source'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/timezone.rb:158:in `all_identifiers'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/timezone.rb:152:in `all'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:30:in `<class:UserInfo>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:3:in `<class:ResponseObject>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:2:in `<module:OpenIDConnect>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object/user_info.rb:1:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:7:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:7:in `block in <top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:6:in `each'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/response_object.rb:6:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/connect_object.rb:52:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect/connect_object.rb:52:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect.rb:101:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/openid_connect-1.3.0/lib/openid_connect.rb:101:in `<top (required)>'
	from D:/a/kubeclient/kubeclient/test/test_oidc_auth_provider.rb:2:in `require'
	from D:/a/kubeclient/kubeclient/test/test_oidc_auth_provider.rb:2:in `<top (required)>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:17:in `require'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:17:in `block in <main>'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:5:in `select'
	from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:5:in `<main>'
rake aborted!

@cben
Copy link
Collaborator Author

cben commented Jul 24, 2022

Yay, windows now on parity with other platforms, all CRuby versions actually run the tests, and all passed except #569 🎉

(Well, except truffleruby-head which apparently has no windows builds? anyway that's not a blocker.)

@cben cben mentioned this pull request Jul 24, 2022
@cben cben force-pushed the ci-windows branch 2 times, most recently from e887fe4 to 96be379 Compare July 25, 2022 06:31
@cben
Copy link
Collaborator Author

cben commented Jul 25, 2022

Force-pushed to use same rebased commits as #570.

now macos 2.5 keeps timing out 😕
It's not always at same moment — attempt 1 got stuck after test_get_from_json_oapi_v1, attempt 2 got stuck after test_timeouts_open, attempt 3 after test_irregular_names.

There is a warning that might or might not be related 🤷 :

Your RubyGems version (2.7.6.3) has a bug that prevents required_ruby_version from working for Bundler. Any scripts that use gem install bundler will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running gem update --system 3.2.3

I guess it's time to drop EOL Ruby 2.5 (and 2.6?) on master branch?

@cben cben closed this Aug 29, 2022
@cben cben reopened this Aug 29, 2022
@cben
Copy link
Collaborator Author

cben commented Sep 2, 2022

@cben cben force-pushed the ci-windows branch 4 times, most recently from 5683753 to 6dd4df1 Compare September 2, 2022 15:12
cben added 2 commits September 2, 2022 18:13
Hope this might fix "Error installing rake" errors.

- https://github.com/ruby/setup-ruby#windows has some indications Windows
  needs particular versions of bundler to work well, and IIUC setup-ruby
  should already install bundler, so rely on that.
- We do need rake but it's a kubeclient.gemspec dependency that
  `bundle install` should cover, avoid a global install with `gem`.
Needed on Windows:
https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors
tzinfo is required by (at least) openid_connect gem, which is an "optional"
dependency for kubeclient — users are supposed to bring it themselves if
they use 'oidc' auth — so making tzinfo-data a dev dependency.
cben added 2 commits September 2, 2022 18:36
Personally, I wish we were using:

    Style::TrailingCommaInHashLiteral:
      EnforcedStyleForMultiline: consistent_comma

but that'd require 49 fixes, too much noise.
@cben
Copy link
Collaborator Author

cben commented Sep 2, 2022

Bah, broke something in github actions file.

I'm tempted to just leave non-existant (windows, truffleruby) combination in, but I think the rubocop job was already broken (it did not use os_and_command) 🙄 so need to debug anyway...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant