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 agent/package config(s) to agent/package policy(ies) #74914

Merged
merged 30 commits into from
Aug 19, 2020

Conversation

jen-huang
Copy link
Contributor

@jen-huang jen-huang commented Aug 12, 2020

Summary

Relates to #74842. This PR renames agent/package config(s) to agent/package policy(ies) everywhere in Ingest Manager plugin code:

  • UI copy
  • SO attribute names
  • File names
  • Client and API routes
  • Types, schemas, component, method, variable names
  • Comments, dev docs, test fixtures

Partial changes were also made in Endpoint (security_solution plugin) code where references to Ingest Manager routes, types, and methods exist, as well as patching test suites as needed. But I did not audit or change Endpoint file names or UI copy. I am hoping someone from the Endpoint team can pick any remaining changes.

Testing

Everything should just work as prior to this PR, with no UI changes except for copy.

To support renaming of Ingest Manager SO attributes, SO migrations were added to ensure that the user does not encounter any mapping errors going from 7.9 to the next release. Please test this PR with Ingest Manager data (various integrations installed, multiple configs, agents enrolled, etc) prior to this PR , stop Kibana, pull down this PR, and restart Kibana. The SO migrations should kick in and your data should be displayed in Ingest Manager the same as before.

Note: you'll probably want to wipe your data if you switch out of this PR as the migrations don't kick in the other way around!

Dev Docs

The following Ingest Manager API routes were changed:

  • /api/ingest_manager/agent_configs/* renamed to /api/fleet/agent_policies/*
  • /api/ingest_manager/package_configs/* renamed to /api/fleet/package_policies/*

All Ingest Manager routes with payload fields that were previously in reference to agent configs or package configs, have been renamed to agent policies and package policies. For example configId -> policyId, package_configs -> package_policies.

The following Ingest Manager app routes were changed:

  • /app/ingestManager#/configs renamed to /app/ingestManager#/policies

The following Ingest Manager settings were changed:

  • xpack.ingestManager.fleet.agentConfigRolloutRateLimitIntervalMs renamed to xpack.fleet.agents.agentPolicyRolloutRateLimitIntervalMs
  • xpack.fleet.agents.agentConfigRolloutRateLimitRequestPerInterval renamed to xpack.fleet.agents.agentPolicyRolloutRateLimitRequestPerInterval

@jen-huang jen-huang added the Team:Fleet Team label for Observability Data Collection Fleet team label Aug 12, 2020
@jen-huang jen-huang self-assigned this Aug 12, 2020
@jen-huang jen-huang added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v7.10.0 v8.0.0 labels Aug 17, 2020
@jen-huang jen-huang changed the title [WIP][Ingest Manager] Rename agent/package config(s) to agent/package policy(ies) [Ingest Manager] Rename agent/package config(s) to agent/package policy(ies) Aug 18, 2020
@jen-huang jen-huang marked this pull request as ready for review August 18, 2020 21:01
@jen-huang jen-huang requested a review from a team as a code owner August 18, 2020 21:01
@jen-huang jen-huang requested a review from a team August 18, 2020 21:01
@jen-huang jen-huang requested a review from a team as a code owner August 18, 2020 21:01
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@paul-tavares paul-tavares left a comment

Choose a reason for hiding this comment

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

WOW 😲
Thanks @jen-huang for the changes under Security Solution. I checked out this locally and did a light drive and looks good.

@madirey , @nnamdifrankie - just FYI. if you have a chance, just give it a glance to the Manifest manager changes as well as server other server modules.

@jfsiii jfsiii self-requested a review August 19, 2020 19:45
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.

👀 👏
I checked this out locally and did some light creating/editing of package & agent policies. I also did some requests on the /api/*/*_policies routes and everything worked as expected

@jen-huang jen-huang merged commit ad5c0f5 into elastic:master Aug 19, 2020
@jen-huang jen-huang deleted the ingest/config-to-policy branch August 19, 2020 20:52
jen-huang added a commit to jen-huang/kibana that referenced this pull request Aug 19, 2020
…cy(ies) (elastic#74914)

* Initial pass at updating client routes, variables names, code comments, and UI copy

* Adjust server routes and param names, more var names and i18n fixes

* Fix test

* More var renaming

* Rest of server-side var renaming

* Rest of client side var renaming

* Rename agent SO attributes and add migrations

* Remove agent prefix from policy fields

* Rename agent policy SO attributes and add migrations

* Rename enrollment api key SO attributes and add migrations

* Rename package policy SO attributes and add migrations

* Rename agent event SO attributes and add migrations

* Rename subtype CONFIG to POLICY (I don't think this string is ever sent by agent, though)

* Update snapshot

* Remove unnecessary cloning in migrations

* Fix migration typos

* Update naming in tests and es archiver data

* Rename file names in /common

* Rename /server files

* Rename /public files

* Rename test file names

* Rename missed files

* Revert "Rename subtype CONFIG to POLICY (I don't think this string is ever sent by agent, though)"

This reverts commit 3c91e01.

* Add migration version to updated es archiver data to fix tests
jen-huang added a commit that referenced this pull request Aug 19, 2020
…cy(ies) (#74914) (#75495)

* Initial pass at updating client routes, variables names, code comments, and UI copy

* Adjust server routes and param names, more var names and i18n fixes

* Fix test

* More var renaming

* Rest of server-side var renaming

* Rest of client side var renaming

* Rename agent SO attributes and add migrations

* Remove agent prefix from policy fields

* Rename agent policy SO attributes and add migrations

* Rename enrollment api key SO attributes and add migrations

* Rename package policy SO attributes and add migrations

* Rename agent event SO attributes and add migrations

* Rename subtype CONFIG to POLICY (I don't think this string is ever sent by agent, though)

* Update snapshot

* Remove unnecessary cloning in migrations

* Fix migration typos

* Update naming in tests and es archiver data

* Rename file names in /common

* Rename /server files

* Rename /public files

* Rename test file names

* Rename missed files

* Revert "Rename subtype CONFIG to POLICY (I don't think this string is ever sent by agent, though)"

This reverts commit 3c91e01.

* Add migration version to updated es archiver data to fix tests
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
ingestManager 1.1MB +1.2KB 1.1MB
securitySolution 7.2MB +5.0B 7.2MB
total +1.2KB

page load bundle size

id value diff baseline
ingestManager 465.9KB -152.0B 466.0KB
securitySolution 806.8KB -6.0B 806.8KB
total -158.0B

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Fleet Team label for Observability Data Collection Fleet team v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants