Issues
Issues copied to clipboard
Step-Templates become corrupted if package is not selected
Are you a customer of Octopus Deploy? Don't raise the issue here. Please contact our support team so we can triage your issue, making sure it's handled appropriately.
Prerequisites
- [X] I have verified the problem exists in the latest version
- [X] I have searched open and closed issues to make sure it isn't already reported
- [X] I have written a descriptive issue title
- [X] I have linked the original source of this report
- [X] I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)
The bug
When creating or modifying either Octopus.TerraformPlan (Plan to Apply a Terraform Template) or Octopus.TerraformPlanDestroy (Plan a Terraform Destroy), if you are to select "File inside of a package" for the template source, but don't provide a package name and save it, the step-template becomes corrupted.
What I expected to happen
The step template return an error and not allow you to save the step without providing a package.
Steps to reproduce
- Library --> Step Templates --> Add
- Choose either "Plan to Apply a Terraform Template" or "Plan a Terraform Destroy"
- Under "Settings" put a name for the Step
- Under "Step" -> "Template Source" Select "File inside of a Package"
- Click on Save (If save is still greyed out, you can click multiple other steps and "Save" becomes active again.) (You will be presented with the error immediately)
Screen capture
Good Step-Template (on Left) Bad Step-Template (On Right)
Log exerpt
Error Message
An unexpected error occurred in Octopus v2020.3.3: "TypeError: Cannot read property 'PackageId' of undefined"
in TerraformActionEditInternal
in WithOptionalProcessContext
in TerraformApplyActionEdit
in ActionEditor
in ControlledTabsContainer
in UrlQueryState
in UrlNavigationTabsContainer
in div
in div
in div
in TransitionAnimation
in div
in div
in PaperLayout
in TrackDirty
in div
in KeyboardHandler
in div
in FormComponent
in FormPaperLayout
in withRouter(FormPaperLayout)
in ActionTemplateInternal
in p
in WithActionScope
in ErrorBoundary
in div
in div
in main
in div
in div
in MediaQuery
in DrawerWrapperLayoutInternal
in p
in ForwardRef
in MediaQuery
in div
in NavigationSidebarLayout
in withRouter(NavigationSidebarLayout)
in main
in ActionTemplateLayoutInternal
in p
in withRouter(Connect(ActionTemplateLayoutInternal))
in RenderWithLayout
in Page
in p
in RenderWithPage
in t
in ErrorBoundary
in ReloadableRoute
in t
in ActionTemplateRoutes
in t
in ErrorBoundary
in ReloadableRoute
in t
in LibraryRoutes
in r
in t
in ErrorBoundary
in ReloadableRoute
in t
in t
in RootRoutes
in withRouter(RootRoutes)
in SpaceLoader
in WithPersistedSpace
in p
in withRouter(Connect(WithPersistedSpace))
in div
in StandardLayoutInternal
in p
in t
in ErrorBoundary
in ReloadableRoute
in SecureRoute
in t
in t
in t
in DevToolsContextProvider
in ClientConnector
in App
in Unknown
in t
in Theme
in f
in ErrorBoundary
in AppContext
Affected versions
Octopus Cloud: 2020.3.3:
Workarounds
Be careful creating the step-template. You can delete the step-template and recreate.
Links
https://secure.helpscout.net/conversation/1255822482/69096/
Testing this again on the latest master
it seems like we are able to save without error. So it's no longer "corrupted" but I'm not sure if it is in a usable state either. Might need validation to prevent this from saving.
Will close this since the main issue of the step template becoming "corrupted" has been fixed. If we hear something from a customer about the template not being usable maybe we can revisit that.
:tada: The fix for this issue has been released in:
Release stream | Release |
---|---|
2020.4 | 2020.4.0-rc.6 |
2020.5 | 2020.5.0-ci.375 |
2020.6+ | all releases |