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

Epic: Smooth UI upgrades #170421

Closed
10 of 11 tasks
jloleysens opened this issue Nov 2, 2023 · 2 comments
Closed
10 of 11 tasks

Epic: Smooth UI upgrades #170421

jloleysens opened this issue Nov 2, 2023 · 2 comments
Assignees
Labels
epic Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@jloleysens
Copy link
Contributor

jloleysens commented Nov 2, 2023

Goal

Minimize disruption to UI users when we roll out a new version of Kibana.

  1. N+1 servers don’t know how to serve version N UI assets
  2. version N servers don’t know how to respond to requests for API version N+1
    1. Autoscaled UI nodes serve traffic from older nodes leading to forward compatibility issues on the backend

Additional notes

  • We can add an alert to check for new build numbers reaching old servers
  • Teams need to handle backwards incompatibility (N+1 does not handle N requests). With HTTP API versioning this should just work.
  • We should handle forwards incompatibility (ideally prevent it)
    • Manually release APIs first. Classic development pipeline ships the backend first, and then the UI that uses the backend after. This lowers velocity however.
    • Iteration on above, we can ship backend + UI together but prevent new UI from being served before data migrations completed. Thus rendering logic becomes versioned (N+1 can always render N UI based on some polling/observable on the kibana index metadata to know which version of our data we are on)
      • Note the rendered HTML is per project type
  • It would be useful to be able to release our UI and backends independently
  • We can explore this capability in the future, not needed for the first iteration
  • Would be useful to have a manifest of all released UI versions

Tasks

  1. Feature:http Team:Core backport:skip release_note:skip v8.12.0
  2. Feature:http Team:Core backport:skip release_note:skip v8.12.0
  3. Feature:http Team:Core backport:skip release_note:skip v8.12.0
    pgayvallet
  4. Team:Core blocked
    jloleysens
  5. Feature:http Team:Core backport:skip release_note:skip v8.14.0
    jloleysens
@jloleysens jloleysens added the epic label Nov 2, 2023
@jloleysens jloleysens self-assigned this Nov 2, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 2, 2023
@jloleysens jloleysens added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Nov 2, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 2, 2023
pgayvallet added a commit that referenced this issue Nov 16, 2023
## Summary

Part of #170421

### 1. Introduce the `http.staticAssets` service

Which can be used to generate hrefs to Kibana's static assets in a
CDN-friendly way (based on the CDN url if defined in the config, and the
Kibana's basePath otherwise)

The service is exposed both on the browser and server-side.

For now a single API is exposed: `getPluginAssetHref`

```ts
// returns "/plugins/{pluginId}/assets/some_folder/asset.png" when CDN isn't configured
core.http.statisAssets.getPluginAssetHref('some_folder/asset.png');
```

### 2. Plug it on some of the `home` plugin assets

Adapt the sample data sets and tutorial schemas to use the service for
links to the associated assets

## How to test

#### 1. Edit`/etc/hosts`

add a line `127.0.0.1       local.cdn`

#### 2. Edit `kibana.yaml`

Add `server.cdn.url: "http://local.cdn:5601"`

#### 3. Boot kibana and navigate to sample data set installation

(if started in dev mode, use `--no-base-path`)

Confirm that the sample data set presentation images are pointing to the
CDN url and properly displayed:

<img width="1565" alt="Screenshot 2023-11-13 at 09 28 51"
src="https://github.com/elastic/kibana/assets/1532934/23a887af-00cb-400c-9ab1-511ba463495f">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@rayafratkina rayafratkina changed the title Smooth UI upgrades Epic: Smooth UI upgrades Apr 15, 2024
@rudolf
Copy link
Contributor

rudolf commented Apr 19, 2024

With the CDN rollout to production serverless complete, I'm marking this as done 🥳

@rudolf rudolf closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

3 participants