-
Notifications
You must be signed in to change notification settings - Fork 212
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
Update bundle action commands to work with the installation record #1724
Update bundle action commands to work with the installation record #1724
Conversation
53cd8fe
to
82994a9
Compare
/azp run porter-integration |
Azure Pipelines successfully started running 1 pipeline(s). |
84c7924
to
3033511
Compare
We want to be able to compare the bundle digest provided during install with the digest of the bundle in the cache. Signed-off-by: Carolyn Van Slyck <[email protected]>
1. Persist additional installation metadata on install * bundle digest * bundle version * user-specified parameters * names of parameter and credential sets 2. Support changing the bundle version with upgrade --version 3. Update invoke and uninstall to use an installation record. Signed-off-by: Carolyn Van Slyck <[email protected]>
Signed-off-by: Carolyn Van Slyck <[email protected]>
Signed-off-by: Carolyn Van Slyck <[email protected]>
3033511
to
fafa39e
Compare
/azp run porter-integration |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -8,7 +8,7 @@ import ( | |||
|
|||
type BundlePullOptions struct { | |||
Reference string | |||
ref cnab.OCIReference | |||
_ref *cnab.OCIReference |
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.
Curious as to the _*
naming convention for this field? I'm anticipating this is Golang knowledge I need to acquire :)
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 was stealing from python's naming convention. Fields with an underscore shouldn't be used outside of the struct's own methods. It's just a way to indicate, hey if you found this via autocomplete, you probably shouldn't be using it.
It's a fake private field essentially since there's only exported/unexported at the package level but no concept of private. It really was just to help me refactor and not accidentally use it (since I was using that field elsewhere in the package previously).
What does this change
Update bundle action commands to work with the installation record
Install now persists extra information to the installation record. The others, invoke, upgrade and uninstall all now load up the record and have the action work against that. Upgrade also now supports
porter upgrade INSTALLATION --version
. It will handle updating the installation to the desired version and then executing the bundle to get to that version.Add ExtendedBundle Wrapper
This wraps the cnab-go bundle and adds support for custom extensions that porter supports. It will help us wean off of using the porter manifest at runtime, which is a huge problem because then our support for spec extensions only works when it was authored in Porter.
More work is needed to fix this, but this is just a refactoring to get the data in the right place, i.e. when we do pass around a bundle, it's a bundle that knows how to deal with extensions.
I am still saving a cnab bundle document so that if we change the structure of the wrapper it doesn't impact the stored document.
Include bundle reference and digest in the cache
We want to be able to compare the bundle digest provided during install with the digest of the bundle in the cache.
What issue does it fix
This is part of supporting a reconcile command in porter.
Notes for the reviewer
Checklist