Skip to content

fix: avoid package validation when package management is disabled - #220

Merged
damacus merged 1 commit into
mainfrom
fix/package-validation-sshd-binary
Jun 22, 2026
Merged

fix: avoid package validation when package management is disabled#220
damacus merged 1 commit into
mainfrom
fix/package-validation-sshd-binary

Conversation

@damacus

@damacus damacus commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Avoid declaring package resources when manage_package false, preventing Windows provider validation from rejecting array package names in wrapper cookbooks.
  • Preserve String package defaults while still allowing caller-provided package arrays.
  • Add sshd_binary to openssh_server and document the new API.
  • Reformat resource documentation tables so MD060 passes without disabling the rule.

Verification

  • chef exec ruby -c resources/openssh_client.rb resources/openssh_server.rb resources/openssh_firewall.rb
  • cookstyle
  • chef exec rspec --format documentation
  • markdownlint-cli2 "**/*.md" "#vendor/**"
  • yamllint .
  • KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test default-ubuntu-2404 --destroy=always
  • Second kitchen converge default-ubuntu-2404: Infra Phase complete, 0/13 resources updated

Co-authored-by: slong47 SLONG47@bloomberg.net

Co-authored-by: slong47 <SLONG47@bloomberg.net>
@damacus
damacus requested a review from a team as a code owner June 22, 2026 15:15
@github-actions

Copy link
Copy Markdown

Slowest examples

Top 10 slowest examples (0.76 seconds, 41.31% of total time)
Example Description Time in seconds
spec/unit/resources/openssh_server_spec.rb:124 openssh_server on Windows with package management disabled and array package_names does not declare a package resource 0.1389
spec/unit/resources/openssh_server_spec.rb:23 openssh_server with default properties is expected to create directory "/run/sshd" 0.12056
spec/unit/resources/openssh_server_spec.rb:24 openssh_server with default properties is expected to enable service "ssh" 0.08162
spec/unit/resources/openssh_server_spec.rb:105 openssh_server with custom ports and trust data is expected to render file "/etc/ssh/revoked_keys" 0.06471
spec/unit/resources/openssh_server_spec.rb:58 openssh_server with custom sshd_binary uses the custom binary for config verification 0.06046
spec/unit/resources/openssh_server_spec.rb:104 openssh_server with custom ports and trust data is expected to render file "/etc/ssh/ca_keys" 0.06032
spec/unit/resources/openssh_server_spec.rb:22 openssh_server with default properties is expected to install package "openssh-server" 0.06005
spec/unit/resources/openssh_client_spec.rb:14 openssh_client with default properties is expected to install package "openssh-client" 0.05925
spec/unit/resources/openssh_server_spec.rb:96 openssh_server with custom ports and trust data is expected to render file "/etc/ssh/sshd_config" 0.05805
spec/unit/resources/openssh_firewall_spec.rb:14 openssh_firewall with default properties is expected to install iptables_packages "install-iptables" 0.05724

@damacus
damacus merged commit bf96641 into main Jun 22, 2026
26 checks passed
@damacus
damacus deleted the fix/package-validation-sshd-binary branch June 22, 2026 15:16
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