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

ARM template breaks for object type parameters #5402

Closed
shaunmarx opened this issue Mar 18, 2019 · 4 comments

Comments

@shaunmarx
Copy link

commented Mar 18, 2019

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

  • I have verified the problem exists in the latest version
  • I have searched open and closed issues to make sure it isn't already reported
  • I have written a descriptive issue title
  • I have linked the original source of this report
  • I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)

The bug

The Deploy a Resource Manager Template step breaks when you provide it an in-line ARM template which contains an object parameter.

What I expected to happen

The step should render the parameters then allow you to save the step.

Steps to reproduce

  1. Go to a project and add a new `Deploy a resource Manager Template'
  2. Navigate to the Template Source Section in the newly added step
  3. Choose the Source code option and click on the "Add Source" button.
  4. Enter the following template then click Save:
{
  "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "Kaboom": {
      "type": "object",
      "metadata": {
        "description": "The name of the web app that you wish to create."
      },
      "defaultValue": {
        "count": 0,
        "intervalInSeconds": 0
      }
    }
  },
  "resources": [ ],
  "outputs": { }
}
  1. Notice the error

Screen capture

image

Log exerpt

Octopus v0.0.0-local

Invariant Violation: Objects are not valid as a React child (found: object with keys {count, intervalInSeconds}). If you meant to render a collection of children, use an array instead.

Error(format.replace (/node_modules/react-dom/cjs/react-dom.development.js:55:0)
throwOnInvalidObjectType (/node_modules/react-dom/cjs/react-dom.development.js:11694:0)
reconcileChildrenIterator (/node_modules/react-dom/cjs/react-dom.development.js:12468:0)
reconcileChildren (/node_modules/react-dom/cjs/react-dom.development.js:14069:0)
shouldDeprioritizeSubtree (/node_modules/react-dom/cjs/react-dom.development.js:14522:0)
beginWork (/node_modules/react-dom/cjs/react-dom.development.js:15227:0)
assignFiberPropertiesInDEV (/node_modules/react-dom/cjs/react-dom.development.js:18789:0)
workLoop (/node_modules/react-dom/cjs/react-dom.development.js:18829:0)
renderRoot (/node_modules/react-dom/cjs/react-dom.development.js:18912:0)
completeRoot (/node_modules/react-dom/cjs/react-dom.development.js:19809:0)

Affected versions

Octopus Server: 2019.1.6-2019.2.3

Workarounds

Use a package instead of source code option for the ARM template or update the deployment process via the API. The latter will however result in the step breaking each time it's viewed.

Links

https://help.octopus.com/t/passing-objects-in-json-in-arm-template/22547/3
Related Issue where this was most likely introduced: #3198

@shaunmarx

This comment has been minimized.

Copy link
Author

commented Mar 18, 2019

@slewis74 slewis74 added this to the 2019.4.3 milestone Apr 15, 2019
@slewis74

This comment has been minimized.

Copy link

commented Apr 15, 2019

Fixed in #5468

@octoreleasebot

This comment has been minimized.

Copy link

commented Apr 15, 2019

Release Note: Related to 5468, Azure Resource Group template parser updated to handle non-string types

@lock

This comment has been minimized.

Copy link

commented Jul 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.