Skip to content

chore: stop tracking Policyfile lock - #613

Merged
ramereth merged 3 commits into
mainfrom
codex/fix-policyfile-lock
Aug 16, 2026
Merged

chore: stop tracking Policyfile lock#613
ramereth merged 3 commits into
mainfrom
codex/fix-policyfile-lock

Conversation

@damacus

@damacus damacus commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • stop tracking the generated Policyfile.lock.json artefact
  • ignore future local and Kitchen-generated Policyfile locks
  • retain a secondary test fix that assigns backend-search fixtures to the local Chef environment

ChefSpec and Kitchen now resolve Policyfile.rb at test time instead of depending on a committed lock. The fixture correction restores the searched be-1 and be-2 backend servers across the integration matrix.

Verification

  • chef install Policyfile.rb from a no-lock checkout - generated the ignored lock successfully
  • cookstyle --no-server - 71 files, 0 offences
  • ChefSpec from a no-lock checkout - 29 examples, 0 failures
  • KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test config-backend-search-ubuntu-2404 --destroy=always from a no-lock checkout - generated the lock, 7 controls, 0 failures

Secondary fix

The backend-search fixtures now set chef_environment to local. Without it, Chef search excludes both fixture nodes and the generated HAProxy configuration lacks the expected backend servers.

@damacus
damacus requested a review from a team as a code owner August 15, 2026 19:47
@damacus damacus changed the title fix: refresh Policyfile lock chore: stop tracking Policyfile lock Aug 15, 2026
@github-actions

Copy link
Copy Markdown

Slowest examples

Top 10 slowest examples (1.12 seconds, 46.74% of total time)
Example Description Time in seconds
spec/unit/recipes/mailer_spec.rb:48 haproxy_mailer create a mailer, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.16996
spec/unit/recipes/cache_spec.rb:45 haproxy_cache create a cache, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.13961
spec/unit/recipes/defaults_spec.rb:26 haproxy_config_defaults create a cache, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.13402
spec/unit/recipes/install_spec.rb:59 haproxy_install compile HAProxy on AlmaLinux 10 (uses PCRE2) is expected not to install package "pcre-devel" 0.12508
spec/unit/recipes/install_spec.rb:30 haproxy_install compile HAProxy on Ubuntu is expected to install package "["libpcre3-dev", "libssl-dev", "zlib1g-dev", "libsystemd-dev"]" 0.11721
spec/unit/recipes/peer_spec.rb:45 haproxy_peer create a peers section, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.08895
spec/unit/recipes/listen_spec.rb:61 haproxy_listen option parameter with array of options is expected to render file "/etc/haproxy/haproxy.cfg" 0.0888
spec/unit/recipes/listen_spec.rb:105 haproxy_listen extra options http-request rule should be placed before use_backend rule is expected to render file "/etc/haproxy/haproxy.cfg" 0.08729
spec/unit/recipes/listen_spec.rb:106 haproxy_listen extra options http-request rule should be placed before use_backend rule is expected not to render file "/etc/haproxy/haproxy.cfg" with content /use_backend admin0 if path_beg /admin0.*http-request add-header Test Value/m 0.08703
spec/unit/recipes/fastcgi_spec.rb:63 haproxy_fastcgi create a fastcgi resource, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.08686

@ramereth ramereth added the Skip: Announcements On Release this will not put a message in the #Announcements slack channel label Aug 16, 2026
@ramereth
ramereth merged commit 55b585b into main Aug 16, 2026
120 checks passed
@ramereth
ramereth deleted the codex/fix-policyfile-lock branch August 16, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip: Announcements On Release this will not put a message in the #Announcements slack channel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants