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

Remove MLs use of internal Spaces utilities #46366

Merged
merged 4 commits into from
Sep 24, 2019

Conversation

legrego
Copy link
Member

@legrego legrego commented Sep 23, 2019

Summary

While migrating the Spaces server-side plugin to the new platform, I noticed that ML is importing the private getActiveSpace utility in order to retrieve the user's active space.

This PR introduces a first-class way for plugins to retrieve this information in the legacy platform, so that I can continue with migration and cleanup of the spaces plugin.

@legrego legrego mentioned this pull request Sep 23, 2019
7 tasks
@@ -66,6 +69,41 @@ export class SpacesService {
return spaceId;
};

const getScopedClient = async (request: RequestFacade) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No functional changes; just moved from its original location below so it could be reused by getActiveSpace

@legrego legrego marked this pull request as ready for review September 23, 2019 17:51
@legrego legrego requested review from a team as code owners September 23, 2019 17:51
@legrego legrego added :ml release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.5.0 v8.0.0 labels Sep 23, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ML changes LGTM

Copy link
Contributor

@kobelb kobelb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few dangling references to lib/get_active_space, were you postponing removing those for a subsequent PR?

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>
@legrego
Copy link
Member Author

legrego commented Sep 24, 2019

There are a few dangling references to lib/get_active_space, were you postponing removing those for a subsequent PR?

Yes, this was only meant to address ML's usage. Subsequent cleanup is already taking place in #46181, but I didn't want to include ML changes in that PR.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego legrego merged commit 61d78ae into elastic:master Sep 24, 2019
@legrego legrego deleted the spaces/ml-np-prep branch September 24, 2019 18:50
legrego added a commit to legrego/kibana that referenced this pull request Sep 24, 2019
* remove MLs use of internal Spaces utilities

* move logic to SpacesService for testability

* make TS happy

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>
legrego added a commit that referenced this pull request Sep 24, 2019
* remove MLs use of internal Spaces utilities

* move logic to SpacesService for testability

* make TS happy

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:NP Migration :ml release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants