[Code] migrate Code config/logging/feature service to new platform#46664
[Code] migrate Code config/logging/feature service to new platform#46664mw-ding merged 12 commits intoelastic:masterfrom mw-ding:np-migration-backend
Conversation
|
Pinging @elastic/code |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
x-pack/plugins/code/server/config.ts
Outdated
There was a problem hiding this comment.
optional: as a common convention we don't import legacy platform in the new platform, but we encourage to do the other way around. can we move some definitions to the new platform plugin and import them from legacy platform?
There was a problem hiding this comment.
added a TODO here. These paths anyway will break when moving all the plugins here. The error will enforce the update or the path.
x-pack/plugins/code/server/config.ts
Outdated
There was a problem hiding this comment.
right now it breaks you typings due to any https://github.com/elastic/kibana/pull/46664/files#diff-1b9e65e1fa500e8a7255ba665e6b1922R17
There was a problem hiding this comment.
see my previous comment regarding this issue.
x-pack/legacy/plugins/code/server/utils/server_logger_factory.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I see the problem that we have to pass LoggerFactory down the tree. Hopefully, we can improve this in #39695
mw-ding
left a comment
There was a problem hiding this comment.
@restrry another question here is how to access the shared config like path.data
x-pack/plugins/code/server/config.ts
Outdated
There was a problem hiding this comment.
added a TODO here. These paths anyway will break when moving all the plugins here. The error will enforce the update or the path.
x-pack/legacy/plugins/code/server/utils/server_logger_factory.ts
Outdated
Show resolved
Hide resolved
chatted with @joshdover offline that for the shared config item like |
💔 Build Failed |
x-pack/legacy/plugins/code/index.ts
Outdated
There was a problem hiding this comment.
I leave the enabled flag in both here and the config in the new place with default value true. However, the code app is disabled by default without puting xpack.code.enabled in the kibana.yml. Any idea on how to fix this? @restrry @joshdover
There was a problem hiding this comment.
Can we use? enabled: Joi.boolean().default(false)
There was a problem hiding this comment.
why do we want to have false by default?
There was a problem hiding this comment.
the code app is disabled by default
because it's disabled by default.
There was a problem hiding this comment.
So this is how it works now. We keep Code enabled on master and 7.x, but disabled on the release branch. Even in the release branch, we set the xpack.code.ui.enabled to false to disable, but still keep xpack.code.enabled to be true.
There was a problem hiding this comment.
We keep Code enabled on master and 7.x, but disabled on the release branch
how do you achieve that? changing default values in legacy platform config?
💔 Build Failed |
This comment has been minimized.
This comment has been minimized.
x-pack/legacy/plugins/code/index.ts
Outdated
There was a problem hiding this comment.
You might want to add a comment to revisit after #41990
The issue already has a high priority
There was a problem hiding this comment.
this comment is intended for the same purpose
There was a problem hiding this comment.
LspOptions typings are not full. there is no info about available languages and typings are broken due to https://github.com/elastic/kibana/pull/46664/files#r329619654
There was a problem hiding this comment.
This is a legacy issue for the LspOptions specifically. I will defer to @spacedragon to fix this later. In short, I think let's focus more on the major NP service migration in this PR.
This comment has been minimized.
This comment has been minimized.
💔 Build Failed |
|
cc @fantapsody @spacedragon @zfy0701 to be aware of the config service change. |
💚 Build Succeeded |
…46664) (#47253) * [Code] code backend NP migration * Move code plugin config to NP config service * Move code plugin logger to NP logger service * minor type error * remove joi config * addressing comments * fix unit tests * Migrate to xpack feature service for NP * minor comments * fix code mocha test scripts * fix type * fix i18nrc.json for code
Summary
Finish the config, logging and feature service items in https://github.com/elastic/code/issues/1596
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers