Skip to content

[Maps] Do not patch maps calls with local project_routing#257706

Merged
mbondyra merged 5 commits intoelastic:mainfrom
mbondyra:maps_cps
Mar 16, 2026
Merged

[Maps] Do not patch maps calls with local project_routing#257706
mbondyra merged 5 commits intoelastic:mainfrom
mbondyra:maps_cps

Conversation

@mbondyra
Copy link
Copy Markdown
Contributor

@mbondyra mbondyra commented Mar 13, 2026

Summary

  1. In this one: Convert transport.request() to typed ES client methods #256456 we accidentally patched Maps mvt routes with only supporting local project routing, but we shouldn't have, as CPS is supported on Maps (the setting should be taken from the project picker)

  2. In this PR I also removed a setting from the cps picker, since it cannot be linked for tech preview

Screenshot 2026-03-13 at 16 41 35

@mbondyra mbondyra requested a review from a team as a code owner March 13, 2026 15:36
@mbondyra mbondyra added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 13, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@lukeelmers lukeelmers added bug Fixes for quality problems that affect the customer experience Feature:CPS labels Mar 13, 2026
closePopover();
},
},
{
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.

Should commented out code just be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd rather keep it - they have be suported for GA so it's gonna be just one - two month of this code to live as a comment and less work in the future. It's not like the feature that we'll forget about, it is planned to add this (just not ready from cloud side).

method: 'POST',
path,
body,
querystring: { project_routing: '_alias:_origin' },
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.

Can you explain this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What Rudolf did in his PR (linked in the description) is patching all the routes that should have project_routing always set on _alias:_origin. But patching this one was a mistake - we actually don't want this route to be set to local, because maps support cps so the setting should be instead taken from cps picker and then propagated down to body of this request. This has already been working, but the change from the linked PR broke it (I didn't notice when approving).

Copy link
Copy Markdown
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

CPS utils changes LGTM (just commented out code). But it would be great if we have an issue for the link, to also mention it at the comments.

Comment thread src/platform/packages/shared/kbn-cps-utils/components/project_picker_settings.tsx Outdated
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
Copy link
Copy Markdown
Member

@olapawlus olapawlus left a comment

Choose a reason for hiding this comment

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

Code review only, LGTM!

@mbondyra mbondyra enabled auto-merge (squash) March 16, 2026 08:38
@mbondyra mbondyra merged commit 85261da into elastic:main Mar 16, 2026
18 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
cps 13.0KB 12.8KB -115.0B

History

sorenlouv pushed a commit that referenced this pull request Mar 17, 2026
## Summary

1. In this one: #256456 we
accidentally patched Maps mvt routes with only supporting local project
routing, but we shouldn't have, as CPS is supported on Maps (the setting
should be taken from the project picker)

2. In this PR I also removed a setting from the cps picker, since it
cannot be linked for tech preview
<img width="932" height="263" alt="Screenshot 2026-03-13 at 16 41 35"
src="https://github.com/user-attachments/assets/ec12dcf5-3a9d-4597-bda6-1573b4f9247d"
/>
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Mar 26, 2026
…7706)

## Summary

1. In this one: elastic#256456 we
accidentally patched Maps mvt routes with only supporting local project
routing, but we shouldn't have, as CPS is supported on Maps (the setting
should be taken from the project picker)

2. In this PR I also removed a setting from the cps picker, since it
cannot be linked for tech preview
<img width="932" height="263" alt="Screenshot 2026-03-13 at 16 41 35"
src="https://github.com/user-attachments/assets/ec12dcf5-3a9d-4597-bda6-1573b4f9247d"
/>
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 bug Fixes for quality problems that affect the customer experience Feature:CPS release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants