Skip to content
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

[Maps] Ensure EMS has versioned public APIs #157094

Closed
15 tasks done
thomasneirynck opened this issue May 8, 2023 · 2 comments
Closed
15 tasks done

[Maps] Ensure EMS has versioned public APIs #157094

thomasneirynck opened this issue May 8, 2023 · 2 comments
Assignees
Labels
chore Feature:Maps impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented May 8, 2023

EMS will need to be backward-compliant using a date-based versioning. Ensure Kibana connects appropriately.

Edits by @jsanz 👇

Changes needed

With the new date-based version labels we need to make some modifications to the different components of the Elastic Maps Service.

New APIs

Apart from the unified Stack SemVer versions, EMS will be exposing two different API endpoints, one for the data boundaries at vector.maps.elastic.co (EMS File Service), and another for the basemaps served at tiles.maps.elastic.co.

File Service

Currently the data boundaries are served from a static hosting. All data is stored in a single folder as GeoJSON and TopoJSON files, and manifests are generated on version folders (v7.1, v7.11, etc.).

So first we need to extend current datasets metadata properties to include support for date-based versions. We need to generate new manifests in folders named as new API date-based versions, very likely keeping the the newest version at a pinned latest folder.

Second, a new vector.maps.elastic.co backend needs to:

Tile Service

The requests to our manifest and basemaps styles contain the SemVer label in the URL, but just to validate the string without any further processing. There is only one basemaps and one set of styles and manifests.

As per #136642 we are doing a small version negotiation to include new style names to our basemaps. The affected code path will need also to understand the new versioning scheme.

The new header could be only understood by the main /manifest endpoint. The response will contain the date-based version in the styles URLS, so we don't need to modify Maplibre requests to include a header.

If we ever want to version also our styles and basemaps data we can include the logic in the same fashion we will do to our basemap names.

EMS Landing Page

EMS Landing Page is currently also versioned with folders. Since this is not an API endpoint we don't need to change how we serve the website and keep it in the static hosting we use now. We may want to change the logic for the version in the root folder to be always the latest release, so the serverless version of Kibana can always point to https://maps.elastic.co and we can run the deploy of the root with tags with the date naming convention independently if run them from the main branch or the last major release.

Currently EMS Landing Page already generates folders for branches with the date name schema, check the Buildkite pipeline definition

Tasks

Kibana and EMS Client

Preview Give feedback
  1. Feature:Maps Team:Presentation impact:medium loe:small
    jsanz
  2. Feature:Maps Project:Serverless Team:Presentation impact:high loe:medium
    jsanz
  3. v8.5.0

EMS File Service

Preview Give feedback
  1. jsanz
  2. Feature:Maps Team:Presentation
    jsanz

EMS Tile Service

Preview Give feedback
  1. Feature:Maps Team:Presentation
    jsanz

EMS Landing Page

Preview Give feedback
  1. jsanz
  2. enhancement
    jsanz
@botelastic botelastic bot added the needs-team Issues missing a team label label May 8, 2023
@thomasneirynck thomasneirynck added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed needs-team Issues missing a team label labels May 8, 2023
@elasticmachine
Copy link
Contributor

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

@ThomThomson ThomThomson added Feature:Maps loe:large Large Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels May 9, 2023
jsanz added a commit that referenced this issue Oct 17, 2023
Part of #157094
Fixes #161790

## Summary

* Upgrade to `@elastic/[email protected]`
* Updates the instantiation of the EMS Client to pass the version and
HTTP header on Serverless builds.

### Checklist

- [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

## Testing

The serverless update to EMS Tile Service is ready in Production.
Running Kibana in serverless mode, you can check for requests to
`https://tiles.maps.elastic.dev/latest/manifest` and the associated
`elastic-api-version` header being accepted.

EMS File Service already accepts the `latest/manifest` endpoint in our
production environment.

---------

Co-authored-by: kibanamachine <[email protected]>
@jsanz
Copy link
Member

jsanz commented Oct 18, 2023

@thomasneirynck @nickpeihl I'm going to leave the documentation part aside and set this effort as done.

This week finally got merged changes in both Kibana1 and EMS Landing Page2 so both products access the /latest/manifest endpoints. OAS documentation has been published in the ems-client repo.

Not directly related with serverless, but I included in this effort also the update of the basemaps styles and data but I found an issue and I left that for later.

Closing, but please let me know if there is feedback or comments.

Footnotes

  1. in main, to be included in next Serverless promotion

  2. in staging now, to be published soon as well

@jsanz jsanz closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Maps impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

4 participants