[Ingest Manager] Add route for package installation by upload#77044
Merged
skh merged 4 commits intoelastic:masterfrom Sep 15, 2020
Merged
[Ingest Manager] Add route for package installation by upload#77044skh merged 4 commits intoelastic:masterfrom
skh merged 4 commits intoelastic:masterfrom
Conversation
8 tasks
fab70f2 to
bad3b65
Compare
bad3b65 to
d8f3203
Compare
Contributor
Author
|
@mtojek @ycombinator This might be a good time to have a look at the API endpoint and comment if this works for you or if you would like to see changes. |
Contributor
|
I like it! All the information is (going to) be parsed from package contents so just asking for the package contents in either zip or gzip format makes sense to me. It should also make it very easy to take the artifact produced by 👍 👍 from me. |
Contributor
|
Pinging @elastic/ingest-management (Feature:Fleet) |
Contributor
💚 Build SucceededBuild metricspage load bundle size
History
To update your PR or re-run it, just comment with: |
jfsiii
approved these changes
Sep 14, 2020
Contributor
jfsiii
left a comment
There was a problem hiding this comment.
👍 Thanks for the context/thinking around the routes.
skh
added a commit
to skh/kibana
that referenced
this pull request
Sep 15, 2020
…c#77044) * Add route to accept a direct package upload. * Only accept application/zip or application/gzip * Use better name for response containing only a message. * Add integration test for direct package upload.
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Sep 15, 2020
* master: (25 commits) [Security Solution] Add unit tests for Network search strategy (elastic#77416) [Alerting] Improves performance of the authorization filter in AlertsClient.find by skipping KQL parsing (elastic#77040) [Ingest Manager] Add route for package installation by upload (elastic#77044) [APM-UI][E2E] filter PRs from the uptime GH team (elastic#77359) [APM] Remove useLocation and some minor route improvements (elastic#76343) [Enterprise Search] Update enterpriseSearchRequestHandler to manage range of errors + add handleAPIErrors helper (elastic#77258) [SECURITY_SOLUTION] Task/hostname policy response ux updates (elastic#76444) Move remaining uses of serviceName away from urlParams (elastic#77248) [Lens] Move configuration popover to flyout (elastic#76046) [Ingest Manager] Manually build Fleet kuery with Node arguments (elastic#76589) skip flaky suite (elastic#59975) Neutral-naming in reporting plugin (elastic#77371) [Enterprise Search] Add UserIcon styles (elastic#77385) [RUM Dashboard] Added loading state to visitor breakdown pie charts (elastic#77201) [Ingest Manager] Fix polling for new agent action (elastic#77339) Remote cluster - Functional UI test to change the superuser to a test_user with limited role (elastic#77212) Stacked headers and navigational search (elastic#72331) [ML] DF Analytics creation wizard: Fixing field loading race condition (elastic#77326) [Monitoring] Handle no mappings found for sort and collapse fields (elastic#77099) Add Lens to Recently Accessed (elastic#77249) ...
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Sep 15, 2020
* master: (293 commits) Fix tsvb filter ration for table (elastic#77272) [Security Solution] Add unit tests for Network search strategy (elastic#77416) [Alerting] Improves performance of the authorization filter in AlertsClient.find by skipping KQL parsing (elastic#77040) [Ingest Manager] Add route for package installation by upload (elastic#77044) [APM-UI][E2E] filter PRs from the uptime GH team (elastic#77359) [APM] Remove useLocation and some minor route improvements (elastic#76343) [Enterprise Search] Update enterpriseSearchRequestHandler to manage range of errors + add handleAPIErrors helper (elastic#77258) [SECURITY_SOLUTION] Task/hostname policy response ux updates (elastic#76444) Move remaining uses of serviceName away from urlParams (elastic#77248) [Lens] Move configuration popover to flyout (elastic#76046) [Ingest Manager] Manually build Fleet kuery with Node arguments (elastic#76589) skip flaky suite (elastic#59975) Neutral-naming in reporting plugin (elastic#77371) [Enterprise Search] Add UserIcon styles (elastic#77385) [RUM Dashboard] Added loading state to visitor breakdown pie charts (elastic#77201) [Ingest Manager] Fix polling for new agent action (elastic#77339) Remote cluster - Functional UI test to change the superuser to a test_user with limited role (elastic#77212) Stacked headers and navigational search (elastic#72331) [ML] DF Analytics creation wizard: Fixing field loading race condition (elastic#77326) [Monitoring] Handle no mappings found for sort and collapse fields (elastic#77099) ...
skh
added a commit
that referenced
this pull request
Sep 15, 2020
#77438) * Add route to accept a direct package upload. * Only accept application/zip or application/gzip * Use better name for response containing only a message. * Add integration test for direct package upload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partially implements #70582
POST /api/ingest_manager/epm/packagesthat takes a buffer as body, which should contain the package archive to be installed.How to test this
should respond with
No actual package installation takes place yet. The integrity or file type of the archive (
foo.tar.gz) isn't verified yet.Choice of route
With this change,
POST /api/ingest_manager/epm/packages/{pkgkey}is used to install a package from the registry, andPOST /api/ingest_manager/epm/packagesfor installing by direct upload.The initial reason was that the existing endpoint already uses the
POSTbody to optionally send the{ force: true|false }parameter, so it can't be used to upload a file, but it would of course be possible to refactor that and move theforceparameter to URL params instead. That way, the same route could be used for both ways to install a package.After thinking a bit longer about it, as both package name and version are set within the uploaded package archive, I think we don't really need to ask users to provide the package key in the POST url, as it would be duplicate information.
Open issues