Opened from failing KB functional tests in test/functional/kb/definitions/. Array-typed CLI flags reject scalar values and mis-serialize query arrays. Passing a single value to an array field fails validation with should be array, and query array params fail with could not parse array value from json input, so the CLI aborts before the request.
Repro:
node dist/cli.js --json stack kb elastic-agents get-fleet-agent-status-data --agents-ids abc --dry-run
# → should be array
For schema fields of type: array, wrap a single scalar flag value in an array before validation and allow the flag to be repeated. Serialize query arrays in the form Kibana expects. Add a test asserting --agents-ids abc yields ["abc"].
Failing test definitions:
elastic_agents_get_fleet_agent_status_data.yml (stack + serverless)
security_endpoint_management_api_get_endpoint_metadata_list.yml (stack)
security_timeline_api_export_timelines.yml (stack)
security_timeline_api_import_timelines.yml (stack)
Opened from failing KB functional tests in
test/functional/kb/definitions/. Array-typed CLI flags reject scalar values and mis-serialize query arrays. Passing a single value to anarrayfield fails validation withshould be array, and query array params fail withcould not parse array value from json input, so the CLI aborts before the request.Repro:
For schema fields of
type: array, wrap a single scalar flag value in an array before validation and allow the flag to be repeated. Serialize query arrays in the form Kibana expects. Add a test asserting--agents-ids abcyields["abc"].Failing test definitions:
elastic_agents_get_fleet_agent_status_data.yml(stack + serverless)security_endpoint_management_api_get_endpoint_metadata_list.yml(stack)security_timeline_api_export_timelines.yml(stack)security_timeline_api_import_timelines.yml(stack)