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

Move streams utils to the core #76397

Merged
merged 13 commits into from
Sep 3, 2020
Merged

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Sep 1, 2020

Summary

  • Move steams from the legacy platform under src/core/server/utils folder
  • TS-ify streams code

@mshustov mshustov added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Sep 1, 2020
createSplitStream,
createMapStream,
createReplaceStream,
} from '../../../../src/legacy/utils';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Packages cannot have deps on core, it breaks incapsulation and TS build. @spalger what is the best approach to remove the dependency? We might move streams out of the core. Maybe in an existing or a dedicated package. I thought kbn-dev-utils is a good candidate, but turned out it's not: For running integration tests in Kibana.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have every intention of removing the reliance on node streams in the es archiver, but not today. For now I'll just decouple the package from the src directory by copying the stream source into the package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So for now I keep it as is. Do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

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

@mshustov mshustov marked this pull request as ready for review September 2, 2020 15:11
@mshustov mshustov requested review from a team as code owners September 2, 2020 15:11
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

Copy link
Contributor

@jportner jportner left a comment

Choose a reason for hiding this comment

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

Code review only -- Spaces changes to x-pack/plugins/spaces/server/routes/api/__fixtures__/create_copy_to_space_mocks.ts LGTM 👍

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, removed shared streaming utils with es-archiver

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@mshustov mshustov merged commit cd86b81 into elastic:master Sep 3, 2020
@mshustov mshustov deleted the core-utils-steams branch September 3, 2020 08:57
mshustov added a commit to mshustov/kibana that referenced this pull request Sep 3, 2020
* move utils/streams to the KP

* allow imports from src/core/server/utils

* ts-ify

* import streams from KP

* remove unnecessary ts-expect-error

* fix kbn-es-archiver build

* lost export

* copy array in createListStream

* remove streams from legacy utils

Co-authored-by: spalger <[email protected]>
mshustov added a commit that referenced this pull request Sep 3, 2020
* move utils/streams to the KP

* allow imports from src/core/server/utils

* ts-ify

* import streams from KP

* remove unnecessary ts-expect-error

* fix kbn-es-archiver build

* lost export

* copy array in createListStream

* remove streams from legacy utils

Co-authored-by: spalger <[email protected]>

Co-authored-by: spalger <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 3, 2020
…nes/processors-forms-k-s

* 'master' of github.com:elastic/kibana: (216 commits)
  [Ingest Manager] Split Registry errors into Connection & Response (elastic#76558)
  [Security Solution] add an excess validation instead of the exact match (elastic#76472)
  Introduce TS incremental builds & move src/test_utils to TS project  (elastic#76082)
  fix bad merge (elastic#76629)
  [Newsfeed] Ensure the version format when calling the API (elastic#76381)
  remove server_extensions mixin (elastic#76606)
  Remove legacy applications and legacy mode (elastic#75987)
  [Discover] Fix sidebar element focus behavior when adding / removing columns (elastic#75749)
  Replace FetchOptions with ISearchOptions (elastic#76538)
  Move streams utils to the core  (elastic#76397)
  [Ingest Manager] Wording & linking improvements (elastic#76284)
  remove legacy kibana plugin (elastic#76064)
  [Form lib] Fix regression on field not being validated after reset to its default value. (elastic#76379)
  Legacy SO import: Fix bug causing multiple overrides to only show the last confirm modal (elastic#76482)
  [APM] Service maps layout enhancements (elastic#76481)
  [Security Solution][Detection Engine] Remove RuleTypeSchema in favor of Type for TypeScript (elastic#76586)
  [Security Solution][Exceptions] - Updates enum schema and tests (elastic#76544)
  Index Pattern class - remove toJSON and toString (elastic#76246)
  skip failing suite (elastic#76581)
  Split up and clarify Enterprise Search codeowners (elastic#76580)
  ...

# Conflicts:
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/manage_processor_form/processor_settings_fields.tsx
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/manage_processor_form/processors/foreach.tsx
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 3, 2020
…oleysens/kibana into ingest-pipelines/processors-forms-k-s

* 'ingest-pipelines/processors-forms-k-s' of github.com:jloleysens/kibana: (216 commits)
  [Ingest Manager] Split Registry errors into Connection & Response (elastic#76558)
  [Security Solution] add an excess validation instead of the exact match (elastic#76472)
  Introduce TS incremental builds & move src/test_utils to TS project  (elastic#76082)
  fix bad merge (elastic#76629)
  [Newsfeed] Ensure the version format when calling the API (elastic#76381)
  remove server_extensions mixin (elastic#76606)
  Remove legacy applications and legacy mode (elastic#75987)
  [Discover] Fix sidebar element focus behavior when adding / removing columns (elastic#75749)
  Replace FetchOptions with ISearchOptions (elastic#76538)
  Move streams utils to the core  (elastic#76397)
  [Ingest Manager] Wording & linking improvements (elastic#76284)
  remove legacy kibana plugin (elastic#76064)
  [Form lib] Fix regression on field not being validated after reset to its default value. (elastic#76379)
  Legacy SO import: Fix bug causing multiple overrides to only show the last confirm modal (elastic#76482)
  [APM] Service maps layout enhancements (elastic#76481)
  [Security Solution][Detection Engine] Remove RuleTypeSchema in favor of Type for TypeScript (elastic#76586)
  [Security Solution][Exceptions] - Updates enum schema and tests (elastic#76544)
  Index Pattern class - remove toJSON and toString (elastic#76246)
  skip failing suite (elastic#76581)
  Split up and clarify Enterprise Search codeowners (elastic#76580)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported chore 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.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants