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] Output API endpoints #118589

Merged
merged 3 commits into from
Nov 16, 2021

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Nov 15, 2021

Summary

Related to #117317

This PR create the missing Output endpoints needed for the multiple output UI:

  • POST /outputs to create a new output.
  • DELETE /outputs/{id} to delete an existing output. (You cannot delete the default output).

I also added some integration test to cover these endpoints, and updated the openAPI spec.

@nchaulet nchaulet added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Nov 15, 2021
@nchaulet nchaulet self-assigned this Nov 15, 2021
@nchaulet nchaulet requested a review from a team as a code owner November 15, 2021 18:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet force-pushed the feature-outputs-api-endpoints branch from 85ffbc2 to 7d4f0f1 Compare November 15, 2021 18:27
@nchaulet nchaulet force-pushed the feature-outputs-api-endpoints branch from 7d4f0f1 to ad02252 Compare November 15, 2021 19:02
Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

🚀

@@ -226,6 +226,11 @@ class OutputService {
`Preconfigured output ${id} cannot be deleted outside of kibana config file.`
);
}

if (originalOutput.is_default && !fromPreconfiguration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is_default_monitoring check is not needed here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes good catch we should probably not allow to delete the default monitoring too 👍

.expect(200);

expect(deleteResponse.id).to.eql(outputId);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see tests for attempting to delete default outputs

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

@nchaulet nchaulet enabled auto-merge (squash) November 16, 2021 15:48
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1121 1125 +4

Page load bundle

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

id before after diff
fleet 104.6KB 104.7KB +71.0B
Unknown metric groups

API count

id before after diff
fleet 1223 1227 +4

History

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

cc @nchaulet

@nchaulet nchaulet merged commit d6e5853 into elastic:main Nov 16, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 16, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 16, 2021
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants