Open ckauf opened 1 year ago
Kibana version: 8.6.2
Elasticsearch version: 8.6.2
Original install method (e.g. download page, yum, from source, etc.): Cloud
Describe the bug: When creating a package policy and specifying the id in the body, that field seem to get ignored
id
Steps to reproduce:
Create an Agent Policy
POST kbn:/api/fleet/agent_policies { "id": "someId", "name": "someName", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics" ] }
Add a Package Policy, including the id in the body:
POST kbn:/api/fleet/package_policies { "id": "someOtherId", "policy_id": "someId", "package": { "name": "log", "version": "1.1.1" }, "name": "thisisaname", "description": "", "namespace": "default", "inputs": { "logs-logfile": { "enabled": true, "streams": { "log.log": { "enabled": true, "vars": { "paths": [ "test" ], "data_stream.dataset": "generic", "tags": [], "custom": "" } } } } } }
Verify how the id in the output differs from the id in the create call
{ "item": { "id": "4db28dd9-7fd7-4442-b706-f62ec3c2bfdd", "version": "WzEwNzM5MTUzLDExXQ==", "name": "thisisaname", "namespace": "default",
Expected behavior: ID should be the same
Screenshots (if relevant): API Spec:
Pinging @elastic/fleet (Team:Fleet)
It seems that the service supports passing an id parameter, but the request handler doesn't set it. So I think the fix would be to pass the missing id parameter from the request body to the service create call.
create
Dear all,
the error already exists in 8.5.3 as well.
Kibana version: 8.6.2
Elasticsearch version: 8.6.2
Original install method (e.g. download page, yum, from source, etc.): Cloud
Describe the bug: When creating a package policy and specifying the
id
in the body, that field seem to get ignoredSteps to reproduce:
Create an Agent Policy
Add a Package Policy, including the
id
in the body:Verify how the
id
in the output differs from theid
in the create callExpected behavior: ID should be the same
Screenshots (if relevant): API Spec: