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

Remove /src/legacy #95510

Merged
merged 40 commits into from
Apr 6, 2021
Merged

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Mar 26, 2021

Summary

Part of #94141
closes #81483

Get rid of /src/legacy

  • Move the legacy logging registration to core's legacy service
  • Move the remaining '/{path*}' route to core's app service
  • Add the legacy logging schema to core's logging config
  • Remove last utils from src/core/server/utils (fromRoot and pkg), replaced by using @kbn/utils instead
  • Adapt and fix stuff

Checklist

Release Note

  • The plugins.scanDirs configuration property has been deprecated and is no longer used.
  • The server.maxPayloadBytes configuration property has been renamed server.maxPayload

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@pgayvallet pgayvallet added Feature:Legacy Removal Issues related to removing legacy Kibana release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.13.0 labels Mar 30, 2021
@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@mshustov
Copy link
Contributor

ack: will review tomorrow

packages/kbn-utils/src/package_json/index.ts Outdated Show resolved Hide resolved

this.log.debug('starting legacy service');
await setupLogging(server, legacyLoggingConfig, currentOpsConfig.interval.asMilliseconds());
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: ops config is not used


It's up to you whether remove it not or in v8.0

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's still possible to use the legacy ops metrics by manually specifying logging.events.ops: "*", so I think we need to keep it until 8.0

settings,
legacyConfig,
});
export async function ensureValidConfiguration(configService: ConfigService) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we convert it into a method of ConfigService? It's odd that server imports it from /config and passes ConfigService as an argument.

Comment on lines 24 to 25
describe('doc missing', docMissingSuite(savedObjectIndex));
describe('doc missing and index readonly', docMissingAndIndexReadOnlySuite(savedObjectIndex));
describe('doc exists', docExistsSuite(savedObjectIndex));
Copy link
Contributor

Choose a reason for hiding this comment

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

If everything is covered in api-integration tests, let's remove these tests

src/core/server/utils/index.ts Show resolved Hide resolved
Comment on lines -13 to +14
export type RequestFacade = KibanaRequest | Legacy.Request;

export function spacesUtilsProvider(
getSpacesPlugin: (() => Promise<SpacesPluginStart>) | undefined,
request: RequestFacade
request: KibanaRequest
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. we can take care of others in #77997

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

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

Changes to skipped spaces tests lgtm

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

@pgayvallet pgayvallet added release_note:deprecation and removed release_note:skip Skip the PR/issue when compiling release notes labels Apr 5, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@pgayvallet pgayvallet merged commit 251bd9a into elastic:master Apr 6, 2021
pgayvallet added a commit to pgayvallet/kibana that referenced this pull request Apr 6, 2021
* starting removing stuff

* fix jest config

* disable CLI mode until other PR is merged

* fix the schema

* add deprecation for maxPayloadBytes

* fix legacy start logic

* deletes `env` from unknown args

* fix FTR test config

* some legacy service deletion

* move config validation

* remove legacy exports from entrypoint

* preserve legacy logging in core logging config

* try to fix uiSettings integration tests

* fix legacy service tests

* more type fix

* use fromRoot from @kbn/utils

* cleanup kibana.d.ts

* fix unit tests

* remove src/core/server/utils

* fix server script

* add integration test for `/{path*}` route

* add unit tests on legacy config

* adapt uiSetting IT bis

* fix tests

* update generated doc

* address some review comments

* move review comments

* fix some stuff

* fix some stuff

* fix some stuff

* fix some stuff bis

* generated doc

* add test for ensureValidConfiguration
# Conflicts:
#	.github/CODEOWNERS
#	src/cli_plugin/install/core_plugins/kibana/public/context/query_parameters/state.js
#	src/core/server/http/http_config.ts
#	x-pack/test/functional/config.js
jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 6, 2021
…-nav

* 'master' of github.com:elastic/kibana: (106 commits)
  [Lens] don't use eui variables for zindex (elastic#96117)
  Remove /src/legacy (elastic#95510)
  skip flaky suite (elastic#95899)
  [Dashboard] Fix Lens and TSVB chart tooltip positioning relative to global headers (elastic#94247)
  fixes a skipped management x-pack test (elastic#96178)
  [App Search] API logs: Add log detail flyout (elastic#96162)
  [tech-debt] Remove defunct opacity parameters from EUI shadow functions (elastic#96191)
  Add Input Controls project configuration (elastic#96238)
  [file upload] document file upload privileges and provide actionable UI when failures occur (elastic#95883)
  Revert "TS Incremental build exclude test files (elastic#95610)" (elastic#96223)
  [App Search] Added Sample Response section to Result Settings (elastic#95971)
  [Maps] Safe-erase text-field (elastic#94873)
  [RAC][Alert Triage][TGrid] Update the Alerts Table (TGrid) API to implement `renderCellValue` (elastic#96098)
  [Maps] Enable all zoom levels for all users (elastic#96093)
  Use plugin version in its publicPath (elastic#95945)
  [Enterprise Search] Expose core.chrome.setIsVisible for use in Workplace Search (elastic#95984)
  [Workplace Search] Add sub nav and fix rendering bugs in Personal dashboard (elastic#96100)
  [OBS]home page is showing incorrect value of APM throughput (tpm) (elastic#95991)
  [Observability] Exploratory View initial skeleton (elastic#94426)
  [KQL] Fixed styles of KQL textarea for the K8 theme (elastic#96190)
  ...

# Conflicts:
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts
pgayvallet added a commit that referenced this pull request Apr 6, 2021
* Remove /src/legacy (#95510)

* starting removing stuff

* fix jest config

* disable CLI mode until other PR is merged

* fix the schema

* add deprecation for maxPayloadBytes

* fix legacy start logic

* deletes `env` from unknown args

* fix FTR test config

* some legacy service deletion

* move config validation

* remove legacy exports from entrypoint

* preserve legacy logging in core logging config

* try to fix uiSettings integration tests

* fix legacy service tests

* more type fix

* use fromRoot from @kbn/utils

* cleanup kibana.d.ts

* fix unit tests

* remove src/core/server/utils

* fix server script

* add integration test for `/{path*}` route

* add unit tests on legacy config

* adapt uiSetting IT bis

* fix tests

* update generated doc

* address some review comments

* move review comments

* fix some stuff

* fix some stuff

* fix some stuff

* fix some stuff bis

* generated doc

* add test for ensureValidConfiguration
# Conflicts:
#	.github/CODEOWNERS
#	src/cli_plugin/install/core_plugins/kibana/public/context/query_parameters/state.js
#	src/core/server/http/http_config.ts
#	x-pack/test/functional/config.js

* codestyle
mistic added a commit to mistic/kibana that referenced this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Legacy Removal Issues related to removing legacy Kibana release_note:deprecation Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove legacy server config
10 participants