Skip to content

(maint) Fix nightly puppet gem install on Windows bundler step - #47

Merged
joshcooper merged 1 commit into
mainfrom
fix-nightly-puppet-mingw-bundler-cache
Sep 30, 2026
Merged

joshcooper merged 1 commit into
mainfrom
fix-nightly-puppet-mingw-bundler-cache

Conversation

@tvpartytonight

Copy link
Copy Markdown
Contributor

Summary

  • The Windows x64-mingw build of the nightly puppet gem is only published via Puppet's nightly download infra, never to the artifactory rubygems mirror used as GEM_SOURCE. Consuming module Gemfiles also pin puppet to an explicit :source, so Bundler only ever fetches that gem from the declared remote — it 404s trying to redownload a version that was already installed locally in the previous step.
  • Extract the downloaded nightly gem into a plain directory with its gemspec alongside it, and point PUPPET_GEM_VERSION at that directory via a file:// URL. The module Gemfile's location_for helper already treats a file:// value as a path: source and drops the :source pin entirely, so Bundler resolves puppet locally instead of talking to GEM_SOURCE.
  • Quote the PUPPET_GEM_VERSION value since PowerShell's parser chokes on the unquoted // and tries to invoke it as a command; bash handles it fine unquoted, but quoting works identically under both shells.

Test plan

  • Verified locally that Bundler resolves a gem from a PATH source (via the same location_for helper used in module Gemfiles) instead of contacting a pinned :source, using a minimal reproduction Gemfile.
  • Verified against puppetlabs/puppetlabs-augeas_core pointed at this branch — nightly Windows unit test job passed.

The Windows x64-mingw build of puppet is only published via Puppet's
nightly download infra, never to the artifactory rubygems mirror used
as GEM_SOURCE. The module Gemfile also pins puppet to an explicit
:source, so Bundler only ever fetches that gem from the declared
remote and 404s trying to redownload a version that was already
installed locally in the previous step.

Extract the downloaded nightly gem into a plain directory with its
gemspec alongside it, and point PUPPET_GEM_VERSION at that directory
via a file:// URL. The Gemfile's location_for helper treats a file://
value as a path: source and drops the :source pin entirely, so
Bundler resolves puppet locally instead of talking to GEM_SOURCE.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tvpartytonight
tvpartytonight requested a review from a team as a code owner September 30, 2026 19:50
@tvpartytonight

Copy link
Copy Markdown
Contributor Author

Verified that this worked successfully on the augeas gem here: https://github.com/puppetlabs/puppetlabs-augeas_core/actions/runs/36767646031/job/110065740811

@joshcooper
joshcooper merged commit 95a5fd2 into main Sep 30, 2026
2 checks passed
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