Skip to content

Conversation

@jfsiii
Copy link
Contributor

@jfsiii jfsiii commented Sep 2, 2020

Backports the following commits to 7.x:

* Quick pass at restoring support for both zip & tar

Restored unzip functions from #43764

Persist the `download` value returned by EPR (e.g. `/epr/system/system-0.5.3.zip` or  `/epr/system/system-0.5.3.tar.gz`) as "archive key" for a package name/version combo.

The same name&version should return the same archive. The value initially given by the registry.

Based on that value, we decide which decompression to use.

* Use template literal vs JSON.stringify for keygen

* Factor unzip/untar logic out to getBufferExtractor

 * Add tests for getBufferExtractor
 * Replace `[aA]rchiveKey*` with `[aA]rchiveLocation*`

* Include given name & version in error message

Co-authored-by: Elastic Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/ingest_manager/server/services/epm/registry/cache.ts
@jfsiii jfsiii added the backport This PR is a backport of another PR label Sep 2, 2020
@jfsiii jfsiii requested a review from ruflin September 2, 2020 10:04
@jfsiii jfsiii added the Team:Fleet Team label for Observability Data Collection Fleet team label Sep 2, 2020
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

I tried this against the registry branch with zip files and things seem to be working as expected.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
enterpriseSearch 357.9KB +24.0B 357.9KB

page load bundle size

id value diff baseline
upgradeAssistant 64.2KB +24.0B 64.2KB

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

@jfsiii jfsiii merged commit 459c881 into elastic:7.x Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants