Skip to content

chore: stop tracking Policyfile.lock.json - #199

Merged
ramereth merged 2 commits into
mainfrom
fix/untrack-policyfile-lock
Aug 16, 2026
Merged

chore: stop tracking Policyfile.lock.json#199
ramereth merged 2 commits into
mainfrom
fix/untrack-policyfile-lock

Conversation

@ramereth

@ramereth ramereth commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Policyfile.lock.json is tracked and pins ruby_build to an exact version (2.5.12), while release-please only bumps metadata.rb (currently 2.5.12). Whenever the two disagree, ChefSpec's policyfile install aborts the entire RSpec suite before a single example runs:

CookbookOmnifetch::CookbookValidationFailure:
  The cookbook downloaded for Cookbook 'ruby_build' = 2.5.12 {:path=>"."}
  did not satisfy the constraint.

Fix

Untrack the lock. It is a generated artifact — chefignore already excludes it from the published cookbook, and 171 of 179 sous-chefs repos do not track it.

Bumping the version inside the lock is not a viable alternative: it also carries identifier and dotted_decimal_identifier fields derived from cookbook content.

Same fix as sous-chefs/logrotate#226.


This change is Reviewable

The lock pins the cookbook to an exact version, but release-please only
bumps metadata.rb. When the two disagree, ChefSpec's policyfile install
aborts the whole RSpec suite before any example runs:

  CookbookOmnifetch::CookbookValidationFailure: The cookbook downloaded
  for Cookbook 'ruby_build' = 2.5.12 {:path=>"."} did not satisfy the constraint.

The lock cannot simply be version-bumped either, since it also carries
content-derived identifier and dotted_decimal_identifier fields.

chefignore already excludes it from the published artifact, and 171 of 179
sous-chefs repos do not track it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Lance Albertson <lance@osuosl.org>
@ramereth
ramereth requested a review from a team as a code owner August 16, 2026 03:45
sous-chefs/.github@9.0.0 declares slack_bot_token and slack_channel_id as
required secrets. Without them the reusable workflow is invalid, so every
push to main ends in startup_failure and release-please never runs.

Included here so merging this PR actually results in a release. See
sous-chefs/freebsd#90 for the same fix after a merge produced no release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Lance Albertson <lance@osuosl.org>
@ramereth

Copy link
Copy Markdown
Contributor Author

Added a second commit passing the required slack secrets to the release workflow.

sous-chefs/.github@9.0.0 declares slack_bot_token and slack_channel_id as required: true. This repo's release.yml does not pass them, so every push to main ends in startup_failure — release-please never runs and no release is cut.

Without this, merging this PR would land the change and silently produce no release. That is exactly what happened in sous-chefs/freebsd#88, which needed sous-chefs/freebsd#90 as a follow-up.

Both secrets already exist as sous-chefs org secrets with ALL repository visibility, so nothing needs creating.

@ramereth ramereth closed this Aug 16, 2026
@ramereth
ramereth force-pushed the fix/untrack-policyfile-lock branch from b9d4be0 to 5bb5516 Compare August 16, 2026 21:07
@ramereth ramereth reopened this Aug 16, 2026
@github-actions

Copy link
Copy Markdown

Slowest examples

Top 10 slowest examples (0.6 seconds, 99.99% of total time)
Example Description Time in seconds
spec/resources/install_spec.rb:12 test::default AlmaLinux 8 is expected to install package "yum-utils" 0.11089
spec/libraries/cruby_spec.rb:13 #cruby_package_deps CentOS CentOS 7 is expected to write log "gcc, bzip2, openssl-devel, libyaml-devel, libffi-devel, readline-devel, zlib-devel, gdbm-devel, ncurses-devel, make, patch" 0.07714
spec/resources/install_spec.rb:14 test::default AlmaLinux 8 is expected to create yum_epel "default" 0.05814
spec/resources/install_spec.rb:13 test::default AlmaLinux 8 is expected to run execute "yum-config-manager --enable powertools" 0.05721
spec/resources/install_spec.rb:15 test::default AlmaLinux 8 is expected not to include recipe "yum-epel::default" 0.05689
spec/libraries/cruby_spec.rb:38 #cruby_package_deps CentOS Ubuntu 18.04 is expected to write log "gcc, autoconf, bison, build-essential, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm5, libgdbm-dev, make, patch" 0.05078
spec/libraries/cruby_spec.rb:33 #cruby_package_deps CentOS Ubuntu 16.04 is expected to write log "gcc, autoconf, bison, build-essential, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm3, libgdbm-dev, make, patch" 0.04802
spec/libraries/cruby_spec.rb:18 #cruby_package_deps CentOS CentOS 8 is expected to write log "gcc, bzip2, openssl-devel, libyaml-devel, libffi-devel, readline-devel, zlib-devel, gdbm-devel, ncurses-devel, make, patch" 0.04778
spec/libraries/cruby_spec.rb:23 #cruby_package_deps CentOS Debian 9 is expected to write log "gcc, autoconf, bison, build-essential, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm3, libgdbm-dev, make, patch" 0.0474
spec/libraries/cruby_spec.rb:28 #cruby_package_deps CentOS Debian 10 is expected to write log "gcc, autoconf, bison, build-essential, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libgdbm6, libgdbm-dev, make, patch" 0.0464

@ramereth ramereth changed the title fix: stop tracking Policyfile.lock.json chore: stop tracking Policyfile.lock.json Aug 16, 2026
@ramereth
ramereth merged commit 53dd7f4 into main Aug 16, 2026
15 of 26 checks passed
@ramereth
ramereth deleted the fix/untrack-policyfile-lock branch August 16, 2026 21:15
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.

1 participant