这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jrafanie
Copy link
Member

@jrafanie jrafanie commented Oct 16, 2025

Replaces #23261

Merge AFTER 0.13.x / 1.x compatible change:

@jrafanie
Copy link
Member Author

@miq-bot cross-repo-tests /all, ManageIQ/manageiq-automation_engine#580

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Oct 16, 2025
gem "uri", "~> 0.13.3" # CVE-2025-61594: https://www.ruby-lang.org/en/news/2025/10/07/uri-cve-2025-61594/
# Avoid URI 1.0.0 for now due to: https://github.com/ruby/uri/issues/125
gem "thor", ">= 1.4.0" # CVE-2025-54314: https://github.com/advisories/GHSA-mqcp-p2hv-vw6x
gem "uri", "~> 1.0.4" # CVE-2025-61594: https://www.ruby-lang.org/en/news/2025/10/07/uri-cve-2025-61594/
Copy link
Member Author

@jrafanie jrafanie Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URI is the only change here... sorted this group of gems and fixed the vertical alignment of the # comment

@Fryguy
Copy link
Member

Fryguy commented Oct 16, 2025

Openstack failures look like they might be related.

@Fryguy
Copy link
Member

Fryguy commented Oct 16, 2025

Actually maybe not? I can't require "qpid_proton" locally even before this change (but maybe I don't have the right libs installed)

@jrafanie
Copy link
Member Author

jrafanie commented Oct 16, 2025

Actually maybe not? I can't require "qpid_proton" locally even before this change (but maybe I don't have the right libs installed)

yeah, I'm stumped...

       Failure/Error: require 'qpid_proton'
  
       ArgumentError:
         wrong number of arguments (given 1, expected 0)

Can any of our 🐧 friends require qpid_proton?

It was using 0.37.0:

Installing qpid_proton 0.37.0 with native extensions

I'm seeing some warnings but am not sure if it's related to the failure:

  /home/runner/work/manageiq-cross_repo-tests/manageiq-cross_repo-tests/repos/ManageIQ/manageiq-providers-nuage@af5731bef30ded3b16d715ff815c51d3eb8acc58/vendor/bundle/ruby/3.3.0/gems/qpid_proton-0.37.0/lib/cproton.so: warning: undefining the allocator of T_DATA class swig_runtime_data
  /home/runner/work/manageiq-cross_repo-tests/manageiq-cross_repo-tests/repos/ManageIQ/manageiq-providers-nuage@af5731bef30ded3b16d715ff815c51d3eb8acc58/vendor/bundle/ruby/3.3.0/gems/qpid_proton-0.37.0/lib/core/uri.rb:32: warning: already initialized constant URI::AMQP::DEFAULT_PORT
  /home/runner/work/manageiq-cross_repo-tests/manageiq-cross_repo-tests/repos/ManageIQ/manageiq-providers-nuage@af5731bef30ded3b16d715ff815c51d3eb8acc58/vendor/bundle/ruby/3.3.0/gems/qpid_proton-0.37.0/lib/core/uri.rb:32: warning: previous definition of DEFAULT_PORT was here
  /home/runner/work/manageiq-cross_repo-tests/manageiq-cross_repo-tests/repos/ManageIQ/manageiq-providers-nuage@af5731bef30ded3b16d715ff815c51d3eb8acc58/vendor/bundle/ruby/3.3.0/gems/uri-1.0.4/lib/uri/common.rb:107: warning: already initialized constant URI::Schemes::AMQP
  /home/runner/work/manageiq-cross_repo-tests/manageiq-cross_repo-tests/repos/ManageIQ/manageiq-providers-nuage@af5731bef30ded3b16d715ff815c51d3eb8acc58/vendor/bundle/ruby/3.3.0/gems/uri-1.0.4/lib/uri/common.rb:107: warning: previous definition of AMQP was here

It's happening for both nuage and openstack on qpid_proton:
https://github.com/ManageIQ/manageiq-cross_repo-tests/actions/runs/18569820215/job/52940503426?pr=996

https://github.com/ManageIQ/manageiq-cross_repo-tests/actions/runs/18569820215/job/52940503446?pr=996

@jrafanie
Copy link
Member Author

cc @bdunne @agrare (sorry forgot the linux friend ping)

@agrare
Copy link
Member

agrare commented Oct 16, 2025

Can any of our 🐧 friends require qpid_proton?

vmdb(dev)>  require 'qpid_proton'
/home/grare/adam/.gem/ruby/3.3.0/gems/qpid_proton-0.37.0/lib/cproton.so: warning: undefining the allocator of T_DATA class swig_runtime_data
=> true

This was on master, let me pull your PR down and test again

@agrare
Copy link
Member

agrare commented Oct 16, 2025

qpid_proton libraries and the gem should be installed by bin/before_install in both openstack and nuage, https://github.com/ManageIQ/manageiq-providers-openstack/blob/master/bin/before_install#L6-L10

This bin/before_install script should be run by cross-repo tests

@agrare
Copy link
Member

agrare commented Oct 16, 2025

@jrafanie yeah the test failures are definitely introduced by this gem bump, I pulled your branch down, bundle update, and when I try to require it I get the same error as cross-repo (:tada:)

$ bundle update
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Installing bundler-inject 2.1.0
Fetching https://github.com/ManageIQ/manageiq-decorators
Fetching https://github.com/ManageIQ/manageiq-consumption
Fetching https://github.com/ManageIQ/amazon_ssa_support.git
Fetching source index from https://rubygems.manageiq.org/
Fetching gem metadata from https://rubygems.org/......
Fetching source index from https://rubygems.org/
Resolving dependencies...
Using aws-partitions 1.1173.0 (was 1.1172.0)
Using prism 1.6.0 (was 1.5.2)
Using uri 1.0.4 (was 0.13.3)
Using aws-sdk-ec2 1.563.0 (was 1.562.0)
Using aws-sdk-s3 1.200.0 (was 1.199.1)
Bundle updated!
1 installed gem you directly depend on is looking for funding.
  Run `bundle fund` for details
adam@workstation:~/src/manageiq/manageiq$ rails c
** Enabling rack session debug logger
** ManageIQ master, codename: Tal
Loading development environment (Rails 7.2.2.2)
vmdb(dev)> require 'qpid_proton'
/home/grare/adam/.gem/ruby/3.3.0/gems/qpid_proton-0.37.0/lib/cproton.so: warning: undefining the allocator of T_DATA class swig_runtime_data
uri (1.0.4) lib/uri/rfc3986_parser.rb:73:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from qpid_proton (0.37.0) lib/core/uri.rb:49:in `new'
	from qpid_proton (0.37.0) lib/core/uri.rb:49:in `<module:Proton>'
	from qpid_proton (0.37.0) lib/core/uri.rb:46:in `<main>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
	from bootsnap (1.18.6) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from zeitwerk (2.7.3) lib/zeitwerk/core_ext/kernel.rb:34:in `require'
	from qpid_proton (0.37.0) lib/qpid_proton.rb:64:in `<main>'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
	from /usr/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
	from bootsnap (1.18.6) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from zeitwerk (2.7.3) lib/zeitwerk/core_ext/kernel.rb:34:in `require'
	from (vmdb):1:in `<main>'
	from <internal:kernel>:187:in `loop'
	from railties (7.2.2.2) lib/rails/commands/console/irb_console.rb:129:in `start'
	from railties (7.2.2.2) lib/rails/commands/console/console_command.rb:59:in `start'
	... 15 levels...

@agrare
Copy link
Member

agrare commented Oct 16, 2025

NOTE the most recent version of qpid_proton on rubygems is 0.37.0, but apache has released 0.40.0.

It looks like the line that fails is the same on 0.37 and 0.40 though, DEFAULT_URI_PARSER = URI::Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/)

@agrare
Copy link
Member

agrare commented Oct 16, 2025

apache/qpid-proton@346c779 appears to have fixed this but it hasn't been released yet.

I opened https://issues.apache.org/jira/browse/PROTON-2777 a while ago but so far haven't had any input from the apache team.

@jrafanie
Copy link
Member Author

Ah @agrare, thanks! I vaguely remember this now. You're right. It worked with 0.13.3 but fails with 1.0.0+

vmdb(dev)> require 'uri'
=> false
vmdb(dev)> URI::VERSION
=> "0.13.3"
vmdb(dev)> URI::Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/)
=> #<URI::RFC2396_Parser:0x0000000127b32068>
vmdb(dev)> require 'uri'
=> false
vmdb(dev)> URI::VERSION
=> "1.0.4"
vmdb(dev)> URI::Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/)
uri (1.0.4) lib/uri/rfc3986_parser.rb:73:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from (vmdb):8:in `new'
	from (vmdb):8:in `<main>'
	from <internal:kernel>:187:in `loop'
	from railties (7.2.2.2) lib/rails/commands/console/irb_console.rb:129:in `start'
	from railties (7.2.2.2) lib/rails/commands/console/console_command.rb:59:in `start'
	from railties (7.2.2.2) lib/rails/commands/console/console_command.rb:8:in `start'
	from railties (7.2.2.2) lib/rails/commands/console/console_command.rb:87:in `perform'
	from thor (1.4.0) lib/thor/command.rb:28:in `run'
	from thor (1.4.0) lib/thor/invocation.rb:127:in `invoke_command'
	from railties (7.2.2.2) lib/rails/command/base.rb:178:in `invoke_command'
	from thor (1.4.0) lib/thor.rb:538:in `dispatch'
	from railties (7.2.2.2) lib/rails/command/base.rb:73:in `perform'
	from railties (7.2.2.2) lib/rails/command.rb:71:in `block in invoke'
	from railties (7.2.2.2) lib/rails/command.rb:149:in `with_argv'
	from railties (7.2.2.2) lib/rails/command.rb:69:in `invoke'
	from railties (7.2.2.2) lib/rails/commands.rb:18:in `<main>'
	... 4 levels...

@jrafanie jrafanie changed the title Require URI ~>1.0.4 [WIP] Require URI ~>1.0.4 Oct 16, 2025
@jrafanie jrafanie added the wip label Oct 16, 2025
@agrare
Copy link
Member

agrare commented Oct 16, 2025

If a new version is released but not pushed to rubygems we could build our own and host it on rubygems.manageiq.org
We're not the only ones wondering where the newer releases are (at least one other person commented on the issue) so it could be helpful to the broader community.

@jrafanie
Copy link
Member Author

I updated the description based on @agrare's findings and marked it as WIP until a qpid_proton gem release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants