[Http] Replace buildNr with buildSha in static asset paths#175898
[Http] Replace buildNr with buildSha in static asset paths#175898jloleysens merged 44 commits intoelastic:mainfrom
buildNr with buildSha in static asset paths#175898Conversation
|
/ci |
b97a046 to
2562311
Compare
|
/ci |
|
/ci |
|
@elasticmachine merge upstream |
Dosant
left a comment
There was a problem hiding this comment.
x-pack/plugins/screenshotting lgtm
azasypkin
left a comment
There was a problem hiding this comment.
LGTM, thanks! Tested locally with the custom base path and without in two different SSR cases we have in Security plugin - everything works as expected.
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: cc @jloleysens |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
* main: (224 commits) [Http] Replace `buildNr` with `buildSha` in static asset paths (#175898) [Ops] Fix GCS bucket access for future buildkite agents (#174756) [api-docs] 2024-02-07 Daily api_docs build (#176362) skip flaky suite (#176002) skip failing es promotion suite (#176359) [Cloud Security] [Grouping] Add URL Params support to the grouping components (#175749) chore(NA): update versions after v8.12.2 bump (#176309) chore(NA): update versions after v7.17.19 bump (#176313) skip failing test suite (#176352) [SLO] Enable burn rate alert by default during creation via UI (#176317) [Fleet] Add the uptime capability to observability projects (#176285) [Security Solution][Endpoint] Fix Manifest Manger so that it works with large (>10k) (#174411) [ResponseOps] Alert creation delay based on user definition (#175851) [data views] Default field formatters based on field meta values (#174973) [Cloud Security]Detection Rules counter on Rules Flyout (#176041) [Security Solution] Data Quality Dashboard persistence (#175673) [Ent Search] Connector client copy cleanup (#176290) [ML] Anomaly Detection: Adds actions menu to anomaly markers in Single Metric Viewer chart. (#175556) [ML] Anomaly Detection: Fix `values-dots` colors (#176303) [Fleet] Logstash Output - being compliant to RFC-952 (#176298) ...
…ic#175898) ## Summary Follow up of [first CDN PR](elastic#169408). Primary focus is replacing our build nr with SHA that allows cache busting and maintains anti-collision properties. ## How to test Start Kibana as usual navigating around the app with the network tab open in your browser of choice. Keep an eye out for any asset loading errors. It's tricky to test every possible asset since there are many permutations, but generally navigating around Kibana should work exactly as it did before regarding loading bundles and assets. ## Notes * did a high-level audit of usages of `buildNum` in `packages`, `src` and `x-pack` adding comments where appropriate. * In non-distributable builds (like dev) static asset paths will be prefixed with `XXXXXXXXXXXX` instead of Node's `Number.MAX_SAFE_INTEGER` * Added some validation to ensure the CDN url is of the expected form: nothing trailing the pathname ### Checklist Delete any items that are not applicable to this PR. - [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 ### Risk Matrix | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | We break some first or third party dependencies on existing asset routes | Med | High | Attempting to mitgate by serving static assets from both old and new paths where paths have updated to include the build SHA. Additioanlly: it is very bad practice to rely on the values of the static paths, but someone might be | | Cache-busting is more aggressive | High | Low | Unlikely to be a big problem, but we are not scoping more static assets to a SHA and so every new Kibana release will require clients to, for example, download fonts again. | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
#175898 updates routes to cache bust using the build checksum instead of build number. This updates the directory structure of the CDN assets archive accordingly. ``` kibana-8.13.0-SNAPSHOT-cdn-assets └── e96cc06 ├── bundles │ ├── core │ ├── kbn-monaco │ ├── kbn-ui-shared-deps-npm │ ├── kbn-ui-shared-deps-src │ └── plugin └── ui ├── favicons ├── fonts ├── legacy_dark_theme.css ├── legacy_dark_theme.min.css ├── legacy_light_theme.css └── legacy_light_theme.min.css 11 directories, 4 files ```
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…ic#175898) ## Summary Follow up of [first CDN PR](elastic#169408). Primary focus is replacing our build nr with SHA that allows cache busting and maintains anti-collision properties. ## How to test Start Kibana as usual navigating around the app with the network tab open in your browser of choice. Keep an eye out for any asset loading errors. It's tricky to test every possible asset since there are many permutations, but generally navigating around Kibana should work exactly as it did before regarding loading bundles and assets. ## Notes * did a high-level audit of usages of `buildNum` in `packages`, `src` and `x-pack` adding comments where appropriate. * In non-distributable builds (like dev) static asset paths will be prefixed with `XXXXXXXXXXXX` instead of Node's `Number.MAX_SAFE_INTEGER` * Added some validation to ensure the CDN url is of the expected form: nothing trailing the pathname ### Checklist Delete any items that are not applicable to this PR. - [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 ### Risk Matrix | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | We break some first or third party dependencies on existing asset routes | Med | High | Attempting to mitgate by serving static assets from both old and new paths where paths have updated to include the build SHA. Additioanlly: it is very bad practice to rely on the values of the static paths, but someone might be | | Cache-busting is more aggressive | High | Low | Unlikely to be a big problem, but we are not scoping more static assets to a SHA and so every new Kibana release will require clients to, for example, download fonts again. | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…#176186) elastic#175898 updates routes to cache bust using the build checksum instead of build number. This updates the directory structure of the CDN assets archive accordingly. ``` kibana-8.13.0-SNAPSHOT-cdn-assets └── e96cc06 ├── bundles │ ├── core │ ├── kbn-monaco │ ├── kbn-ui-shared-deps-npm │ ├── kbn-ui-shared-deps-src │ └── plugin └── ui ├── favicons ├── fonts ├── legacy_dark_theme.css ├── legacy_dark_theme.min.css ├── legacy_light_theme.css └── legacy_light_theme.min.css 11 directories, 4 files ```
…ic#175898) ## Summary Follow up of [first CDN PR](elastic#169408). Primary focus is replacing our build nr with SHA that allows cache busting and maintains anti-collision properties. ## How to test Start Kibana as usual navigating around the app with the network tab open in your browser of choice. Keep an eye out for any asset loading errors. It's tricky to test every possible asset since there are many permutations, but generally navigating around Kibana should work exactly as it did before regarding loading bundles and assets. ## Notes * did a high-level audit of usages of `buildNum` in `packages`, `src` and `x-pack` adding comments where appropriate. * In non-distributable builds (like dev) static asset paths will be prefixed with `XXXXXXXXXXXX` instead of Node's `Number.MAX_SAFE_INTEGER` * Added some validation to ensure the CDN url is of the expected form: nothing trailing the pathname ### Checklist Delete any items that are not applicable to this PR. - [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 ### Risk Matrix | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | We break some first or third party dependencies on existing asset routes | Med | High | Attempting to mitgate by serving static assets from both old and new paths where paths have updated to include the build SHA. Additioanlly: it is very bad practice to rely on the values of the static paths, but someone might be | | Cache-busting is more aggressive | High | Low | Unlikely to be a big problem, but we are not scoping more static assets to a SHA and so every new Kibana release will require clients to, for example, download fonts again. | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…#176186) elastic#175898 updates routes to cache bust using the build checksum instead of build number. This updates the directory structure of the CDN assets archive accordingly. ``` kibana-8.13.0-SNAPSHOT-cdn-assets └── e96cc06 ├── bundles │ ├── core │ ├── kbn-monaco │ ├── kbn-ui-shared-deps-npm │ ├── kbn-ui-shared-deps-src │ └── plugin └── ui ├── favicons ├── fonts ├── legacy_dark_theme.css ├── legacy_dark_theme.min.css ├── legacy_light_theme.css └── legacy_light_theme.min.css 11 directories, 4 files ```
Summary
Follow up of first CDN PR. Primary focus is replacing our build nr with SHA that allows cache busting and maintains anti-collision properties.
How to test
Start Kibana as usual navigating around the app with the network tab open in your browser of choice. Keep an eye out for any asset loading errors. It's tricky to test every possible asset since there are many permutations, but generally navigating around Kibana should work exactly as it did before regarding loading bundles and assets.
Notes
buildNuminpackages,srcandx-packadding comments where appropriate.XXXXXXXXXXXXinstead of Node'sNumber.MAX_SAFE_INTEGERChecklist
Delete any items that are not applicable to this PR.
Risk Matrix
For maintainers