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

[Fleet] Rename ingestManager plugin ID fleet #83200

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Nov 11, 2020

Summary

Last PR on the effort of renaming ingestManager Fleet

Rename ingestManager plugin ID fleet

This change the app path from /app/ingestManager to /app/fleet

I changed the following plugins accordingly:

  • endpoint
  • index_managment
  • observavilty

Also I renamed all the IngestManagerPlugin IngestManagerSetup, ..., to Fleet*

Release note breaking

The ingestManager plugin as been renamed fleet, this mean:

  • The app url change from /app/ingestManager to /app/fleet
  • Privileges feature_ingestManager.* is not valid anymore and should be replaced by feature_fleet.*

@nchaulet nchaulet added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Nov 11, 2020
@nchaulet nchaulet self-assigned this Nov 11, 2020
@nchaulet nchaulet force-pushed the feature-rename-ingest-manager-fleet-plugin branch 2 times, most recently from 370adc9 to fa9537c Compare November 11, 2020 19:35
@nchaulet nchaulet force-pushed the feature-rename-ingest-manager-fleet-plugin branch from fa9537c to a48b2a6 Compare November 11, 2020 20:29
@nchaulet nchaulet marked this pull request as ready for review November 12, 2020 01:57
@nchaulet nchaulet requested review from a team as code owners November 12, 2020 01:57
@nchaulet nchaulet requested a review from a team November 12, 2020 01:57
@nchaulet nchaulet requested review from a team as code owners November 12, 2020 01:57
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

ES UI code LGTM, didn't test locally.

@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team labels Nov 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

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

@@ -186,15 +180,15 @@ export class IngestManagerPlugin
if (deps.features) {
deps.features.registerKibanaFeature({
id: PLUGIN_ID,
Copy link
Member

Choose a reason for hiding this comment

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

question: @legrego IIRC changing feature ID is a breaking change (we changed the PLUGIN_ID) and we shouldn't make it in a minor upgrade, but I'm not sure what is our policy regarding features that belong to plugins that are in a beta?

Copy link
Member

Choose a reason for hiding this comment

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

Heya Fleet team:

tl;dr I think we can rename in this specific case, please take the time to read this entire comment to understand the implications.

IIRC changing feature ID is a breaking change (we changed the PLUGIN_ID) and we shouldn't make it in a minor upgrade

That's exactly right. Changing a feature id will change the associated privilege ids that are registered with Elasticsearch on startup. For example, prior to this change, a user may have been assigned a custom role which grants access to Ingest Manager. The role would look something like this:

{
  "name": "some-custom-role",
  "cluster": [],
  "index": [],
  "run_as": [],
  "applications": [
     {
       "application": "kibana-.kibana",
       "privileges": [
         "feature_ingestManager.all"
       ],
       "resources": [
         "space:default"
       ]
     }
   ]
}

The privilege that gets assigned to the role (feature_ingestManager.all) is derived in part from the feature id. Renaming your feature means that any role which previously granted access to your feature will no longer grant access, because Kibana doesn't have a feature called ingestManager anymore. The role should instead look like:

{
  "name": "some-custom-role",
  "cluster": [],
  "index": [],
  "run_as": [],
  "applications": [
     {
       "application": "kibana-.kibana",
       "privileges": [
         "feature_fleet.all"
       ],
       "resources": [
         "space:default"
       ]
     }
   ]
}

The problem is that Kibana can't just go and rewrite all of these role definitions. We don't have any sort of migration system in place yet (#68814)

I'm not sure what is our policy regarding features that belong to plugins that are in a beta?

This might be our saving grace. I think we can allow the rename in this specific case, but only because this is a beta feature, and we explicitly tell users not to run this in production yet.

However, this is something that you need to document in the release notes. We have to at least give administrators a fighting chance of restoring access to their users, and not surprise them.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add a release note 👍 ,
I do not think is so problematic here as an user is not able to use the Fleet plugin if he do not have the superuser role

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds like y'all got all of the angles covered here, but I just wanted to mention that from various sources it looks like people are very positive about Fleet and Elastic Agent, and that Beta testers go out on a limb to try things out and give us early feedback. So as a general rule, I think it's important to have empathy for them and avoid introducing breaking changes that will essentially surprise and punish people who are trying to help us, if at all possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the release note

Copy link
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

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

I tested this locally and didn't manage to break it. 👍

@nchaulet nchaulet requested a review from a team as a code owner November 12, 2020 20:29
Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

apm changes lgtm

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.

Looks good Nicolas. Thanks for the changes to the Security Solution code 👍

title: i18n.translate('xpack.fleet.oldAppTitle', { defaultMessage: 'Ingest Manager' }),
async mount(params: AppMountParameters) {
const [coreStart] = await core.getStartServices();
coreStart.application.navigateToApp('fleet', {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.
So this still show a left-nav (kibana) nav item, correct?
should there be a flag (in settings) to possibly remove it? (I'm thinking of non-existing fleet users that may download/install >= 7.11)

Copy link
Member Author

Choose a reason for hiding this comment

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

the navlink is hidden with

navLinkStatus: AppNavLinkStatus.hidden,

@nchaulet
Copy link
Member Author

@elastic/siem I would love to have a review here :)

@legrego legrego mentioned this pull request Nov 16, 2020
@nchaulet nchaulet requested review from legrego and removed request for azasypkin and legrego November 17, 2020 13:45
Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM on SIEM changes, thank you!

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@legrego legrego removed their request for review November 18, 2020 12:00
@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet - 418 +418
ingestManager 418 - -418
total -0

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet - 1.1MB ⚠️ +1.1MB
indexManagement 1.5MB 1.5MB -65.0B
ingestManager 1.1MB - -1.1MB
observability 160.8KB 160.7KB -74.0B
securitySolution 7.9MB 7.9MB -224.0B
total -498.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet - 373.0KB ⚠️ +373.0KB
indexManagement 114.1KB 114.1KB -24.0B
ingestManager 372.4KB - -372.4KB
securitySolution 167.8KB 167.7KB -32.0B
total +636.0B
Unknown metric groups

async chunk count

id before after diff
fleet - 5 +5
ingestManager 5 - -5
total -0

History

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

@azasypkin azasypkin removed their request for review November 19, 2020 06:42
@nchaulet nchaulet merged commit 1b6cfe8 into elastic:master Nov 19, 2020
@nchaulet nchaulet deleted the feature-rename-ingest-manager-fleet-plugin branch November 19, 2020 13:43
nchaulet added a commit to nchaulet/kibana that referenced this pull request Nov 19, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 19, 2020
* master:
  skip "Dashboards linked by a drilldown are both copied to a space" (elastic#83824)
  [alerts] adds action group and date to mustache template variables for actions (elastic#83195)
  skip flaky suite (elastic#79389)
  [DOCS] Reallocates limitations to point-of-use (elastic#79582)
  [Enterprise Search] Engine overview layout stub (elastic#83756)
  Disable exporting/importing of templates.  Optimize pitch images a bit (elastic#83098)
  [DOCS] Consolidates plugins (elastic#83712)
  [ML] Space management UI (elastic#83320)
  test just part of the message to avoid updates (elastic#83703)
  [Data Table] Remove extra column in split mode (elastic#83193)
  Improve snapshot error messages (elastic#83785)
  skip flaky suite (elastic#83773)
  skip flaky suite (elastic#83771)
  skip flaky suite (elastic#65278)
  skip flaky suite (elastic#83793)
  [Task Manager] Ensures retries are inferred from the schedule of recurring tasks (elastic#83682)
  [index patterns] improve index pattern cache (elastic#83368)
  [Fleet] Rename ingestManager plugin ID fleet (elastic#83200)
  fixed pagination in connectors list (elastic#83638)
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:breaking Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.