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

[Resolver] restore function to the resolverTest plugin. #75799

Merged
merged 7 commits into from
Aug 25, 2020

Conversation

oatkiller
Copy link
Contributor

@oatkiller oatkiller commented Aug 24, 2020

Summary

Restore the resolverTest plugin. This will allow us to run the test plugin and try out Resolver using our mock data access layers. Eventually this could be expanded to support multiple different data access layers. It could even be expanded to allow us to control the data access layer via the browser. Another option: we could export the APIs from the server and use those in this test plugin.

We eventually expect other plugins to use Resolver. This test plugin could allow us to test Resolver via the FTR (separately of the Security Solution.)

This would also be useful for writing tests than use the FTR but which are essentially unit tests. For example: taking screenshots, using the mouse to zoom/pan.

Start using: yarn start --plugin-path x-pack/test/plugin_functional/plugins/resolver_test/

Screenshot (from commit d6c62b2)
image

@oatkiller oatkiller requested review from a team as code owners August 24, 2020 17:37
@oatkiller oatkiller added Feature:Resolver Security Solution Resolver feature release_note:skip Skip the PR/issue when compiling release notes Team:Endpoint Data Visibility Team managing the endpoint resolver v7.10.0 labels Aug 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-data-visibility-team (Team:Endpoint Data Visibility)

@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-app-team (Feature:Resolver)

@oatkiller oatkiller force-pushed the resolver-test-plugin-3 branch from fa81aae to 0ca65b3 Compare August 24, 2020 20:13
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
securitySolution 1922 +4 1918

async chunks size

id value diff baseline
securitySolution 9.5MB ⚠️ +2.3MB 7.2MB

page load bundle size

id value diff baseline
securitySolution 807.4KB +744.0B 806.7KB

History

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

},
} = resolverPluginSetup;
const dataAccessLayer: DataAccessLayer = useMemo(
() => noAncestorsTwoChildren().dataAccessLayer,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, how would you see us expanding this to support multiple dataAccessLayers. Some kind of flag or config?

Copy link
Contributor

Choose a reason for hiding this comment

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

great question +1

@@ -319,7 +319,12 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
},
});

return {};
return {
resolver: async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

<3 that's awesome to see!!! <3

Provider,
storeFactory: resolverStoreFactory,
ResolverWithoutProviders,
mocks: {
Copy link
Contributor

Choose a reason for hiding this comment

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

that's an interesting way of mocking the data, would like to know more about your technique here

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

This is really nice to see the resolver working as its own plugin through the security solution app.

@oatkiller oatkiller merged commit e9446b2 into elastic:master Aug 25, 2020
@oatkiller oatkiller deleted the resolver-test-plugin-3 branch August 25, 2020 17:35
oatkiller pushed a commit to oatkiller/kibana that referenced this pull request Aug 25, 2020
Restore the resolverTest plugin. This will allow us to run the test plugin and try out Resolver using our mock data access layers. Eventually this could be expanded to support multiple different data access layers. It could even be expanded to allow us to control the data access layer via the browser. Another option: we could export the APIs from the server and use those in this test plugin.

We eventually expect other plugins to use Resolver. This test plugin could allow us to test Resolver via the FTR (separately of the Security Solution.)

This would also be useful for writing tests than use the FTR but which are essentially unit tests. For example: taking screenshots, using the mouse to zoom/pan.

Start using: `yarn start --plugin-path x-pack/test/plugin_functional/plugins/resolver_test/`
oatkiller pushed a commit that referenced this pull request Aug 25, 2020
)

Restore the resolverTest plugin. This will allow us to run the test plugin and try out Resolver using our mock data access layers. Eventually this could be expanded to support multiple different data access layers. It could even be expanded to allow us to control the data access layer via the browser. Another option: we could export the APIs from the server and use those in this test plugin.

We eventually expect other plugins to use Resolver. This test plugin could allow us to test Resolver via the FTR (separately of the Security Solution.)

This would also be useful for writing tests than use the FTR but which are essentially unit tests. For example: taking screenshots, using the mouse to zoom/pan.

Start using: `yarn start --plugin-path x-pack/test/plugin_functional/plugins/resolver_test/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Resolver Security Solution Resolver feature release_note:skip Skip the PR/issue when compiling release notes Team:Endpoint Data Visibility Team managing the endpoint resolver v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants