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

Add method to bundle for reporting presence of overlays #287

Merged
merged 3 commits into from
Jul 25, 2019
Merged

Add method to bundle for reporting presence of overlays #287

merged 3 commits into from
Jul 25, 2019

Conversation

achilleasa
Copy link
Contributor

This PR extends the Bundle interface with a new method ContainsOverlays that users of the charm package can use to check whether the bundle they just obtained using one of the Read helpers did in fact contain one or more overlay blocks that were not actually parsed as the Read helpers do not work with multi-document bundles.

This new functionality will be leveraged by the charmstore code to reject uploads for multi-doc bundles.

Copy link
Member

@jameinel jameinel left a comment

Choose a reason for hiding this comment

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

I assume we need this for charmstore denying bundles that have overlays?

@@ -15,8 +15,10 @@ import (
type Bundle interface {
// Data returns the contents of the bundle's bundle.yaml file.
Data() *BundleData
// Data returns the contents of the bundle's README.md file.
// ReadMe returns the contents of the bundle's README.md file.
Copy link
Member

Choose a reason for hiding this comment

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

👍

bundlearchive_test.go Outdated Show resolved Hide resolved
@achilleasa
Copy link
Contributor Author

@jameinel Yes, I will be following up with a charmstore PR that uses the new helper method.

@achilleasa
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit 29b31f6 into juju:v6 Jul 25, 2019
@achilleasa achilleasa deleted the add-method-to-bundle-for-reporting-presence-of-overlays branch July 25, 2019 10:58
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.

None yet

3 participants