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

Explicit namespaces for esFilters #57177

Merged
merged 15 commits into from
Feb 12, 2020

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Feb 10, 2020

Summary

Part of #56881

This PR applies the proposed resolution for #52374, trying to balance code readability, API discoverability, DX and documentation generation using ApiExtractor on the filters helper namespace

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lizozom lizozom added the release_note:skip Skip the PR/issue when compiling release notes label Feb 11, 2020
@lizozom
Copy link
Contributor Author

lizozom commented Feb 11, 2020

@elasticmachine merge upstream

@lizozom lizozom marked this pull request as ready for review February 11, 2020 16:11
@lizozom lizozom requested a review from a team February 11, 2020 16:11
@lizozom lizozom requested review from a team as code owners February 11, 2020 16:11
Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Kibana app changes LGTM

@@ -58,7 +57,7 @@ export const buildQueryBarDescription = ({
<EuiFlexItem grow={false} key={`${field}-filter-${index}`}>
<EuiBadgeWrap color="hollow">
{indexPatterns != null ? (
<FilterLabel
<esFilters.FilterLabel
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@XavierM XavierM Feb 12, 2020

Choose a reason for hiding this comment

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

I appreciate that!!!! That's great

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

maps changes LGTM

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

Left a few minor comments below. Overall, LGTM. Pulled down and tested in Chrome and things looked good.


export function getFilter(
store: esFilters.FilterStateStore,
store: any, // I don't want to export only for this, as it should move to data plugin
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to make a follow-up PR or issue for this so we don't forget?

Copy link
Contributor Author

@lizozom lizozom Feb 12, 2020

Choose a reason for hiding this comment

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

Specifically, this piece of code should actually go away as soon as state management migration is done.
But I created an issue for other follow ups needed.

#57434

Comment on lines +242 to +247
createSavedQueryService,
syncAppFilters,
syncQuery,
getTime,
getQueryLog,
getQueryStateContainer,
Copy link
Member

Choose a reason for hiding this comment

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

Should these be put under a namespace of some sort?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will get there! :)

@@ -20,8 +20,36 @@
import { PluginInitializerContext } from '../../../core/server';
import { DataServerPlugin, DataPluginSetup, DataPluginStart } from './plugin';

import {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to export a separate namespace for both public/server or can we create the namespace inside the common folder and just re-export here and in public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do need separate namespaces for public \ server as they have really different needs @lukeelmers

@@ -1,95 +0,0 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand why these SIEM files were deleted... could you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They duplicated files from our repo, requiring some really internal types that shouldn't be exported.
I instead exported FilterLabel and used that.

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

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

Canvas changes look good

@lizozom lizozom mentioned this pull request Feb 12, 2020
8 tasks
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@lizozom
Copy link
Contributor Author

lizozom commented Feb 12, 2020

Forcing merge because I copied the fix from #57421 and now it requires an additional review from ML.

@lizozom lizozom merged commit b8c5b24 into elastic:master Feb 12, 2020
lizozom pushed a commit to lizozom/kibana that referenced this pull request Feb 12, 2020
* Explicit namespaces for esQuery and esQuery

* Remove unnecessary file from siem

* remove jsonvalue definition from siem

* esFilters refactor O_O

* Delete IFilterType

* import fixes

* Fix merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lizozom pushed a commit that referenced this pull request Feb 12, 2020
* Explicit namespaces for esQuery and esQuery

* Remove unnecessary file from siem

* remove jsonvalue definition from siem

* esFilters refactor O_O

* Delete IFilterType

* import fixes

* Fix merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

Looked at the server side and it is LGTM for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants