Closed kbrock closed 2 weeks ago
For build, EL9 ships with ruby 3.0 by default and has dnf modules for 3.1 and 3.3, but not 3.2.
so weird that el9 jumped a version 😕
The gem build failure for ovirt-engine-sdk
is frustrating.
I can see that @jrafanie and others had issues building it for https://github.com/oVirt/ovirt-engine-sdk-ruby/issues/11
Hopefully it shouldn't be too hard. Guess this is where it all begins. Wish they had a C
guide titled "this is what changed over the past 20 years" - because that code has a bunch of stuff I do not recognize
ov_http_request.c:75:29: warning: excess elements in array initializer
75 | .reserved = { NULL, NULL }
| ^~~~
ov_http_request.c:75:29: note: (near initialization for
‘ov_http_request_type.function.reserved’)
ov_http_request.c: In function ‘ov_http_request_define’:
ov_http_request.c:347:77: error: ‘rb_cData’ undeclared (first use in this
function)
347 | ov_http_request_class = rb_define_class_under(ov_module,
"HttpRequest", rb_cData);
|
^~~~~~~~
ov_http_request.c:347:77: note: each undeclared identifier is reported only once
for each function it appears in
ov_http_request.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been
intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have
been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:248: ov_http_request.o] Error 1
This looks alittle different. There's no option reported in the output to silence it.
That's also an error, whereas the others were warnings.
That's also an error, whereas the others were warnings.
sorry, it's different than the one we had previously where it told you that you can ignore it by opting into that behavior:
implicit function declarations [-Wimplicit-function-declaration]
https://github.com/oVirt/ovirt-engine-sdk-ruby/issues/11
This one is a undeclared variable if I'm reading correctly.
@jrafanie in the linked issue from your last comment you tried to build version 4.6.0 of ovirt engine sdk. This error is because the CI pulls 4.4.1 and it is unrelated. This issue has already been fixed with latest version. See https://github.com/oVirt/ovirt-engine-sdk-ruby/commit/97df88cb4c20a84632559c4d3cf1ac0d6224a2a0
@miq-bot cross_repo_test ManageIQ#23142 including ManageIQ/manageiq-providers-ovirt#676 ManageIQ/manageiq-providers-red_hat_virtualization#54
@kbrock I find this site more useful for detailing changes in Ruby:
update:
unsure: Do we want to force ruby => 3.1?
update:
- Hash#shift (empty returns nil instead of default)
Is there anything we need to do here? I assume it's difficult to find.
@jrafanie no. I searched through the code and it looks like we are all set, but left it as "outstanding" to let people know that a few of these may still be lurking.
ok. Ignoring specs:
Array.new(size, default_value)
: 1 instance. all set.Array.new(size) {}
: 12 instances. all setArray.new(size) do
: 4 instances.@bdunne are you good with smoke tests of appliances/pods with ruby 3.3? Are we good to go?
@kbrock add radjabov if this is for backport.
LGTM, @bdunne @Fryguy merge when ready.
🎉 🕺 🏆 🎉 🕺 🏆 🎉 🕺 🏆
Backported to radjabov
in commit a4e4a739cdd1feeda8948253bfdd8564b6508592.
commit a4e4a739cdd1feeda8948253bfdd8564b6508592
Author: Jason Frey <fryguy9@gmail.com>
Date: Wed Nov 13 17:30:47 2024 -0500
Merge pull request #23142 from kbrock/ruby33
Upgrading ruby to 3.3
(cherry picked from commit 3fb39c3b87d88a144d8bf03cf49b7a42dbf5bd8d)
3.2 ref
Highlights:
Regexp.timeout = 1.0
orRegexp.new('^a*b?a*()\1$', timeout: Float::INFINITY)
Struct
no longer needskeyword_init
Fixnum
,Bignum
Random::DEFAULT
,Struct::Group
,Struct::Passwd
Dir.exists?
,File.exists?
Kernel#=~
,Kernel#taint
,Kernel#untaint
,Kernel#tainted?
,Kernel#trust
,Kernel#untrust
,Kernel#untrusted?
libyaml
. (was inpsych
. May needlibyaml-dev
on ubuntu)libffi
. (was infiddle
- only used on windows)Queue#pop
,SizedQueue#push
,SizedQueue#pop
added paramtimeout:
3.3
punt:
ERB::Util.html_escape
is made faster thanCGI.escapeHTML
require "set"
(supporting older ruby versions)External PRs
These were changed in external libraries and make using them easier, but are not required for our upgrade.
Related PRs
providers:
current solution