Skip to content

[Fleet] Deduplicate ids in package policy API handlers#247031

Merged
juliaElastic merged 1 commit intoelastic:mainfrom
juliaElastic:deduplicate-ids
Dec 19, 2025
Merged

[Fleet] Deduplicate ids in package policy API handlers#247031
juliaElastic merged 1 commit intoelastic:mainfrom
juliaElastic:deduplicate-ids

Conversation

@juliaElastic
Copy link
Copy Markdown
Contributor

@juliaElastic juliaElastic commented Dec 19, 2025

Summary

Relates #240983

Deduplicate ids in package policy API handlers to save unnecessarily querying duplicate ids.

To verify:

  • take a valid package policy id
  • try querying twice with the bulk API
  • expect only one result
POST kbn:/api/fleet/package_policies/_bulk_get
{
    "ids": ["dc0754de-7111-4de3-91d7-2b7d2a080676", "dc0754de-7111-4de3-91d7-2b7d2a080676"]
}

{
  "items": [
    {
      "id": "dc0754de-7111-4de3-91d7-2b7d2a080676",
      "version": "WzE1NTYsMV0=",
      "spaceIds": [
        "default"
      ],
      ...
    }
  ]
}

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.19.10 v9.1.9 v9.1.10 v9.2.3 v9.2.4 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants