-
Notifications
You must be signed in to change notification settings - Fork 12
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
chore: update 'dev extract' command to work with bundles built from a uds-bundle.tf source #1061
base: build-from-tf
Are you sure you want to change the base?
Conversation
@@ -233,6 +234,69 @@ func handleZarfInitOpts(pkgVars zarfVarData, zarfPkgKind v1alpha1.ZarfPackageKin | |||
return zarfInitOpts | |||
} | |||
|
|||
// PreDeployValidationTF validates a bundle that has been built from a .tf file before deployment | |||
// TODO: This function shares (copied) a lot of code from PreDeployValidation(). Work towards consolidating what makes sense. |
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 apologize for my sins; I will look at this a bit tomorrow morning.
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.
Meh, I'm sure the compiler reduces it to shared code anyway :P
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.
LGTM
if bundleCfg.IsTofu { | ||
_, _, _, err = bndlClient.PreDeployValidationTF() | ||
if err != nil { | ||
return err | ||
} | ||
} else { | ||
_, _, _, err = bndlClient.PreDeployValidation() | ||
if err != nil { | ||
return 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.
nit: same style nit from other pr; this just reduces nested if err{}
blocks
if bundleCfg.IsTofu { | |
_, _, _, err = bndlClient.PreDeployValidationTF() | |
if err != nil { | |
return err | |
} | |
} else { | |
_, _, _, err = bndlClient.PreDeployValidation() | |
if err != nil { | |
return err | |
} | |
} | |
if bundleCfg.IsTofu { | |
_, _, _, err = bndlClient.PreDeployValidationTF() | |
} else { | |
_, _, _, err = bndlClient.PreDeployValidation() | |
} | |
if err != nil { | |
return err | |
} |
@@ -233,6 +234,69 @@ func handleZarfInitOpts(pkgVars zarfVarData, zarfPkgKind v1alpha1.ZarfPackageKin | |||
return zarfInitOpts | |||
} | |||
|
|||
// PreDeployValidationTF validates a bundle that has been built from a .tf file before deployment | |||
// TODO: This function shares (copied) a lot of code from PreDeployValidation(). Work towards consolidating what makes sense. |
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.
Meh, I'm sure the compiler reduces it to shared code anyway :P
config.BundleAlwaysPull = []string{config.BundleTF, config.BundleTFConfig} | ||
filepaths, err := provider.LoadBundleMetadata() | ||
if err != nil { | ||
message.Warnf("@JPERRY error when loading the metadtaa of the .tf bundle: %s\n", err.Error()) |
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.
message.Warnf("@JPERRY error when loading the metadtaa of the .tf bundle: %s\n", err.Error()) | |
message.Warnf("error when loading the metadata of the .tf bundle: %s\n", err.Error()) |
Description
Bundles created from a
uds-bundle.tf
source file store the SHA256 checksum of the Zarf Package manifest in different place than bundles created from auds-bundle.yaml
Type of change
Checklist before merging
😰😬🙈