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

Reject uploads of bundles containing overlays #884

Merged
merged 3 commits into from
Aug 14, 2019
Merged

Reject uploads of bundles containing overlays #884

merged 3 commits into from
Aug 14, 2019

Conversation

achilleasa
Copy link
Contributor

This PR enables the charmstore to detect attempts to upload bundles whose bundle.yaml entry contains multiple documents and return an error to indicate that multi-document bundles are not currently supported by the charmstore.

On a side-note, the charm.v6 version imported by this PR includes helpers for dealing with multi-doc bundles (LocalBundleDataSource,StreamBundleDataSource and ReadAndMergeBundleData). This should make it easier to update the charmstore code so it can deal with multi-doc bundles in the future if that's something we want to do.

@achilleasa
Copy link
Contributor Author

Note: CI bails out complaining the mongo has shut down

Copy link
Contributor

@mhilton mhilton left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@achilleasa
Copy link
Contributor Author

@mhilton I have performed an audit of the code in the gobwas/glob that we have added to our dependencies and found no red flags. More specifically, the package only deals with string comparisons and performs no I/O (files, sockets etc.).

For additional context: the package is used by juju when a local charm is uploaded to a controller to filter the charm archive files (e.g. the '.tox/' folder contents) before re-packaging the charm archive (we landed this as a fix for https://bugs.launchpad.net/juju/+bug/1813799)

@mhilton mhilton merged commit 0e2a083 into juju:v5 Aug 14, 2019
@achilleasa achilleasa deleted the reject-uploads-of-bundles-containing-overlays branch August 14, 2019 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants