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 API /api/ingest_manager => /api/fleet #79193

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Oct 1, 2020

Description

In the effort of renaming Ingest manager plugin Fleet, we are renaming our API routes

Details:

Rename ingest manager api

/api/ingest_manager => /api/fleet
/api/ingest_manager/fleet => /api/fleet

Backward compatible routes

cc @blakerouse @michalpristas

For retro-compatibility we keep the agent (enroll, checkin, and ack) API route from 7.9 to be compatible with 7.9 agents
So we have duplicated route for

Enrollment

/api/ingest_manager/fleet/agents/enroll
/api/fleet/agents/enroll

checkin

/api/ingest_manager/fleet/agents/{agentId}/checkin
/api/fleet/agents/{agentId}/checkin

acknowledgements

/api/ingest_manager/fleet/agents/{agentId}/acks
/api/fleet/agents/{agentId}/acks

Breaking change route

Fleet setup do not exists anymore and it's not agents setup

/api/ingest_manager/setup => /api/fleet/agents/setup

All the other APIs call should be migrated from /api/ingest_manager/* to /api/fleet/*

list of things to ensure are checked / tested / passing.

  • Nicolas - Fleet code is -> moved to Fleet, with exceptions as noted
  • Nicolas -Remaining exceptions for ingest_manager APIs are noted in the issue Jen started about BWC code removal
  • Kevin - Endpoint code is updated to use new APIs
  • Charlie - Security side tests are all passing or acknowledged (not sure which ones use fleet code)
  • Eric - stage the PR for Demo Environment changes
  • Eric - stage the PR for e2e-testing framework api changes ([Fleet] update apis due to ingest_magement -> fleet api change  e2e-testing#342 ...leave the old route tests, duplicate them to new apis)
  • Dede - web site docs changes - do we call this out anywhere on line?
  • Nicolas - OAS File / API Docs file... we have a current version of api docs file in Kibana now, and we'll want to update it but also leave the BWC items in place, same as above
  • Nicolas / Jen - Release note updates
  • other? keep adding to the list as we see it

Dev docs

The following Ingest Manager API routes changed:

  • All APIs route have be moved from /api/ingest_manager/* to /api/fleet/*
  • All the previous fleet route have be moved from /api/ingest_manager/fleet/* to /api/fleet/* this include
    • /api/ingest_manager/fleet/agents => /api/fleet/agents
    • /api/ingest_manager/fleet/enrollement_tokens => /api/fleet/enrollement_tokens
  • Fleet setup API has been move from /api/ingest_manager/fleet/setup to /api/fleet/agents/setup

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Ingest Management:beta2 labels Oct 1, 2020
@nchaulet nchaulet self-assigned this Oct 1, 2020
@nchaulet
Copy link
Member Author

nchaulet commented Oct 1, 2020

@elasticmachine merge upstream

@nchaulet nchaulet force-pushed the feature-ingestmanager-fleet-api-renaming branch from 02a9ea3 to 1a674ed Compare October 2, 2020 01:20
@nchaulet nchaulet marked this pull request as ready for review October 2, 2020 12:27
@nchaulet nchaulet requested a review from a team as a code owner October 2, 2020 12:27
@nchaulet nchaulet requested a review from a team October 2, 2020 12:27
@nchaulet nchaulet requested a review from a team as a code owner October 2, 2020 12:27
@elasticmachine
Copy link
Contributor

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

@nchaulet nchaulet added v7.10.0 v8.0.0 and removed release_note:skip Skip the PR/issue when compiling release notes labels Oct 2, 2020
@nchaulet
Copy link
Member Author

nchaulet commented Oct 2, 2020

@jen-huang Maybe you can help with me what kind of release not should we have for this kind of breaking change?

@EricDavisX
Copy link
Contributor

EricDavisX commented Oct 2, 2020

list of things to be tracked are now placed in the description section.

@@ -19,12 +19,11 @@ import {
import { GetPolicyListResponse, GetPolicyResponse, UpdatePolicyResponse } from '../../../types';
import { NewPolicyData } from '../../../../../../../common/endpoint/types';

const INGEST_API_ROOT = `/api/ingest_manager`;
const INGEST_API_ROOT = `/api/fleet`;
Copy link
Contributor

Choose a reason for hiding this comment

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

@paul-tavares @nchaulet thoughts on removing the hardcoded reference and using epmRouteService etc like this: https://github.com/elastic/kibana/blob/master/x-pack/plugins/security_solution/public/common/hooks/endpoint/upgrade.ts#L10

That'd avoid having to find/replace these references in the future

Copy link
Member Author

@nchaulet nchaulet Oct 2, 2020

Choose a reason for hiding this comment

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

sound good to me if we can avoid hardcoded path :) if this can be done after that PR? there is already a lot of changes going on

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, I agree that we (security solution) should stop using hardcoded values and start using the const exposed in ingest. @nchaulet we can take that one - you don't have to include it in your PR.

Co-authored-by: John Schulz <[email protected]>
Co-authored-by: John Schulz <[email protected]>
@jen-huang
Copy link
Contributor

@nchaulet I'd recommend release_note:dev_docs label and adding a ## Dev docs section to your PR with information. The release notes script will pull it from there. I had a similar PR with a dev docs section: #74914 - looking at this, mine is outdated now with your changes 😄 Maybe you can copy from mine and adjust the paths, and then I can remove the notes from my PR?

@jen-huang
Copy link
Contributor

Also would be great to update this PR with master again, since tests were re-enabled in #79290 a little while ago!

@nchaulet
Copy link
Member Author

nchaulet commented Oct 2, 2020

@nchaulet I'd recommend release_note:dev_docs label and adding a ## Dev docs section to your PR with information. The release notes script will pull it from there. I had a similar PR with a dev docs section: #74914 - looking at this, mine is outdated now with your changes 😄 Maybe you can copy from mine and adjust the paths, and then I can remove the notes from my PR?

What about updating the path in your PR as there is more than just a path change, there is config change too?

@nchaulet
Copy link
Member Author

nchaulet commented Oct 4, 2020

@elasticmachine merge upstream

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.

Changes to Endpoint LGTM. I will open a separate issue on our side to refactor several areas of our code to use the consts exposed via Fleet.

(FYI: I will update an external tool we have to download/view endpoint user artifacts when you merge this in)

@mdelapenya
Copy link
Contributor

Hey @nchaulet, in the E2E we use:

/api/ingest_manager/fleet/setup which I imagine moves to /api/fleet/setup. Is this correct? I ask because in the description above it's not clear if that HTTP endpoint is the same and/or affected:

Breaking change route

Fleet setup do not exists anymore and it's not agents setup

/api/ingest_manager/setup => /api/fleet/agents/setup

Thanks!

@jen-huang
Copy link
Contributor

@nchaulet I'd recommend release_note:dev_docs label and adding a ## Dev docs section to your PR with information. The release notes script will pull it from there. I had a similar PR with a dev docs section: #74914 - looking at this, mine is outdated now with your changes 😄 Maybe you can copy from mine and adjust the paths, and then I can remove the notes from my PR?

What about updating the path in your PR as there is more than just a path change, there is config change too?

That works too! In that case feel free to edit my PR description and replace the labels on your PRs with release_note:skip so that we don't pull duplicate notes.

@nchaulet nchaulet removed the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label Oct 5, 2020
@nchaulet nchaulet requested a review from jfsiii October 5, 2020 17:11
@nchaulet nchaulet added the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label Oct 5, 2020
@nchaulet
Copy link
Member Author

nchaulet commented Oct 5, 2020

@elastic/siem it will really be great if can have a review for 7.10

@jfsiii
Copy link
Contributor

jfsiii commented Oct 5, 2020

@paul-tavares /api/ingest_manager/fleet/setup becomes /api/fleet/agents/setup

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.

👍 to merge for FF

@nchaulet
Copy link
Member Author

nchaulet commented Oct 5, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
ingestManager 1.1MB 1.1MB -15.0B
securitySolution 10.4MB 10.4MB -68.0B
total -83.0B

page load bundle size

id before after diff
ingestManager 536.9KB 537.3KB +361.0B

History

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

@ghost
Copy link

ghost commented Oct 7, 2020

Hi Eric

We have executed the smoke testcases under Smoke TestRun for Rename API /api/ingest_manager => /api/fleet for this ticket on latest 8.0.0-SNAPSHOT Kibana cloud environment.

Please let us know if anything is missing from our end.

gmmorris added a commit that referenced this pull request Oct 8, 2020
…into feature/task_manager_429

* 'feature/task_manager_429' of github.com:elastic/kibana: (158 commits)
  Add license check to direct package upload handler. (#79653)
  [Ingest Manager] Rename API /api/ingest_manager => /api/fleet (#79193)
  [Security Solution][Resolver] Simplify CopyableField styling and add comments (#79594)
  Fine-tunes ML related text on Metrics UI (#79425)
  [ML] DF Analytics creation wizard: ensure job creation possible when model memory lower than estimate (#79229)
  Add new "Add Data" tutorials (#77237)
  Update APM telemetry docs (#79583)
  Revert "Add support for runtime field types to mappings editor. (#77420)" (#79611)
  Kibana request headers (#79218)
  ensure missing indexPattern error is bubbled up to error callout (#79378)
  Missing space fix (#79585)
  remove duplicate tab states (#79501)
  [data.ui] Lazy load UI components in data plugin. (#78889)
  Add generic type params to search dependency. (#79608)
  [Ingest Manager] Internal action for policy reassign (#78493)
  [ILM] Add index_codec to forcemerge action in hot and warm phases (#78175)
  [Ingest Manager] Update open API spec and add condition to agent upgrade endpoint (#79579)
  [ML] Hide Data Grid column options when histogram charts are enabled. (#79459)
  [Telemetry] Synchronous `setup` and `start` methods (#79457)
  [Observability] Persist time range across apps (#79258)
  ...
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.

9 participants