Support ruby 3
Let's upgrade to ruby 3
Need new gems:
- [x] https://github.com/ManageIQ/jquery-rjs/pull/9 ~~Needs merge, release, then we can use that release~~ 0.1.1.3 released
- [x] https://github.com/ManageIQ/foreman_api_client/pull/20 ~needs release, then, we can bump the provider to use this version~ 1.0.2 released
- [x] https://github.com/ManageIQ/manageiq-providers-foreman/pull/107
- [x] https://github.com/ruport/ruport/pull/64 merged, ~~needs release~~ released as 1.8.0
Dependencies:
- [x] https://github.com/ManageIQ/foreman_api_client/pull/20
- [x] https://github.com/ManageIQ/inventory_refresh/pull/109
- [x] https://github.com/ManageIQ/manageiq-messaging/pull/71
- [x] https://github.com/ManageIQ/manageiq-providers-amazon/pull/791
- [x] https://github.com/ManageIQ/manageiq-providers-ansible_tower/pull/286
- [x] https://github.com/ManageIQ/manageiq-providers-awx/pull/7
- [x] https://github.com/ManageIQ/manageiq-providers-azure_stack/pull/86
- [x] https://github.com/ManageIQ/manageiq-providers-google/pull/236
- [x] https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/471
- [x] https://github.com/ManageIQ/manageiq-providers-openshift/pull/231
- [x] https://github.com/ManageIQ/manageiq-providers-openstack/pull/825
- [x] https://github.com/ManageIQ/manageiq-providers-oracle_cloud/pull/77
- [x] https://github.com/ManageIQ/manageiq-providers-ovirt/pull/615
- [x] https://github.com/ManageIQ/manageiq-providers-red_hat_virtualization/pull/11
- [x] https://github.com/ManageIQ/manageiq/pull/21941
- [x] https://github.com/ManageIQ/query_relation/issues/25
- [x] https://github.com/ManageIQ/manageiq-providers-vmware/pull/822
- [x] https://github.com/ManageIQ/manageiq-schema/pull/662
- [x] https://github.com/ManageIQ/manageiq-ui-classic/pull/8443
- [x] https://github.com/ManageIQ/manageiq-automation_engine/pull/509
After this PR is merged:
- [ ] Update all workflows/ci.yaml for all repos to test with ruby 3
- [ ] https://github.com/ManageIQ/manageiq-rpm_build/pull/304
- [ ] https://github.com/ManageIQ/manageiq-pods/pull/891
- [ ] https://github.com/ManageIQ/manageiq-appliance-build/pull/524
@miq-bot cross-repo-tests /all ManageIQ/inventory_refresh#97
@miq-bot cross-repo-tests /all ManageIQ/inventory_refresh#97
@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21531, /all including https://github.com/ManageIQ/manageiq/pull/21531, https://github.com/ManageIQ/inventory_refresh/pull/97
@miq-bot cross_repo_tests #21531,/core including #21531, ManageIQ/inventory_refresh#97
@miq-bot cross_repo_tests #21531,/all including #21531, ManageIQ/inventory_refresh#97
I feel that the kwargs changes can just get merged into master and not be part of this PR (including the spec changes that split out the kwargs. Not sure about the message send with the last arg auto converted into a hash. I agree that we can hold off on that one until we figure out if there is another way)
@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21531,/all including https://github.com/ManageIQ/manageiq/pull/21531, https://github.com/ManageIQ/inventory_refresh/pull/97
Opened https://github.com/ManageIQ/foreman_api_client/issues/19, because foreman_api_client doesn't work on Ruby 3.0
Opened https://github.com/ManageIQ/manageiq-messaging/issues/70 to support 3.0 in manageiq-messaging
Opened https://github.com/ManageIQ/query_relation/issues/24 to support 3.0 in query_relation
update:
- rebased to master (to fix merge issues)
- rebased to accept the kwargs changes
- just pulled out another PR... we'll see how that goes
update:
- rebased master (kwargs was merged in separate PR and had a few changes)
@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21531,/all including https://github.com/ManageIQ/manageiq/pull/21531, https://github.com/ManageIQ/inventory_refresh/pull/97
@miq-bot cross_repo_tests https://github.com/ManageIQ/manageiq/pull/21531, /all including https://github.com/ManageIQ/manageiq/pull/21531
@agrare is this is valid test now that we use kwargs on inventory refresh master branch:
https://github.com/ManageIQ/manageiq/blob/e0864dbb4fad6fefae3074a519f1619f49519a7f/spec/models/manageiq/providers/inventory/persister/finders_spec.rb#L61-L75
I can't get this to pass on both ruby 2.7 and ruby 3.
1) ManageIQ::Providers::Inventory::Persister checks that we recognize first argument vs passed kwargs
Failure/Error:
expect do
persister.vms.lazy_find({:name => "name"}, :ref => :by_name)
end.to(raise_error(expected_error))
expected Exception with "Finder has missing keys for index :manager_ref, missing indexes are: [:ems_ref]" but nothing was raised
# ./spec/models/manageiq/providers/inventory/persister/finders_spec.rb:70:in `block (2 levels) in <top (required)>'
I noticed you deleted a very similar test in the PR that's on master: https://github.com/ManageIQ/inventory_refresh/pull/112/files
is this is valid test now that we use kwargs on inventory refresh master branch:
@jrafanie correct that is no longer a valid test as this case works now. I'm not sure why we were testing that something that should probably have worked all along didn't work :shrug:
I'm not sure why we were testing that something that should probably have worked all along didn't work 🤷
Originally it didn't work, which is why Ladas added the workaround code and a spec for it (so that if Ruby fixed it in the future we would know). Somewhere in the Ruby 3 journey it started to work (probably after we changed inventory_refresh to support both params and kwargs.)
spec/models/authenticator/database_spec.rb
- [ ] :exclamation: - Line 129, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 153, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 158, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 46, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 51, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 99, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
spec/models/authenticator/httpd_spec.rb
- [ ] :exclamation: - Line 188, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 193, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 216, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 221, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 261, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 266, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 289, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 294, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 323, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 336, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 349, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 367, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 380, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 393, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 502, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 507, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 530, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 535, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 541, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 571, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 576, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 581, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 586, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 694, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 699, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
spec/models/authenticator/ldap_spec.rb
- [ ] :exclamation: - Line 216, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 221, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 261, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 266, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 317, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 346, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 367, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 372, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 393, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 398, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 431, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 436, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 441, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 471, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 476, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 481, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 486, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
spec/models/miq_provision_spec.rb
- [ ] :exclamation: - Line 211, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
spec/models/resource_action_workflow_spec.rb
- [ ] :exclamation: - Line 151, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 81, Col 13 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
spec/models/service_template_provision_task_spec.rb
- [ ] :exclamation: - Line 162, Col 9 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
spec/models/service_template_spec.rb
- [ ] :exclamation: - Line 1009, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 1018, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 1032, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 1042, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 1056, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 1065, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 986, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
- [ ] :exclamation: - Line 995, Col 11 - Layout/FirstHashElementIndentation - Indent the right brace the same as the first position after the preceding left parenthesis.
I'm finished suggested changes and restarted the cross repo tests: https://github.com/ManageIQ/manageiq-cross_repo-tests/pull/706
I think we're ready to merge when things are green.
@agrare @bdunne @kbrock @Fryguy Ok, this is green, the 3.0 results are the same as the 2.7 ones (ui-service and api fail in the same way): https://github.com/ManageIQ/manageiq-cross_repo-tests/pull/706
I think we're ready to merge this and start building pods and appliances and ensuring all the repositories are testing with 3.0 going forward.