Skip to content

[8.x] [ResponseOps][Alerts] Remove fieldsForAad attribute from rule type registry (#215767) #217649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 10, 2025

Conversation

js-jankisalvi
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…gistry (elastic#215767)

## Summary

Implements elastic#215338

This PR removes `fieldsForAAD ` and `hasFieldsForAAD ` from the rule
type registry and all corresponding rule types.
It uses existing `getBrowserFieldsByFeatureId ` route to fetch fields
from
[field_caps](https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-field-caps.html)
API.

It also updates `getBrowserFieldsByFeatureId` route
- to use `include_empty_fields: false` query param to fetch only non
empty fields to have limited number of fields
- to use `index filter` to fetch fields only from last 90 days for
better performance
    ```
       const indexFilter = {
              range: {
                '@timestamp': {
                  gte: 'now-90d',
                },
              },
            };
    ```

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### Flaky Test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8151

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit adbc6d9)

# Conflicts:
#	x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts
@js-jankisalvi js-jankisalvi enabled auto-merge (squash) April 9, 2025 10:23
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Apr 9, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

github-actions bot commented Apr 9, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 10, 2025

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: c4e98f3
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-217649-c4e98f31613b

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #36 / Rules Management - Rule import export API @ess @serverless @skipInServerlessMKI import_rules importing rules with an index @skipInServerless migrate pre-8.0 action connector ids should be imported into the non-default space should import a non-default-space 7.16 rule with a connector made in the non-default space into the default space successfully
  • [job] [logs] FTR Configs #20 / transform - actions starting non healthy continuous transform with pivot configuration start transform

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
@kbn/triggers-actions-ui-types 17 16 -1
alerting 847 846 -1
ruleRegistry 221 220 -1
triggersActionsUi 520 519 -1
total -4

Async chunks

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

id before after diff
apm 2.7MB 2.7MB -99.0B
cases 1.3MB 1.3MB -3.0B
discover 991.5KB 991.4KB -101.0B
embeddableAlertsTable 796.4KB 796.4KB -41.0B
infra 1.6MB 1.6MB -101.0B
ml 5.4MB 5.4MB -108.0B
monitoring 659.4KB 659.3KB -103.0B
observability 1.3MB 1.3MB -114.0B
observabilityLogsExplorer 259.6KB 259.5KB -101.0B
slo 909.4KB 909.3KB -101.0B
synthetics 1.1MB 1.1MB -103.0B
transform 627.0KB 626.9KB -101.0B
triggersActionsUi 1.4MB 1.4MB -14.0B
uptime 525.0KB 524.9KB -103.0B
total -1.2KB

Page load bundle

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

id before after diff
triggersActionsUi 99.3KB 99.2KB -36.0B
Unknown metric groups

API count

id before after diff
@kbn/triggers-actions-ui-types 17 16 -1
alerting 881 880 -1
ruleRegistry 259 258 -1
triggersActionsUi 526 525 -1
total -4

ESLint disabled line counts

id before after diff
@kbn/test-suites-xpack 756 755 -1

Total ESLint disabled count

id before after diff
@kbn/test-suites-xpack 782 781 -1

History

@js-jankisalvi js-jankisalvi merged commit 1575ad3 into elastic:8.x Apr 10, 2025
8 checks passed
@js-jankisalvi js-jankisalvi deleted the backport/8.x/pr-215767 branch April 10, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants