Skip to content

[Search] [Onboarding] Update search api to use EventEmitter instead of Provider#209784

Merged
yansavitski merged 14 commits intoelastic:mainfrom
yansavitski:update-search-api
Feb 11, 2025
Merged

[Search] [Onboarding] Update search api to use EventEmitter instead of Provider#209784
yansavitski merged 14 commits intoelastic:mainfrom
yansavitski:update-search-api

Conversation

@yansavitski
Copy link
Copy Markdown
Contributor

@yansavitski yansavitski commented Feb 5, 2025

Summary

Transitions API key state management from a provider to an event emitter, simplifying integration and eliminating the need to wrap components in context. Components can now directly call useSearchApiKey().

Fixes an issue where invalidated API keys were not automatically regenerated. The new approach ensures that the key is properly recreated, improving the reliability of API key handling.

Added/Updated FTRs for those changes

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

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.

@yansavitski yansavitski added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Search v9.1.0 labels Feb 5, 2025
@yansavitski yansavitski marked this pull request as ready for review February 5, 2025 14:35
@yansavitski yansavitski requested a review from a team as a code owner February 5, 2025 14:35
@yansavitski yansavitski changed the title [Search] [Onboarding] Update search api [Search] [Onboarding] Update search api to use EventEmitter instead of Provider Feb 5, 2025
@elastic elastic deleted a comment from kibanamachine Feb 5, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7840

[❌] x-pack/test/functional_search/config.ts: 0/100 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7841

[❌] x-pack/test/functional_search/config.ts: 74/100 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7842

[✅] x-pack/test/functional_search/config.ts: 100/100 tests passed.

see run history

@yansavitski yansavitski enabled auto-merge (squash) February 6, 2025 11:34
@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
@kbn/search-api-keys-components 8 5 -3

Async chunks

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

id before after diff
searchIndices 177.2KB 183.1KB +6.0KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/search-api-keys-components 1 0 -1

Page load bundle

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

id before after diff
searchIndices 8.4KB 8.3KB -58.0B
Unknown metric groups

API count

id before after diff
@kbn/search-api-keys-components 8 5 -3

async chunk count

id before after diff
searchIndices 5 4 -1

History

Copy link
Copy Markdown
Member

@sphilipse sphilipse left a comment

Choose a reason for hiding this comment

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

LGTM!

@yansavitski yansavitski merged commit ed19705 into elastic:main Feb 11, 2025
kapral18 added a commit to agusruidiazgd/kibana that referenced this pull request Feb 11, 2025
…on-206439

* main: (402 commits)
  [Search]: Fix Number type field to have correct property (elastic#210462)
  Change filter for rule monitoring gaps (elastic#209983)
  Update Logs Explorer deprecation messages (elastic#201307)
  [APM] Remove `error.id` in `getErrorGroupMainStatistics` query as it's not used (elastic#210613)
  [Embeddable] Fix presentation panel styles (elastic#210113)
  [ci] enable Scout reporter for on-merge-unsupported-ftrs (elastic#210627)
  [Fix][Synonyms UI]Add navigation link to the Detail breadcrumb. (elastic#209574)
  chore(dep): bump `store2` from `2.12.0` to `2.14.4` (elastic#210530)
  [scout] adding test helper `@kbn/scout-oblt` package and uptate onboarding tests (elastic#209761)
  [Cloud Security] Asset Inventory table flyout controls  (elastic#208452)
  [ML] Fix model deployment check in file uploader (elastic#209585)
  Updates archive again (elastic#209828)
  [Security Solution] Added concurrency limits and request throttling to prebuilt rule routes (elastic#209551)
  [Search] [Onboarding] Update search api to use EventEmitter instead of Provider (elastic#209784)
  [maps] lazy load map actions (elastic#210252)
  [Cloud Security] Adding telemetry collection condition based on render condition (elastic#208758)
  [Solution nav] Use flyout for Stack Management in Search and Observability solutions (elastic#208632)
  [Search] Fix Add Inference Endpoint API call (elastic#210243)
  [Agentless Connectors] Integration overview panel (elastic#210222)
  [Lens] Restore dynamic colouring by value for Last value agg (elastic#209110)
  ...
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:skip Skip the PR/issue when compiling release notes Team:Search v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants