-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Allow custom new platform plugin paths in integration tests #49927
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
The issue is that third party plugins cannot reliably use relative imports with this setting, which is why we removed it from the distributions. I don't think that can change until we support/recommend root level imports instead. We'd have to play around with them in that case. If integration tests are the only driver here, why not update the setup logic to move them into the plugin directory just like any other external plugin? |
I'm not sure to see how this could work, specifically because of the relative imports you speak about: I.E: import {
PluginSetupContract,
PluginStartContract,
} from '../../../../plugins/encrypted_saved_objects/server'; If we wants to move it from So it seems root level imports are required for this to work. One other option would be to use 'rebased' imports, meaning that the files in As this is only for integration tests (and as integration tests needs to run in production mode), can't we just simply add an additional 'internal' flag to allow We could then deprecate/remove this option when we actually supports absolute imports and implements what you suggest then (using abs imports + moving test plugins during test setup) WDYT? |
For the record, after a slack discussion with @azasypkin
|
A stopgap configuration that makes it clear it is for testing (like your The best option IMO is to just do root level imports and remove this restriction entirely. The proposal for root level imports was widely favored, so now just a matter of doing it. @spalger was exploring an approach with babel, and I played briefly with a symlink approach that worked well. I don't have time to work on it at this point, and I don't know where @spalger landed on his effort, but if he's stalled as well and you wanted to tackle this plugin path problem, perhaps you could implement it? |
Relates to #40446 then, I guess. |
After a discussion with the platform team on slack:
|
We used to create custom plugins for various integration tests that expose custom endpoints (e.g. to serve as fake IdP) and whatnot. Currently it's possible to load new platform plugins from custom paths, but only when Kibana is run in dev mode. Unfortunately this doesn't help since integration tests on CI are run against "prod" Kibana.
/cc @legrego
The text was updated successfully, but these errors were encountered: