Skip to content

[Fleet] fix UI bug displaying default agent binary source#214360

Merged
juliaElastic merged 3 commits intoelastic:mainfrom
juliaElastic:fix-default-download-source
Mar 13, 2025
Merged

[Fleet] fix UI bug displaying default agent binary source#214360
juliaElastic merged 3 commits intoelastic:mainfrom
juliaElastic:fix-default-download-source

Conversation

@juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Mar 13, 2025

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:

image

After:

image

@juliaElastic juliaElastic self-assigned this Mar 13, 2025
@juliaElastic juliaElastic requested a review from a team as a code owner March 13, 2025 12:32
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 13, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet self-requested a review March 13, 2025 12:58
defaultDownloadSourceDisabledMessage
),
value: DEFAULT_SELECT_VALUE,
value: DEFAULT_DOWNLOAD_SOURCE_ID,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

@juliaElastic juliaElastic Mar 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in that case should we have both options?

  • Default (currently source 1)
  • source 1

it's what we are doing for outputs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh okay, probably we can do that

Copy link
Contributor

@criamico criamico Mar 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, now the default option is visible next to the default one, did the same for Fleet server hosts

image

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@juliaElastic juliaElastic enabled auto-merge (squash) March 13, 2025 13:59
Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@juliaElastic juliaElastic merged commit eb62a04 into elastic:main Mar 13, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.18, 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/13840354139

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Fleet Cypress Tests #1 / View agents list Bulk actions should allow to bulk upgrade agents and cancel that upgrade

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB -54.0B

History

cc @juliaElastic

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…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:

![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>

(cherry picked from commit eb62a04)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…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:

![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>

(cherry picked from commit eb62a04)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…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:

![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>

(cherry picked from commit eb62a04)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…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:

![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>

(cherry picked from commit eb62a04)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 13, 2025
…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:

![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>

(cherry picked from commit eb62a04)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.17
8.18
8.x
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 13, 2025
) (#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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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>
kibanamachine added a commit that referenced this pull request Mar 13, 2025
…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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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>
kibanamachine added a commit that referenced this pull request Mar 13, 2025
…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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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>
kibanamachine added a commit that referenced this pull request Mar 13, 2025
) (#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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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>
kibanamachine added a commit that referenced this pull request Mar 13, 2025
…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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)\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>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
…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:


![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants