Skip to content

Conversation

@mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Oct 30, 2025

Summary

Closes #238511.

Refactors the project picker into a new shared package (@kbn/cps-utils) to enable reusability across multiple consumers, and uses the real data to get Linked projects to the picker.
Screenshot 2025-10-30 at 14 43 07

Changes

Architecture

  • New Package: Created @kbn/cps-utils package containing the project picker component and related utilities
  • CPS Manager: Added cpsManager service in the CPS plugin that fetches linked projects when running in serverless + CPS mode
  • Project Routing: Extended @kbn/es-query with project routing types (ProjectRouting)

Project Picker Enhancements

  • Consumer-Driven Routing: Project picker now accepts projectRouting and onProjectRoutingChange props, allowing consumers (e.g., Dashboard, Lens layers, global) to manage routing state
  • Conditional Rendering: Picker only displays when CPSManager returns valid data with at least one linked project
  • Testing: Added unit tests and integration tests for the project picker component

Configuration Changes

  • Feature Flag Migration: Removed localStorage-based feature flag in favor of YAML configuration
  • New Config Requirements: To enable CPS mode, add the following to your serverless.yml:
    cps.enabled: true
    cps.cpsEnabled: true

How to test it

  • To set up CPS, make sure to use the internal doc we use for this purpose.

For now, the data in the picker should reflect what has been set up, but picker is not reactive.

@mbondyra mbondyra force-pushed the data-plugin-cps-3 branch 4 times, most recently from 78c724f to ea0e415 Compare October 30, 2025 13:42
@mbondyra mbondyra marked this pull request as ready for review October 30, 2025 13:44
@mbondyra mbondyra requested review from a team as code owners October 30, 2025 13:44
@mbondyra mbondyra added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Oct 30, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 30, 2025

💔 Build Failed

Failed CI Steps

History

@mbondyra mbondyra requested a review from a team as a code owner October 30, 2025 16:11
@mbondyra mbondyra changed the title [CPS] use the real data for getting the linked projects [CPS] use real data for getting the linked projects Oct 30, 2025
@mbondyra mbondyra changed the title [CPS] use real data for getting the linked projects [CPS] use real data for getting linked projects Oct 30, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Unified Search] Hook up project picker component to CPS API

3 participants