fix: add missing space before --profile-ruby and --slow-report flags#379
Open
fix: add missing space before --profile-ruby and --slow-report flags#379
Conversation
The run_command method was concatenating these flags directly onto the previous argument without a leading space, producing broken commands like "dna.json--profile-ruby" instead of "dna.json --profile-ruby". https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
Shellwords.shellwords() is used in both driver and transport but was never explicitly required. It worked by accident via transitive loading from other gems. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
Bare rescue catches StandardError which can hide real bugs. Specify the actual exceptions expected in each case: - create_container: Docker::Error::NotFoundError (container doesn't exist yet) - docker_for_mac_or_win?: StandardError (any Docker connection failure) - running_inside_docker_desktop?: Resolv::ResolvError, StandardError https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
Consistent with the rest of the codebase which uses the Kitchen logger methods (debug, info) rather than writing directly to stdout. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
The provisioner used instance.name (raw name) while the driver uses instance_name (SHA-prefixed name). Since the driver creates containers with SHA-prefixed names, the provisioner's version would return the wrong container name if ever called. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
Neither method is called anywhere in the codebase. container_exist? is superseded by direct Docker::Container.get calls with rescue handling. parse_registry_host was likely intended for registry auth but the actual implementation uses a different approach via docker_creds_for_image. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
The identical SHA-prefix + instance name logic was copy-pasted in three places: Dokken::Helpers, Kitchen::Provisioner::Base, and Kitchen::Verifier::Base. Extract into a single module method Dokken::Helpers.instance_name_for(instance) that all three call. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
… provisioner Set up RSpec with 91 unit tests covering previously untested code: - helpers: parse_port (9 cases), coerce_exposed_ports (5), coerce_port_bindings (6), instance_name (5), default_docker_host (3), SSH keys (2), running_inside_docker (2), data_dockerfile (4) - driver: parse_image_name (5), repo/tag/short_image_path (5), registry_image_path (2), chef_version (3), chef_image (1), chef_container_name (2), oci_platform (4), coerce_tmpfs (4), work_image (2), PartialHash (5), coerce_volumes (5) - provisioner: validate_config (7), run_command (8) including regression tests for the --profile-ruby/--slow-report space fix https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
Chefstyle prefers double-quoted strings (opposite of plain cookstyle). Also fix Lint/ShadowedException: Resolv::ResolvError inherits from StandardError so listing both is redundant. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
5221c81 to
ffa2895
Compare
Replace the default Docker image with the CINC community build (cincproject/cinc) from https://hub.docker.com/r/cincproject/cinc. Update all documentation examples and tests accordingly. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
- Change default chef_binary from /opt/chef/bin/chef-client to /opt/cinc/bin/cinc-client to match the cincproject/cinc Docker image - Remove CHEF_LICENSE env from kitchen.yml (CINC doesn't require it) - Update CI workflow env from CHEF_LICENSE to CINC_LICENSE - Update specs and README to reflect new binary path https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
…olution - Override check_license in provisioner to no-op since CINC doesn't require license acceptance (kitchen-omnibus-chef was blocking converge) - Use ::Dokken::Helpers to avoid Ruby resolving the constant relative to Kitchen::*::Dokken namespaces (NameError on converge) https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
InSpec's Runner#run checks ChefLicensing when EXEC_NAME == "inspec". CINC Auditor is the license-free equivalent. Patch the Inspec::Dist constant to "cinc-auditor" in the Verifier::Base#call override so the license check is skipped when running under dokken. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
InSpec's Runner#run gates the ChefLicensing check on Inspec::Dist::EXEC_NAME == "inspec". CINC Auditor sets this to "cinc-auditor" to bypass the check. Apply the same patch in dokken's driver create phase, after all Kitchen plugins (including kitchen-inspec) are loaded and before any verifier runs. https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The run_command method was concatenating these flags directly onto the
previous argument without a leading space, producing broken commands like
"dna.json--profile-ruby" instead of "dna.json --profile-ruby".
https://claude.ai/code/session_01DFP23vAt3JAkziNyAnWtJF