Skip to content

[Fleet] Enable useSpaceAwareness feature flag by default#222230

Merged
MichelLosier merged 77 commits intoelastic:9.1from
kpollich:fleet/enable-space-awareness-flag
Jun 26, 2025
Merged

[Fleet] Enable useSpaceAwareness feature flag by default#222230
MichelLosier merged 77 commits intoelastic:9.1from
kpollich:fleet/enable-space-awareness-flag

Conversation

@kpollich
Copy link
Copy Markdown
Member

@kpollich kpollich commented Jun 2, 2025

Summary

Does what it says on the tin.

Closes #220083

@kpollich kpollich self-assigned this Jun 2, 2025
@kpollich kpollich added Team:Fleet Team label for Observability Data Collection Fleet team release_note:feature Makes this part of the condensed release notes backport:skip This PR does not require backporting labels Jun 2, 2025
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/alerting/maintenance_window --update'
… src/core/server/integration_tests/ci_checks'
@kpollich
Copy link
Copy Markdown
Member Author

kpollich commented Jun 2, 2025

@elasticmachine merge upstream

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

@MichelLosier
Copy link
Copy Markdown
Contributor

\ci

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

@paul-tavares
Copy link
Copy Markdown
Contributor

/ci

// and lodash's isEqual doesn't know how to compare Sets.
const success = isEqualWith(res.body, expectedWithoutActions, (value, other, key) => {
if (Array.isArray(value) && Array.isArray(other)) {
let isEqualResponse = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FYI: I always seem to spend allot of time trying to figure out what the miss-match is when these tests fail, so I added code here (and in another test file like it) to output a diff of the key that fails the validation. Hope that is ok with you all

Copy link
Copy Markdown
Contributor

@georgewallace georgewallace left a comment

Choose a reason for hiding this comment

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

Just reviewed the changes to the kibana.yaml and the kibana.serverless.yaml files that docs use. No issues with the changes.

@paul-tavares
Copy link
Copy Markdown
Contributor

/ci

Copy link
Copy Markdown
Member

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

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

Approving to unblock since @georgewallace already reviewed for docs

Copy link
Copy Markdown
Contributor

@dokmic dokmic left a comment

Choose a reason for hiding this comment

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

@MichelLosier I checked the code once again. Considering what you described, I think it's an acceptable change. I agree that the risk is low, especially since the object type has limited usage.

So that core changes LGTM.

cc @gsoldevila @rudolf

@MichelLosier
Copy link
Copy Markdown
Contributor

/ci

…olation exceptions

associated with issue around role migration
…lag' into fork/kpollich/fleet/enable-space-awareness-flag
@paul-tavares
Copy link
Copy Markdown
Contributor

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1431 1432 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 168.6KB 168.7KB +89.0B
Unknown metric groups

API count

id before after diff
fleet 1560 1561 +1

History

cc @kpollich

@MichelLosier MichelLosier changed the base branch from main to 9.1 June 26, 2025 17:25
@MichelLosier MichelLosier marked this pull request as ready for review June 26, 2025 17:26
@MichelLosier MichelLosier requested review from a team as code owners June 26, 2025 17:26
@MichelLosier MichelLosier changed the base branch from 9.1 to main June 26, 2025 17:28
@MichelLosier MichelLosier changed the base branch from main to 9.1 June 26, 2025 17:29
@MichelLosier MichelLosier merged commit 206b67b into elastic:9.1 Jun 26, 2025
11 checks passed
kibanamachine added a commit that referenced this pull request Jul 15, 2025
…tures (#225678) (#227991)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[EDR Workflows] Global artifact API privilege to deprecated features
(#225678)](#225678)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gergő
Ábrahám","email":"gergo.abraham@elastic.co"},"sourceCommit":{"committedDate":"2025-07-15T11:49:20Z","message":"[EDR
Workflows] Global artifact API privilege to deprecated features
(#225678)\n\n## Summary\n\n#219566 deprecated `siemV2`, and added a
new\n`global_artifact_management_all` privilege. See previous PR
description\nfor diagrams.\n\nHowever, the `replaceBy` role deprecation
feature does not 'migrate'\nprivileges completely, only copies `ui:`
privileges.\n\nTherefore, `api:securitySolution-writeGlobalArtifacts`
was missing from\nthe required places, resulting in the bug described in
the original\nissue:
https://github.com/elastic/security-team/issues/12921\n\nThis PR:\n-
adds the missing `api:` privileges to the required places,\n- for this,
it copy/pastes Endpoint Exceptions `api`/`ui` privileges\ndirectly into
multiple Kibana feature versions, so it can be\nversioned/deprecated
(its `siem`/`siemV2` privileges differ from\n`siemV3`):
17f6397
and\n4c8730e0d37dd51a819fe990664e1811e959b51c\n- adds a new backward
compatibility API test, that uses the space aware\nfeature flag to
regress the bug issue\n\n> [!TIP]\n> This bug was found by another
backward compatibility tests, during\nenabling the space awareness
feature flag. Those tests were skipped in\nthe PR, and can be enabled
after this fix is merged to
9.1.\n\nhttps://github.com//pull/222230/files#diff-2f89ba63a6a03d9982bb0a0022c1a6e733b889aa7779a8ea9ebb771bae9e68f2\n\n>
[!IMPORTANT]\n> The fix only affects an `api` privilege, that is only
used behind a\nfeature flag. Therefore, not having this fix in the next
serverless\npromotion should not cause any issue on serverless, as
serverless\nenvironment does not use this api privilege.\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"1dc8cf828ab39ad36f4651780a606d900c13202c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","backport:version","v9.1.0","v9.2.0"],"title":"[EDR
Workflows] Global artifact API privilege to deprecated
features","number":225678,"url":"https://github.com/elastic/kibana/pull/225678","mergeCommit":{"message":"[EDR
Workflows] Global artifact API privilege to deprecated features
(#225678)\n\n## Summary\n\n#219566 deprecated `siemV2`, and added a
new\n`global_artifact_management_all` privilege. See previous PR
description\nfor diagrams.\n\nHowever, the `replaceBy` role deprecation
feature does not 'migrate'\nprivileges completely, only copies `ui:`
privileges.\n\nTherefore, `api:securitySolution-writeGlobalArtifacts`
was missing from\nthe required places, resulting in the bug described in
the original\nissue:
https://github.com/elastic/security-team/issues/12921\n\nThis PR:\n-
adds the missing `api:` privileges to the required places,\n- for this,
it copy/pastes Endpoint Exceptions `api`/`ui` privileges\ndirectly into
multiple Kibana feature versions, so it can be\nversioned/deprecated
(its `siem`/`siemV2` privileges differ from\n`siemV3`):
17f6397
and\n4c8730e0d37dd51a819fe990664e1811e959b51c\n- adds a new backward
compatibility API test, that uses the space aware\nfeature flag to
regress the bug issue\n\n> [!TIP]\n> This bug was found by another
backward compatibility tests, during\nenabling the space awareness
feature flag. Those tests were skipped in\nthe PR, and can be enabled
after this fix is merged to
9.1.\n\nhttps://github.com//pull/222230/files#diff-2f89ba63a6a03d9982bb0a0022c1a6e733b889aa7779a8ea9ebb771bae9e68f2\n\n>
[!IMPORTANT]\n> The fix only affects an `api` privilege, that is only
used behind a\nfeature flag. Therefore, not having this fix in the next
serverless\npromotion should not cause any issue on serverless, as
serverless\nenvironment does not use this api privilege.\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"1dc8cf828ab39ad36f4651780a606d900c13202c"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225678","number":225678,"mergeCommit":{"message":"[EDR
Workflows] Global artifact API privilege to deprecated features
(#225678)\n\n## Summary\n\n#219566 deprecated `siemV2`, and added a
new\n`global_artifact_management_all` privilege. See previous PR
description\nfor diagrams.\n\nHowever, the `replaceBy` role deprecation
feature does not 'migrate'\nprivileges completely, only copies `ui:`
privileges.\n\nTherefore, `api:securitySolution-writeGlobalArtifacts`
was missing from\nthe required places, resulting in the bug described in
the original\nissue:
https://github.com/elastic/security-team/issues/12921\n\nThis PR:\n-
adds the missing `api:` privileges to the required places,\n- for this,
it copy/pastes Endpoint Exceptions `api`/`ui` privileges\ndirectly into
multiple Kibana feature versions, so it can be\nversioned/deprecated
(its `siem`/`siemV2` privileges differ from\n`siemV3`):
17f6397
and\n4c8730e0d37dd51a819fe990664e1811e959b51c\n- adds a new backward
compatibility API test, that uses the space aware\nfeature flag to
regress the bug issue\n\n> [!TIP]\n> This bug was found by another
backward compatibility tests, during\nenabling the space awareness
feature flag. Those tests were skipped in\nthe PR, and can be enabled
after this fix is merged to
9.1.\n\nhttps://github.com//pull/222230/files#diff-2f89ba63a6a03d9982bb0a0022c1a6e733b889aa7779a8ea9ebb771bae9e68f2\n\n>
[!IMPORTANT]\n> The fix only affects an `api` privilege, that is only
used behind a\nfeature flag. Therefore, not having this fix in the next
serverless\npromotion should not cause any issue on serverless, as
serverless\nenvironment does not use this api privilege.\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"1dc8cf828ab39ad36f4651780a606d900c13202c"}}]}]
BACKPORT-->

Co-authored-by: Gergő Ábrahám <gergo.abraham@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Enable space awareness feature flag