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

[Ingest Manager] Rename data sources to package configs #70259

Merged
merged 21 commits into from
Jul 1, 2020

Conversation

jen-huang
Copy link
Contributor

@jen-huang jen-huang commented Jun 29, 2020

Summary

Resolves #70018 as part of elastic/beats#19082. This PR replaces datasource(s)/data source(s) with package config(s) everywhere in Ingest Manager and Endpoint code. This PR has no visible impact apart from small UI copy changes and routing path changes. The affected areas include:

  • Saved object type ingest-datasources -> ingest-package-config
    • Field name agent_stream -> compiled_stream
    • Removed unused processors field
  • Field datasources on agent config SO renamed to package_configs
  • Removed all 7.9 Ingest Manager SO migrations as we are not supporting an upgrade path from experimental to beta release
  • Ingest manager API routes starting with /api/ingest_manager/datasources -> /api/ingest_manager/package_configs
  • Ingest manager app routes /app/ingestManager/.../(add|edit)-datasource -> /app/ingestManager/.../(add|edit)-integration
  • Variables that use string d/Datasource(s) -> p/PackageConfig(s)
    • Types, schemas, rest spec
    • Components, services
  • File names that include datasource(s) -> package_config(s)
  • Code comments, dev docs
  • UI copy adjustments (partially resolves [Ingest Manager] Name changes tracking issue #70024)

Testing

  • Start with wiped ES data
  • Everything should function normally

Screenshots

Showing revised copy, breadcrumbs, and URL path:

image

@jen-huang jen-huang self-assigned this Jun 29, 2020
…-datasource` to `ingest-package-config`) and adjust mappings:

- Remove unused `processors` field on input & stream levels
- Remove unnecessary `enabled` field on package config & input levels
- Rename `agent_stream` field to `compiled_stream`
- Reorder other fields so that important fields are closer to top & similar fields are grouped together

Also,
- Remove 7.9.0 migrations as we are not supporting an upgrade path from experimental to beta release
…rences (does not include actual type definition changes yet)
…(does not include actual schema changes yet)
… needed for current & future UI features. Also:

- Match types and schemas with saved object mappings (`agent_stream` to `compiled_stream`, removal of `processors`)
- Set `namespace` to be a required property on agent config and package config types, add validation support for it on UI
@jen-huang jen-huang changed the title [WIP][Ingest Manager] Rename data sources to package configs [Ingest Manager] Rename data sources to package configs Jun 29, 2020
@jen-huang jen-huang added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.9.0 v8.0.0 labels Jun 29, 2020
@jen-huang jen-huang marked this pull request as ready for review June 29, 2020 23:28
@jen-huang jen-huang requested a review from a team as a code owner June 29, 2020 23:28
@jen-huang jen-huang requested a review from a team June 29, 2020 23:28
@jen-huang jen-huang requested a review from a team as a code owner June 29, 2020 23:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

// Create the system monitoring package config and add it to agent config.
if (withSysMonitoring && newSysPackageConfig !== undefined && agentConfig !== undefined) {
newSysPackageConfig.config_id = agentConfig.id;
newSysPackageConfig.namespace = agentConfig.namespace;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line fixes #68041

@jen-huang
Copy link
Contributor Author

@elastic/ingest-management @elastic/endpoint-management

Hi teams, could one person from each team help look at this PR? It's probably easiest to review by pulling down locally (with wiped ES data) and trying it out, there should be no difference in functionality. It would also be great if you can spot check some files including a few test files.

Since so many files are affected, it'd be great to get this PR reviewed & merged sooner rather than later, so that we can minimize the churn of resolving conflicts.

@kevinlog
Copy link
Contributor

kevinlog commented Jul 1, 2020

Tried it out with our Policy flows - looks good!
image

image

Copy link
Contributor

@kevinlog kevinlog left a comment

Choose a reason for hiding this comment

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

This looks good from the Endpoint Management side, pulled it down and tested it - our flows still work and the steps still makes sense

Copy link
Contributor

@jfsiii jfsiii left a comment

Choose a reason for hiding this comment

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

Checked it out locally and clicked around. I can't test installing integrations because of #70453 or without a local/older registry.

I'm fine merging this and dealing with any fallout in followup PRs

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@jen-huang jen-huang added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:skip Skip the PR/issue when compiling release notes labels Jul 1, 2020
@jen-huang jen-huang merged commit 4f7da59 into elastic:master Jul 1, 2020
@jen-huang jen-huang deleted the ingest/rename-datasources branch July 1, 2020 23:14
jen-huang added a commit that referenced this pull request Jul 2, 2020
)

* Rename `datasource` saved object to `package_config` (SO type `ingest-datasource` to `ingest-package-config`) and adjust mappings:

- Remove unused `processors` field on input & stream levels
- Remove unnecessary `enabled` field on package config & input levels
- Rename `agent_stream` field to `compiled_stream`
- Reorder other fields so that important fields are closer to top & similar fields are grouped together

Also,
- Remove 7.9.0 migrations as we are not supporting an upgrade path from experimental to beta release

* Pluralize `ingest-package-configs` for consistency

* Rename `Datasource`-related types to `PackageConfig`, update all references (does not include actual type definition changes yet)

* Rename `Datasource` schemas and rest spec typings to `PackageConfig` (does not include actual schema changes yet)

* Change `datasources` on agent config typings and schemas to `package_configs` and update all references

* Add back `enabled` field on package config and input levels. They are needed for current & future UI features. Also:

- Match types and schemas with saved object mappings (`agent_stream` to `compiled_stream`, removal of `processors`)
- Set `namespace` to be a required property on agent config and package config types, add validation support for it on UI

* Rename server-side datasource references in file names, variable names, and routes

* Update spec file and schema file

* Update doc wording

* Rename all instances of datasource in file paths and variable names on client sides, and for Endpoint too

* Minor copy adjustments, fix i18n check

* Replace datasource references in tests and fixtures; remove unused `ingest/policies` es archiver data

* Fix tests

* Fix test field name

* Fix test fixtures fields again

* Fix i18n
# Conflicts:
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 2, 2020
* master: (46 commits)
  [Visualize] Add missing advanced settings and custom label for pipeline aggs (elastic#69688)
  Use dynamic: false for config saved object mappings (elastic#70436)
  [Ingest Pipelines] Error messages (elastic#70167)
  [APM] Show transaction rate per minute on Observability Overview page (elastic#70336)
  Filter out error when calculating a label (elastic#69934)
  [Visualizations] Each visType returns its supported triggers (elastic#70177)
  [Telemetry] Report data shippers (elastic#64935)
  Reduce SavedObjects mappings for Application Usage (elastic#70475)
  [Lens] fix dimension label performance issues (elastic#69978)
  Skip failing endgame tests (elastic#70548)
  [SIEM] Reenabling Cypress tests (elastic#70397)
  [SIEM][Security Solution][Endpoint] Endpoint Artifact Manifest Management + Artifact Download and Distribution (elastic#67707)
  [Security] Adds field mapping support to rule creation (elastic#70288)
  SECURITY-ENDPOINT: add fields for events to metadata document (elastic#70491)
  Fixed assertion in hybrid index pattern test to iterate through indices (elastic#70130)
  [SIEM][Exceptions] - Exception builder component (elastic#67013)
  [Ingest Manager] Rename data sources to package configs (elastic#70259)
  skip suites blocking es snapshot promomotion (elastic#70532)
  [Metrics UI] Fix asynchronicity and error handling in Snapshot API (elastic#70503)
  fix export response (elastic#70473)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.9.0 v8.0.0
Projects
None yet
5 participants