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

Cannot load workpad into non-default space #23168

Closed
kibanamachine opened this issue Sep 4, 2018 · 11 comments
Closed

Cannot load workpad into non-default space #23168

kibanamachine opened this issue Sep 4, 2018 · 11 comments
Assignees
Labels
blocker bug Fixes for quality problems that affect the customer experience loe:medium Medium Level of Effort PR sent Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v6.5.0

Comments

@kibanamachine
Copy link
Contributor

Original comment by @alexfrancoeur:

I've tried this a few times now. For some reason, you cannot upload spaces workpads into spaces that have been created. It works fine with the default space.

screen shot 2018-09-04 at 10 05 59 am

cc: @rashidkpc @w33ble

@kibanamachine
Copy link
Contributor Author

Original comment by @alexfrancoeur:

Hmm, seems to be related to as well. They load, but they won't show on the page.

screen shot 2018-09-04 at 10 23 44 am

screen shot 2018-09-04 at 10 24 33 am

@kibanamachine kibanamachine added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas bug Fixes for quality problems that affect the customer experience loe:medium Medium Level of Effort labels Sep 14, 2018
@w33ble w33ble added the v6.5.0 label Sep 14, 2018
@alexfrancoeur
Copy link

@w33ble @rashidkpc spaces was just merged into master, we should be able to test this more easily now

@legrego
Copy link
Member

legrego commented Oct 8, 2018

I'm starting to look at this, FWIW

@alexfrancoeur
Copy link

alexfrancoeur commented Oct 8, 2018 via email

@legrego
Copy link
Member

legrego commented Oct 9, 2018

So, it appears the root cause lies here.

We are deriving the socket endpoint based on chrome.getBasePath(). This returns the space-aware base path, rather than just the server.basePath path. Since socket.io is listening for a specific endpoint /socket.io, it won't be able to resolve paths like /s/marketing/socket.io.

Testing locally, I'm able to get canvas to work in a non-default space when I use just the server's base path to construct the socket URL, so I think this is the correct approach.

My problem is that I'm not sure of the best way to do this. Canvas exposes the server's base path via an exported UI app variable, but since the socket is initialized whenever the file is imported, that variable isn't available. We could add something to chrome to provide this, but that leaks the base path abstraction that spaces provides

@alexfrancoeur
Copy link

Nice, thanks Larry! @rashidkpc @w33ble any idea how we can best proceed here?

@w33ble
Copy link
Contributor

w33ble commented Oct 15, 2018

Talked with @kobelb about this today. I proposed adding a chrome.getSocketPath() method, so we could attach the socket to one path that didn't change based on spaces. I'm assuming based on what I've heard from other people that we want a single socket server for Kibana that all apps will use, so any other app could use that method as well. It'll require upstream changes, obviously.

@sophiec20
Copy link
Contributor

sophiec20 commented Oct 16, 2018

For extra info, I am seeing this and not using spaces.

  • deployed locally from tar.gz
  • spaces not configured / enabled
  • trial license
  • security enabled (elasticsearch.username and password)
  • 6.5.0 { "build": { "hash": "566aaba", "date": "2018-10-15T13:05:56.081633Z" },

Discover tab is open and just sitting there. The error count in Console is rising. Approx 300 errors in 10 mins (ish).

image

@w33ble w33ble self-assigned this Oct 16, 2018
@stacey-gammon
Copy link
Contributor

Also noted here: #24087

Though I'm not sure if this is the same issue because Sophie's account, and the link above, are not related to using spaces?

@w33ble
Copy link
Contributor

w33ble commented Oct 17, 2018

@sophiec20 You see the errors because the socket is always opened, even when you're not in Canvas. There's an issue for avoiding starting Canvas things until the user loads Canvas: #23379

Closing this issue will make the errors go away though.

Also, just as a follow up here, the error shows up because the socket server is listening on the basepath, but now that spaces hijacks that value, the client tries to connect to the basepath + space, hence the 404. If you hard-code the basepath on the client, everything works correctly with spaces.

screenshot 2018-10-17 10 50 56

So, as mentioned earlier, having a new method for the client to resolve the socket path (ie. uiChrome.getSocketPath()) would fix this.

@w33ble w33ble removed their assignment Oct 17, 2018
@sophiec20
Copy link
Contributor

Thanks @w33ble - I'll follow that ticket instead and leave you to your spaces.

@w33ble w33ble assigned w33ble and unassigned legrego Oct 22, 2018
@w33ble w33ble added the PR sent label Oct 22, 2018
Canvas (6.6 @ 12/18, 6.7 @ 01/29) automation moved this from Up Next to Done Oct 23, 2018
w33ble added a commit that referenced this issue Oct 23, 2018
Closes #23168

This PR uses the `basePath` constant from Angular to mount the client socket instance, allowing it to connect correctly even in when using a Space.

### Workpad correctly loading in a Space
![screenshot 2018-10-22 15 57 00](https://user-images.githubusercontent.com/404731/47324055-251a3f80-d613-11e8-9fb0-0b0eaa3b974d.png)

### List of workpads restricted to a space
![screenshot 2018-10-22 13 49 54](https://user-images.githubusercontent.com/404731/47319741-50496280-d604-11e8-8966-83ef3a9fb320.png)

### List of workpads restricted to default space
![screenshot 2018-10-22 13 50 37](https://user-images.githubusercontent.com/404731/47319747-593a3400-d604-11e8-960d-385c80c7638a.png)
w33ble added a commit that referenced this issue Oct 23, 2018
Closes #23168

This PR uses the `basePath` constant from Angular to mount the client socket instance, allowing it to connect correctly even in when using a Space.

### Workpad correctly loading in a Space
![screenshot 2018-10-22 15 57 00](https://user-images.githubusercontent.com/404731/47324055-251a3f80-d613-11e8-9fb0-0b0eaa3b974d.png)

### List of workpads restricted to a space
![screenshot 2018-10-22 13 49 54](https://user-images.githubusercontent.com/404731/47319741-50496280-d604-11e8-8966-83ef3a9fb320.png)

### List of workpads restricted to default space
![screenshot 2018-10-22 13 50 37](https://user-images.githubusercontent.com/404731/47319747-593a3400-d604-11e8-960d-385c80c7638a.png)
XavierM added a commit that referenced this issue Oct 24, 2018
* fixing other bucket filters (#24217)

* fixing other bucket filters

* adding selenium tests

* using lodash flatten

* using lodash flatten

* fixing based on tims review

* Fix functional tests

* [ML] Fixes font size of headings in anomalies table expanded row (#24390)

* Use metric indices when displaying metrics in the waffle map (#24251)

* Add drilldown to waffle map groupings (#24301)

* Resolve known APIs (#24398)

* Fix: Use basepath from state for socket path (#24369)

Closes #23168

This PR uses the `basePath` constant from Angular to mount the client socket instance, allowing it to connect correctly even in when using a Space.

### Workpad correctly loading in a Space
![screenshot 2018-10-22 15 57 00](https://user-images.githubusercontent.com/404731/47324055-251a3f80-d613-11e8-9fb0-0b0eaa3b974d.png)

### List of workpads restricted to a space
![screenshot 2018-10-22 13 49 54](https://user-images.githubusercontent.com/404731/47319741-50496280-d604-11e8-8966-83ef3a9fb320.png)

### List of workpads restricted to default space
![screenshot 2018-10-22 13 50 37](https://user-images.githubusercontent.com/404731/47319747-593a3400-d604-11e8-960d-385c80c7638a.png)

* [ML] Fixes check for lower memory limit. (#24323)

- Fixes the job validation for the lower bound of the model memory limit. Previously the check was against zero, now it's again less than 1MB, which is the same as the backend expects.
- If the user entered model memory limit is less than half the value of the estimated model memory limit, a warning type message gets triggered. If the user entered model memory limit is more than half the value but less then the actual value of the estimated model memory limit, then the already existing info type message is shown. The unit tests have been updated to reflect that behavior.

* Euify and Reactify Query Bar Component (#23704)

Implements query bar portion of https://elastic.github.io/eui/#/layout/header. Filter bar will come in another PR.

Fixes #14086

Re-implements our query bar component in React using some EUI components. Existing typeahead and suggestion styles were copied over 1:1 for now after talking with Dave about it. In this PR I focused on reaching feature parity with the existing query bar. Some additional work would be needed before we could move this into EUI as a generic component that could be consumed by other plugins.

Still needs some new tests and I suspect some old tests will need to be updated, but other than that this PR is functionally complete and ready for reviews.

* Add latency to index and node Elasticsearch stats (#22625)

Closes #22503

* [Infra UI] Adding time ranges to detail links (#24237)

* [Infra UI] Adding time ranges to detail links

- Adds timeranges to hosts, containers, and pods links
- Fixes #24228 - Typos and what not prevented urls from working

* remove argument hard coded formatting

* Cleaning up query arg generation

* Adding missing file

* removing rison hard coded string

* Make sure Vega tooltip isn't cut off (#24409)

Make sure the vega options dropdown menu is visible

* refactor infra folder to an ingest folder who allow multiple products under it

* fix lint error

* remove my temp folder

* fix link for icon

* rename xpack.infra or xpack/infra to xpack.ingest or xpack/ingest

* update to ingest

* no more infra

* change graphql endpoint

* fix test path

* fix path for xpack infra test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience loe:medium Medium Level of Effort PR sent Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v6.5.0
Projects
No open projects
Development

No branches or pull requests

6 participants