-
Notifications
You must be signed in to change notification settings - Fork 491
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
Drop support for series in bundles #17350
Drop support for series in bundles #17350
Conversation
e166f3d
to
b4ffde6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH: I think we just remove Series from the bundle code and nothing happens it's just ignored.
3d366da
to
4f0ca93
Compare
4f0ca93
to
cec4f30
Compare
cec4f30
to
4ea92d6
Compare
We have discussed this together further and landed on erroring out if series is provided, but parsing for this in |
4ea92d6
to
a47fb94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go once we change the method name from RawBytes()
errs := []string{} | ||
|
||
// The first dslist is always the bundle itself | ||
bundleErrs := verifyBundleNoSeries(dslist[0].RawBundle()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that there is a check above where this is called to check that dslist is empty, but I don't like this coding style. Instead, can this return an empty string if the list is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like a catch guard? Sure thing
} else if err != nil { | ||
// The bundle should already have been parsed if we're | ||
// calling this check, so we should not see this | ||
return []string{fmt.Sprintf("programming error: %w", err)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove programming error
. I'd just return the error, things can be refactored and seeing programming error
is not ideal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
a47fb94
to
072cf14
Compare
…eive_raw_bundle #427 Add this RawBundle method to Bundle interface and BundleDataSource In Juju, we have come across a need to run some extra parsing + verification which we do not want to do in juju/charm. We want to keep the data model clean in juju/charm. As such, we need to way to keep the raw bundle data around for later parsing Add this to BundleDataSource, as this is what we use in Juju However, we also implement our own BundleDataSource in Juju. built with the Bundle interface here. So we need to add this method to Bundle as well You can see a draft implementation for this change here: juju/juju#17350 As a flyby, delete some incorrect comments ## QA Steps Compile into juju form the following PR and run it's QA steps: juju/juju#17350
072cf14
to
e1f3aea
Compare
Support for series in bundles is being dropped in 4.0 (major version bump). Error out if bundles include series This means we no longer need to parse series into base in the rest of our bundle deploy code We do not want to rely the juju/charm BundleData struct to parse series. We want to keep this data structure clean, so will be removing from BundleData very soon Series As such, we need to parse the bundle ourselves. This requires using a new miner version of "juju/charm" which allows us to access the raw unparsed bundle Also, swap our series for base in test bundles
e1f3aea
to
d74fefb
Compare
/merge |
1 similar comment
/merge |
Drop support for series in bundles
Support for series in bundles is being dropped in 4.0 (major version
bump). Error out if bundles include series
This means we no longer need to parse series into base in the rest of
our bundle deploy code
We do not want to rely the juju/charm BundleData struct to parse series.
We want to keep this data structure clean, so will be removing from
BundleData very soon Series
As such, we need to parse the bundle ourselves. This requires using a
new miner version of "juju/charm" which allows us to access the raw
unparsed bundle
We can also drop compatibility parsing in bundle handlers
Also, rename
checkExplicitSeries
tocheckExplicitBase
and stop checkingif
series
is provided here.Also, swap our series for base in test bundles
Checklist
QA steps
Attempt to deploy some bundles
(Note: charmed-kubernetes rev 1243 contains series on the top level bundle, no where else)
Attempt to deploy some bundles with overlays
Links
Jira card: JUJU-5996