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

Add some types for interpter plugin registration #31600

Merged

Conversation

stacey-gammon
Copy link
Contributor

@stacey-gammon stacey-gammon commented Feb 20, 2019

Some typings for top level legacy plugin registration, and use-age in interpreter plugin.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon force-pushed the 2019-02-20-legacy-server-type branch from 643c81b to 958530d Compare February 20, 2019 19:34
@stacey-gammon stacey-gammon requested a review from a team as a code owner February 20, 2019 19:34
@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon force-pushed the 2019-02-20-legacy-server-type branch from 958530d to d757b85 Compare February 20, 2019 19:55
@elasticmachine
Copy link
Contributor

💔 Build Failed

kibana.d.ts Outdated Show resolved Hide resolved
@@ -30,7 +30,8 @@ describe('timeseriesFetcher', () => {
end: 1528977600000,
client: clientSpy,
config: {
get: () => 'myIndex' as any
get: () => 'myIndex' as any,
has: () => true
Copy link
Member

Choose a reason for hiding this comment

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

@stacey-gammon Do we need to mock this property if we never call it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears so @sqren:

screen shot 2019-02-26 at 11 34 22 am

unless I am missing something, I believe since the function expects the Config object, even if it's not used internally, because it's required on the config object, it has to exist.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon force-pushed the 2019-02-20-legacy-server-type branch from 1df28bf to 8f95cd1 Compare February 27, 2019 15:48
@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon
Copy link
Contributor Author

Failed on what looks like a ci issue:

10:49:12 [EnvInject] - Variables injected successfully.
10:49:12 [EnvInject] - Injecting contributions.
10:49:12 Building remotely on kibana-ci-immutable-ubuntu-1551282390945584592 (immutable virtual x86_64 swarm ubuntu linux ubuntu-16.04 docker) in workspace /var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/kibana-intake/node/immutable
10:49:12 [WS-CLEANUP] Deleting project workspace...
10:49:12 [WS-CLEANUP] Deferred wipeout is used...
10:49:12 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from kibana-ci-immutable-ubuntu-1551282390945584592.c.elastic-ci-prod.internal/10.224.0.46:53728
10:49:12 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
10:49:12 		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
10:49:12 		at hudson.remoting.Channel.call(Channel.java:957)
10:49:12 		at hudson.FilePath.act(FilePath.java:1068)
10:49:12 		at hudson.FilePath.act(FilePath.java:1057)
10:49:12 		at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:137)
10:49:12 		at hudson.plugins.git.GitSCM.createClient(GitSCM.java:822)
10:49:12 		at hudson.plugins.git.GitSCM.createClient(GitSCM.java:813)
10:49:12 		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1173)
10:49:12 		at hudson.scm.SCM.checkout(SCM.java:504)
10:49:12 		at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
10:49:12 		at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
10:49:12 		at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
10:49:12 		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
10:49:12 		at hudson.model.Run.execute(Run.java:1816)
10:49:12 		at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
10:49:12 		at hudson.model.ResourceController.execute(ResourceController.java:97)
10:49:12 		at hudson.model.Executor.run(Executor.java:429)
10:49:12 java.lang.NoClassDefFoundError: Could not initialize class org.jenkinsci.plugins.gitclient.GitClient
10:49:12 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.<init>(CliGitAPIImpl.java:271)
10:49:12 	at hudson.plugins.git.GitAPI.<init>(GitAPI.java:77)
10:49:12 	at org.jenkinsci.plugins.gitclient.Git$1.invoke(Git.java:134)
10:49:12 	at org.jenkinsci.plugins.gitclient.Git$1.invoke(Git.java:120)
10:49:12 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3041)
10:49:12 	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
10:49:12 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
10:49:12 	at hudson.remoting.Request$2.run(Request.java:369)

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Feb 27, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@stacey-gammon stacey-gammon requested a review from lukeelmers March 4, 2019 22:05
@stacey-gammon stacey-gammon force-pushed the 2019-02-20-legacy-server-type branch from f4772d3 to 9b5ef32 Compare March 4, 2019 22:05
@stacey-gammon
Copy link
Contributor Author

@joshdover - any more comments or is this good to merge?

@stacey-gammon stacey-gammon removed the request for review from lukeelmers March 4, 2019 22:06
@elasticmachine
Copy link
Contributor

💔 Build Failed

kibana.d.ts Outdated
export type InitPluginFunction = (server: Server) => void;
export interface UiExports {
injectDefaultVars: (server: Server) => { [key: string]: any };
}
Copy link
Member

Choose a reason for hiding this comment

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

Can InitPluginFunction and UiExports be re-exported from LegacyKibanaPluginSpec, since they're already included once there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes that makes much more sense.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@stacey-gammon stacey-gammon merged commit 3155533 into elastic:master Mar 5, 2019
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Mar 5, 2019
* Some basic types for top level legacy plugin registration

* put typescript interface closer to implementation

* Use default export, you have to

* fix build and address code review comments
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Mar 6, 2019
* Some basic types for top level legacy plugin registration

* put typescript interface closer to implementation

* Use default export, you have to

* fix build and address code review comments
stacey-gammon added a commit that referenced this pull request Mar 6, 2019
* Some basic types for top level legacy plugin registration

* put typescript interface closer to implementation

* Use default export, you have to

* fix build and address code review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants