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] Air-gapped enviroment hitting 400 error loading fonts for layer #165974

Closed
nreese opened this issue Sep 7, 2023 · 1 comment · Fixed by #165986
Closed

[maps] Air-gapped enviroment hitting 400 error loading fonts for layer #165974

nreese opened this issue Sep 7, 2023 · 1 comment · Fixed by #165986
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Maps Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@nreese
Copy link
Contributor

nreese commented Sep 7, 2023

When EMS is not available, Maps loads fonts from Kibana server. There is an issue where the elastic-api-version header is not being added to the request. The issue is that FONTS url does not have a leading /. This results in getHttp().basePath.prepend not prepending the base path. That results in resourceType === 'Glyphs' && url.startsWith(FONTS) check failing so headers are not added to the fonts request.

Steps

  • set map.includeElasticMapsService: false in kibana.dev.yml
  • install sample data set
  • create new map with documents layer
  • Configure label styling
Screen Shot 2023-09-07 at 7 23 06 AM
@nreese nreese added bug Fixes for quality problems that affect the customer experience Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Maps labels Sep 7, 2023
@elasticmachine
Copy link
Contributor

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

@nreese nreese self-assigned this Sep 7, 2023
nreese added a commit that referenced this issue Sep 13, 2023
…layer (#165986)

Closes #165974

The root cause of the problem is calling `basePath.prepend` on a path
without a leading `/`. Maps is not consistent with path constants. Some
have leading `/` while others do not. To resolve the issue, this PR
updates all path constants to consistently have leading `/`.

PR adds functional test runner with `map.includeElasticMapsService:
false` to ensure maps is tested without EMS enabled to catch future
regressions.

### Test instructions
* set *map.includeElasticMapsService: false* in kibana.dev.yml
* install sample data set
* create new map with documents layer
* Configure label styling
* Verify layer is displayed with labels

<img width="500" alt="Screen Shot 2023-09-13 at 6 26 23 AM"
src="https://github.com/elastic/kibana/assets/373691/44d12e87-9b80-424c-9bc9-126b373bdf18">

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 13, 2023
…layer (elastic#165986)

Closes elastic#165974

The root cause of the problem is calling `basePath.prepend` on a path
without a leading `/`. Maps is not consistent with path constants. Some
have leading `/` while others do not. To resolve the issue, this PR
updates all path constants to consistently have leading `/`.

PR adds functional test runner with `map.includeElasticMapsService:
false` to ensure maps is tested without EMS enabled to catch future
regressions.

### Test instructions
* set *map.includeElasticMapsService: false* in kibana.dev.yml
* install sample data set
* create new map with documents layer
* Configure label styling
* Verify layer is displayed with labels

<img width="500" alt="Screen Shot 2023-09-13 at 6 26 23 AM"
src="https://github.com/elastic/kibana/assets/373691/44d12e87-9b80-424c-9bc9-126b373bdf18">

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 691311c)
kibanamachine referenced this issue Sep 13, 2023
…ts for layer (#165986) (#166375)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[maps] fix Air-gapped enviroment hitting 400 error loading fonts for
layer (#165986)](#165986)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-13T16:06:05Z","message":"[maps]
fix Air-gapped enviroment hitting 400 error loading fonts for layer
(#165986)\n\nCloses
https://github.com/elastic/kibana/issues/165974\r\n\r\nThe root cause of
the problem is calling `basePath.prepend` on a path\r\nwithout a leading
`/`. Maps is not consistent with path constants. Some\r\nhave leading
`/` while others do not. To resolve the issue, this PR\r\nupdates all
path constants to consistently have leading `/`.\r\n\r\nPR adds
functional test runner with `map.includeElasticMapsService:\r\nfalse` to
ensure maps is tested without EMS enabled to catch
future\r\nregressions.\r\n\r\n### Test instructions\r\n* set
*map.includeElasticMapsService: false* in kibana.dev.yml\r\n* install
sample data set\r\n* create new map with documents layer\r\n* Configure
label styling\r\n* Verify layer is displayed with labels\r\n\r\n<img
width=\"500\" alt=\"Screen Shot 2023-09-13 at 6 26 23
AM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/373691/44d12e87-9b80-424c-9bc9-126b373bdf18\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"691311ce7c38cff3ca89758f1a45e31b7f292759","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","Feature:Maps","v8.11.0","v8.10.1"],"number":165986,"url":"https://github.com/elastic/kibana/pull/165986","mergeCommit":{"message":"[maps]
fix Air-gapped enviroment hitting 400 error loading fonts for layer
(#165986)\n\nCloses
https://github.com/elastic/kibana/issues/165974\r\n\r\nThe root cause of
the problem is calling `basePath.prepend` on a path\r\nwithout a leading
`/`. Maps is not consistent with path constants. Some\r\nhave leading
`/` while others do not. To resolve the issue, this PR\r\nupdates all
path constants to consistently have leading `/`.\r\n\r\nPR adds
functional test runner with `map.includeElasticMapsService:\r\nfalse` to
ensure maps is tested without EMS enabled to catch
future\r\nregressions.\r\n\r\n### Test instructions\r\n* set
*map.includeElasticMapsService: false* in kibana.dev.yml\r\n* install
sample data set\r\n* create new map with documents layer\r\n* Configure
label styling\r\n* Verify layer is displayed with labels\r\n\r\n<img
width=\"500\" alt=\"Screen Shot 2023-09-13 at 6 26 23
AM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/373691/44d12e87-9b80-424c-9bc9-126b373bdf18\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"691311ce7c38cff3ca89758f1a45e31b7f292759"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165986","number":165986,"mergeCommit":{"message":"[maps]
fix Air-gapped enviroment hitting 400 error loading fonts for layer
(#165986)\n\nCloses
https://github.com/elastic/kibana/issues/165974\r\n\r\nThe root cause of
the problem is calling `basePath.prepend` on a path\r\nwithout a leading
`/`. Maps is not consistent with path constants. Some\r\nhave leading
`/` while others do not. To resolve the issue, this PR\r\nupdates all
path constants to consistently have leading `/`.\r\n\r\nPR adds
functional test runner with `map.includeElasticMapsService:\r\nfalse` to
ensure maps is tested without EMS enabled to catch
future\r\nregressions.\r\n\r\n### Test instructions\r\n* set
*map.includeElasticMapsService: false* in kibana.dev.yml\r\n* install
sample data set\r\n* create new map with documents layer\r\n* Configure
label styling\r\n* Verify layer is displayed with labels\r\n\r\n<img
width=\"500\" alt=\"Screen Shot 2023-09-13 at 6 26 23
AM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/373691/44d12e87-9b80-424c-9bc9-126b373bdf18\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"691311ce7c38cff3ca89758f1a45e31b7f292759"}},{"branch":"8.10","label":"v8.10.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Nathan Reese <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Maps Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants