[Fleet] fix UI bug displaying default agent binary source#214360
[Fleet] fix UI bug displaying default agent binary source#214360juliaElastic merged 3 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
| defaultDownloadSourceDisabledMessage | ||
| ), | ||
| value: DEFAULT_SELECT_VALUE, | ||
| value: DEFAULT_DOWNLOAD_SOURCE_ID, |
There was a problem hiding this comment.
I think the fix here should be more like the select for outputs work https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx#L658-L669
Correct me if I am wrong @criamico but I think binary source work the same as output, where a user can put:
- null => this will use the default binary source and if the default binary source change it will update policies
- a regular binary source policy id
- the default binary source id and in that case it will not affect the policy if the default binary source change
There was a problem hiding this comment.
the same is there in the download source https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx#L741-L753
but the problem is, when the download source is explicitly set to the default id in the agent policy, ("download_source_id": "fleet-default-download-source"), it doesn't match the select options, which comes with the value DEFAULT_SELECT_VALUE = '@@##DEFAULT_SELECT##@@', that's why the bug with the empty select
There was a problem hiding this comment.
in that case should we have both options?
- Default (currently source 1)
- source 1
it's what we are doing for outputs
There was a problem hiding this comment.
oh okay, probably we can do that
There was a problem hiding this comment.
Yes, the binary source works the same way as outputs where download_source_id can be either null or a specific id (default or otherwise).
|
Starting backport for target branches: 8.16, 8.17, 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13840354139 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
…4360) ## Summary Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty. To verify: - create a new agent binary download source - create an agent policy with using the default download source - check on Agent policy details UI that the Agent binary download UI select is populated correctly ``` POST kbn:/api/fleet/agent_policies { "name": "demo-policy-5", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics", "traces" ], "inactivity_timeout": 1209600, "is_protected": false, "download_source_id": "fleet-default-download-source" } ``` Before:  After: <img width="1517" alt="image" src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b" /> (cherry picked from commit eb62a04)
…4360) ## Summary Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty. To verify: - create a new agent binary download source - create an agent policy with using the default download source - check on Agent policy details UI that the Agent binary download UI select is populated correctly ``` POST kbn:/api/fleet/agent_policies { "name": "demo-policy-5", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics", "traces" ], "inactivity_timeout": 1209600, "is_protected": false, "download_source_id": "fleet-default-download-source" } ``` Before:  After: <img width="1517" alt="image" src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b" /> (cherry picked from commit eb62a04)
…4360) ## Summary Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty. To verify: - create a new agent binary download source - create an agent policy with using the default download source - check on Agent policy details UI that the Agent binary download UI select is populated correctly ``` POST kbn:/api/fleet/agent_policies { "name": "demo-policy-5", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics", "traces" ], "inactivity_timeout": 1209600, "is_protected": false, "download_source_id": "fleet-default-download-source" } ``` Before:  After: <img width="1517" alt="image" src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b" /> (cherry picked from commit eb62a04)
…4360) ## Summary Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty. To verify: - create a new agent binary download source - create an agent policy with using the default download source - check on Agent policy details UI that the Agent binary download UI select is populated correctly ``` POST kbn:/api/fleet/agent_policies { "name": "demo-policy-5", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics", "traces" ], "inactivity_timeout": 1209600, "is_protected": false, "download_source_id": "fleet-default-download-source" } ``` Before:  After: <img width="1517" alt="image" src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b" /> (cherry picked from commit eb62a04)
…4360) ## Summary Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty. To verify: - create a new agent binary download source - create an agent policy with using the default download source - check on Agent policy details UI that the Agent binary download UI select is populated correctly ``` POST kbn:/api/fleet/agent_policies { "name": "demo-policy-5", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics", "traces" ], "inactivity_timeout": 1209600, "is_protected": false, "download_source_id": "fleet-default-download-source" } ``` Before:  After: <img width="1517" alt="image" src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b" /> (cherry picked from commit eb62a04)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
) (#214453) # Backport This will backport the following commits from `main` to `9.0`: - [[Fleet] fix UI bug displaying default agent binary source (#214360)](#214360) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-13T17:01:08Z","message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Fleet] fix UI bug displaying default agent binary source","number":214360,"url":"https://github.com/elastic/kibana/pull/214360","mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214360","number":214360,"mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
…4360) (#214450) # Backport This will backport the following commits from `main` to `8.17`: - [[Fleet] fix UI bug displaying default agent binary source (#214360)](#214360) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-13T17:01:08Z","message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Fleet] fix UI bug displaying default agent binary source","number":214360,"url":"https://github.com/elastic/kibana/pull/214360","mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214360","number":214360,"mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
…4360) (#214449) # Backport This will backport the following commits from `main` to `8.16`: - [[Fleet] fix UI bug displaying default agent binary source (#214360)](#214360) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-13T17:01:08Z","message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Fleet] fix UI bug displaying default agent binary source","number":214360,"url":"https://github.com/elastic/kibana/pull/214360","mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214360","number":214360,"mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
) (#214452) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] fix UI bug displaying default agent binary source (#214360)](#214360) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-13T17:01:08Z","message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Fleet] fix UI bug displaying default agent binary source","number":214360,"url":"https://github.com/elastic/kibana/pull/214360","mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214360","number":214360,"mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
…4360) (#214451) # Backport This will backport the following commits from `main` to `8.18`: - [[Fleet] fix UI bug displaying default agent binary source (#214360)](#214360) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-13T17:01:08Z","message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Fleet] fix UI bug displaying default agent binary source","number":214360,"url":"https://github.com/elastic/kibana/pull/214360","mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214360","number":214360,"mergeCommit":{"message":"[Fleet] fix UI bug displaying default agent binary source (#214360)\n\n## Summary\n\nFix UI bug when an agent policy uses the default download source\nexplicitly. The Agent binary download UI select was empty.\n\nTo verify:\n- create a new agent binary download source\n- create an agent policy with using the default download source\n- check on Agent policy details UI that the Agent binary download UI\nselect is populated correctly\n\n```\nPOST kbn:/api/fleet/agent_policies\n{\n \"name\": \"demo-policy-5\",\n \"description\": \"\",\n \"namespace\": \"default\",\n \"monitoring_enabled\": [\n \"logs\",\n \"metrics\",\n \"traces\"\n ],\n \"inactivity_timeout\": 1209600,\n \"is_protected\": false,\n \"download_source_id\": \"fleet-default-download-source\"\n}\n```\n\nBefore:\n\n\n\n\nAfter:\n\n<img width=\"1517\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b\"\n/>","sha":"eb62a047bd06ebb70c6119bf3c19145df901fdda"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
…4360) ## Summary Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty. To verify: - create a new agent binary download source - create an agent policy with using the default download source - check on Agent policy details UI that the Agent binary download UI select is populated correctly ``` POST kbn:/api/fleet/agent_policies { "name": "demo-policy-5", "description": "", "namespace": "default", "monitoring_enabled": [ "logs", "metrics", "traces" ], "inactivity_timeout": 1209600, "is_protected": false, "download_source_id": "fleet-default-download-source" } ``` Before:  After: <img width="1517" alt="image" src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b" />

Summary
Fix UI bug when an agent policy uses the default download source explicitly. The Agent binary download UI select was empty.
To verify:
Before:
After: