Skip to content

Add Faraday 2.x gems for persistent connections#13544

Draft
pablomh wants to merge 2 commits into
theforeman:rpm/developfrom
pablomh:faraday2-packaging
Draft

Add Faraday 2.x gems for persistent connections#13544
pablomh wants to merge 2 commits into
theforeman:rpm/developfrom
pablomh:faraday2-packaging

Conversation

@pablomh

@pablomh pablomh commented May 26, 2026

Copy link
Copy Markdown

Summary

Two new packages to enable Faraday 2.x with persistent HTTP connections, co-installable alongside the existing Faraday 1.x packages.

rubygem-net-http-persistent was removed from this PR and is handled separately in #13432. That package can be consumed by both Katello and foreman-proxy.

Packages

Package Version Notes
rubygem-faraday2 2.12.2 Co-installable with rubygem-faraday 1.x
rubygem-faraday-net_http_persistent2 2.3.0 2.x adapter, co-installable with 1.x

Why co-installable (not an upgrade)

Faraday 1.x is still required by ms_rest/ms_rest_azure (pins faraday < 2.0.0) and katello (pins faraday >= 1.10.2, < 1.11.0). Both constraints will be removed by upcoming PRs, after which the 1.x packages can be retired.

Dependency chain

foreman-proxy gemspec
  faraday ~> 2.0              -> rubygem-faraday2 (2.12.2)
  faraday-net_http_persistent ~> 2.0 -> rubygem-faraday-net_http_persistent2 (2.3.0)
                                          -> rubygem-net-http-persistent (4.0.8, packaged in #13432)
                                               -> rubygem-connection_pool (2.5.5, already packaged)

Ruby 3.0 compatibility

All versions tested on Ruby 3.0 (RHEL 9 / Satellite Stream). Key constraints:

  • faraday-net_http must stay at 3.1.0 (3.4+ requires net-http >= 0.5, RHEL ships 0.1.1) - this is a transitive dep of faraday2, not a separate package
  • connection_pool must stay below 3.0 (3.0+ uses Ruby 3.1 syntax) - already at 2.5.5

@theforeman-bot

Copy link
Copy Markdown
Member

Can one of the admins verify this patch?

1 similar comment
@theforeman-bot

Copy link
Copy Markdown
Member

Can one of the admins verify this patch?

@zjhuntin zjhuntin left a comment

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.

Minor nit: all 3 changelog entries say Tue May 27 2026 but May 27, 2026 was a Wednesday. rpmbuild warns bogus date in %changelog for each spec.

New packages:
- rubygem-faraday2 (2.12.2) — co-installable alongside faraday 1.x
- rubygem-faraday-net_http_persistent2 (2.3.0) — adapter for Faraday 2.x
- rubygem-net-http-persistent (4.0.8) — persistent HTTP connection pooling

These enable persistent TCP+TLS connection reuse in smart-proxy,
eliminating per-request connection setup overhead.
@pablomh pablomh force-pushed the faraday2-packaging branch from 9109669 to f48bc23 Compare June 24, 2026 07:47
@ogajduse

Copy link
Copy Markdown
Member

ok to test

@ogajduse

Copy link
Copy Markdown
Member

CI fails as the patch is missing a package_manifest.yaml entry for the new packages.

Remove rubygem-net-http-persistent from this branch and add package_manifest.yaml entries for the remaining Faraday 2 packages. The net-http-persistent package is handled separately in theforeman#13432.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pablomh pablomh changed the title Add Faraday 2.x gems for smart-proxy persistent connections Add Faraday 2.x gems for persistent connections Jun 25, 2026
@pablomh

pablomh commented Jun 25, 2026

Copy link
Copy Markdown
Author

I've moved net-http-persistent gem addition to #13670 so it can be added independently.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants