Skip to content

THREESCALE-15318: Update Faraday dependency constraint#36

Merged
akostadinov merged 4 commits into
masterfrom
update-faraday-dependency
Jul 3, 2026
Merged

THREESCALE-15318: Update Faraday dependency constraint#36
akostadinov merged 4 commits into
masterfrom
update-faraday-dependency

Conversation

@akostadinov-bot

Copy link
Copy Markdown
Contributor

Summary

This PR updates the Faraday gem dependency constraint to allow version 2.14.3 and above, which includes improvements to query parameter processing.

Changes

  • Updated pisoni.gemspec to require faraday ~> 2.0, >= 2.14.3 (was <= 2.9)
  • Updated comment to reflect the purpose of the change

Background

Faraday 2.14.3 includes enhancements to query parameter processing that provide better safeguards against deeply nested parameter structures.

The previous constraint (<= 2.9) was added to maintain Ruby 2.7 compatibility. Since porta now uses Ruby 3.3.7, this constraint can be relaxed to allow newer Faraday versions.

Compatibility

This change is required for porta to upgrade its Faraday dependency. See related PR: 3scale/porta#4330

Testing

  • Existing tests should continue to pass
  • No API changes in pisoni

Related: THREESCALE-15318

@akostadinov

Copy link
Copy Markdown
Contributor

Why did you set range to 2.20? Why not allow any 2.x minor?

@akostadinov-bot

Copy link
Copy Markdown
Contributor Author

Updated to allow any 2.x version >= 2.14.3. The ~> 2.0 constraint already limits to 2.x versions, so no upper bound is needed.

akostadinov
akostadinov previously approved these changes Jul 1, 2026
Comment thread pisoni.gemspec Outdated
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.license = 'Apache-2.0'

# faraday v2.9.0 removes support for Ruby 2.7, see https://github.com/lostisland/faraday/releases/tag/v2.9.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Apparently we need to update the ruby version then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. Faraday >= 2.9.0 requires Ruby >= 3.0 (see release notes).

Fixed in 8759f78:

  • Bumped required_ruby_version from >= 2.6.0 to >= 3.0.0
  • Updated CircleCI image from cimg/ruby:2.7 to cimg/ruby:3.3
  • Removed the now-stale comment about the <= 2.9 cap

Also rebased on master.

Bob Dev and others added 3 commits July 2, 2026 18:12
Allow any 2.x version of Faraday >= 2.14.3 without upper limit.
The ~> 2.0 constraint already limits to 2.x versions.
Faraday >= 2.9.0 requires Ruby >= 3.0. Since we now allow faraday
>= 2.14.3, the gemspec and CI image must reflect this.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@akostadinov

Copy link
Copy Markdown
Contributor

in fact we don't need to limit ruby here because the faraday gem should limit it. But I asked the poor agent to satisfy your request

Minitest 6 removed global expectation syntax (must_equal, wont_be_nil,
etc.) used by all tests. Pin to ~> 5.0 to prevent CI from pulling
minitest 6 on fresh bundle install.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread Gemfile

group :test do
gem 'minitest'
gem 'minitest', '~> 5.0'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minitest 6 removed the must_equal/wont_be_nil global expectation
syntax used by every test.

@jlledom

jlledom commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

in fact we don't need to limit ruby here because the faraday gem should limit it. But I asked the poor agent to satisfy your request

Agreed on this. That's the right thing to do. We shouldn't limit ruby version unless our code actually needs it. If it's a dependency which requires the limit, then they should enforce it, not us. But OK. Not gonna discuss on a Friday for this.

@akostadinov
akostadinov merged commit ca1a4cd into master Jul 3, 2026
2 checks passed
@akostadinov

Copy link
Copy Markdown
Contributor

Decided to keep the ruby 3 requirement so we can use modern syntax.

@akostadinov-bot akostadinov-bot Bot mentioned this pull request Jul 3, 2026
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.

2 participants