Skip to content

(MODULES-11972) Always install libcurl dev headers in module_ci - #190

Closed
imaqsood wants to merge 2 commits into
mainfrom
MODULES-11972-libcurl-default
Closed

imaqsood wants to merge 2 commits into
mainfrom
MODULES-11972-libcurl-default

Conversation

@imaqsood

@imaqsood imaqsood commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

module_ci.yml now always installs libcurl4-openssl-dev on Linux runners. additional_packages still appends extra packages. Without it, the Puppet 9 / Ruby 4 spec lane can't build the native patron gem, so Spec fails and Acceptance is skipped (e.g. iis, facter_task).

Additional Context

  • Root cause: on Ruby 4, faraday-follow_redirects ≤ 0.4 (ruby < 4) blocks puppet_forge 4.1–6.0. Bundler falls back to r10k 3.16.2 → puppet_forge 3.2.0 → faraday 1.9.0 → faraday-patron → patron. Reproduced with bundle lock on Ruby 4.0.1 vs 3.2.10 (3.2 resolves faraday 2.x, no patron).
  • This is a stop-gap in the shared workflow instead of per-module additional_packages. Please squash on merge.

Related Issues (if any)

Checklist

  • 🟢 Spec tests (lint green; YAML-only change)
  • 🟢 Acceptance tests (after merge, verify the iis / facter_task nightlies)
  • Manually verified

🤖 Generated with Claude Code

puppet_litmus -> bolt -> faraday-patron pulls in patron, whose native
extension needs libcurl headers the runner image doesn't ship. The Ruby 4
spec lane fails in bundle install without them, which skips Acceptance
(e.g. iis, facter_task nightlies). Several modules already work around
this with additional_packages: "libcurl4-openssl-dev"; since the cause is
litmus and not module-specific, install it by default on Linux runners.
additional_packages still appends extra packages.

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

@bastelfreak bastelfreak left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

where does faraday depend on faraday-patreon? https://rubygems.org/gems/faraday/versions/2.14.4/dependencies

Comment thread .github/workflows/module_ci.yml Outdated
…ents

The previous comment (and commit message) said bolt pulls in
faraday-patron directly, which is wrong. Reproduced with `bundle lock`
on Ruby 4.0.1 vs 3.2.10:

- faraday-follow_redirects <= 0.4.0 declares required_ruby_version < 4,
  and puppet_forge 4.x-6.0.x pin it to ~> 0.3.0, so on Ruby 4 bundler
  cannot use them (puppet_forge 6.1+ needs minitar ~> 1.0, which
  conflicts with bolt's minitar ~> 0.6, and r10k 4.x caps
  puppet_forge < 6).
- Bundler therefore falls back to bolt -> r10k 3.16.2 ->
  puppet_forge 3.2.0 -> faraday ~> 1.3 (1.9.0). faraday 1.x depends on
  its adapter gems, including faraday-patron (< 3) -> patron.
- On Ruby 3.2 the same Gemfile resolves r10k 4.1.0 / puppet_forge
  5.0.4 / faraday 2.14.4 and no patron.

Co-Authored-By: Claude <noreply@anthropic.com>
@imaqsood
imaqsood requested review from bastelfreak and a balanced review from Copilot and removed request for bastelfreak October 15, 2026 05:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Both installation paths implement the intended workaround while preserving additional packages, with no identified blocking issues.

0 open findings

What changed in this PR

Adds a shared workaround for native patron builds in Puppet 9 / Ruby 4 CI.

Changes:

  • Always installs libcurl4-openssl-dev on Linux in both package-installation steps.
  • Preserves caller-supplied extra packages and clarifies the input description.
File Description
.github/​workflows/​module_ci.yml Installs required libcurl headers and documents the dependency workaround.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

run: |
sudo apt-get update
sudo apt-get install -y ${{ inputs.additional_packages }}
sudo apt-get install -y libcurl4-openssl-dev ${{ inputs.additional_packages }}

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.

@bastelfreak bastelfreak left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

First, your AI is incredibly bad. And: Why can't you use puppet_forge 6.2? Why this complicated workaround?

@imaqsood

imaqsood commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

You're right — thanks. These modules' Gemfiles still pin puppet-blacksmith ~> 7.0 (old pdk-templates), which pulls puppet-modulebuilder 1.x → minitar ~> 0.9. That rules out puppet_forge ≥ 6 (and bolt 5.2, which needs minitar ~> 1.0). On Ruby 4, puppet_forge 4.0–6.0 are out as well (they need faraday-follow_redirects < 0.5, which requires Ruby < 4), so bundler falls back to r10k 3.x → puppet_forge 3.2 → faraday 1.x → patron. On Ruby 3.2 the same Gemfile still resolves puppet_forge 5.0.4 / faraday 2, which is why only the Ruby 4 lane breaks. facter_task additionally gets the public bolt 4.0.0 (minitar ~> 0.6), because its Gemfile has no puppetcore bolt entry.

Modules whose Gemfile is on the current template resolve bolt 5.2.1 / r10k 5.0.3 / puppet_forge 6.2.0 on Ruby 4 with no patron. The fix belongs in the module Gemfiles via pdk update (MODULES-11991), not here — closing this. (puppetlabs/pdk-templates#678 is only needed so the full pdk update passes rubocop.)

@imaqsood imaqsood closed this Oct 19, 2026
@bastelfreak

Copy link
Copy Markdown

@imaqsood why are so many Perforce modules heavily outdated? Can't you just run pdk update/pdk sync on all modules? So many have a broken CI config and that's very frustrating as a user.

@imaqsood

Copy link
Copy Markdown
Contributor Author

@imaqsood why are so many Perforce modules heavily outdated? Can't you just run pdk update/pdk sync on all modules? So many have a broken CI config and that's very frustrating as a user.

Thanks @bastelfreak for raising this. You’re right, it’s overdue. Unfortunately, we can’t safely run pdk update across the board just yet: 39 of 40 supported modules have local changes to managed files (mostly Puppet 9 support) that aren’t recorded in .sync.yml, so an update would revert them. We’re reconciling .sync.yml first and will then move everything to pdk-templates 4.0.1, which should also fix the Ruby 4 / patron issue you pointed out. Thanks for your patience!

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.

4 participants