Skip to content

CHEF-28245 - Fix user-list -a/--all-info flags after knife-opc removal#4128

Closed
kalroy wants to merge 1 commit intomainfrom
CHEF-28245
Closed

CHEF-28245 - Fix user-list -a/--all-info flags after knife-opc removal#4128
kalroy wants to merge 1 commit intomainfrom
CHEF-28245

Conversation

@kalroy
Copy link
Copy Markdown
Collaborator

@kalroy kalroy commented Dec 4, 2025

Summary

This PR fixes the chef-server-ctl user-list -a and --all-info flags that were broken after the knife-opc plugin removal in Chef Server 15.10.63+. The flags are now internally transformed to the native knife --verbose flag, maintaining backward compatibility while adapting to the new backend.

Jira Ticket

🔗 CHEF-28245: chef-server-ctl user-list missing flag

Note: This work was completed with AI assistance following Progress AI policies.

Changes Made

  • src/chef-server-ctl/plugins/wrap-knife.rb: Modified transform_knife_opc_args function to convert -a/--all-info flags to --verbose when invoking native knife
  • run-tests.rb: Updated test expectations to verify flag transformation works correctly
  • src/chef-server-ctl/spec/wrap_knife_spec.rb: Added comprehensive RSpec tests for wrap-knife functionality
  • test-chef-28245-fix.rb: Created standalone test script for Docker-based validation
  • Dockerfile.test-wrap-knife: Added Docker test environment for isolated testing
  • RELEASE_NOTES.md: Documented the fix and knife-opc removal impact as requested by customer

Testing

  • ✅ Docker-based tests: 6/6 tests passing
  • ✅ Verified -a flag transforms to --verbose
  • ✅ Verified --all-info flag transforms to --verbose
  • ✅ Verified flags work with other arguments like --with-uri
  • ✅ Verified user-list without flags continues to work normally
  • ✅ Backward compatibility maintained for existing scripts

Customer Impact

  • Fixes broken pipelines for Westpac New Zealand Limited (Top150 customer)
  • Resolves 10+ day outage caused by undocumented breaking change
  • Restores detailed user information retrieval (email, first_name, last_name, display_name)
  • Addresses customer requirement: "All breaking changes should be included in release notes"

AI Compliance

This work was completed with AI assistance following Progress AI policies.

- Transform -a/--all-info flags to native knife --verbose flag internally
- Maintains backward compatibility for existing scripts and pipelines
- Adds comprehensive test coverage in Docker container (6/6 tests passing)
- Updates RELEASE_NOTES.md to document the fix and knife-opc removal impact
- Addresses customer regression where flags were silently ignored in 15.10.63+
- Fixes broken pipelines for Top150 customer (Westpac)

The fix ensures detailed user information (email, first_name, last_name, display_name)
is retrieved when using -a or --all-info flags, as expected by users.
@kalroy kalroy requested review from a team as code owners December 4, 2025 06:44
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 4, 2025

👷 Deploy Preview for chef-server processing.

Name Link
🔨 Latest commit 20c00d5
🔍 Latest deploy log https://app.netlify.com/projects/chef-server/deploys/69312dc9582cc50008a63699

@kalroy kalroy added the ai-assisted Work completed with AI assistance following Progress AI policies label Dec 4, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 4, 2025

@sonarqube-for-infrastructure-prod
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@kalroy kalroy closed this Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Work completed with AI assistance following Progress AI policies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant