Spinnaker: Parameters that inherited from template disappear while reload the ui

Created on 27 Jun 2019  路  3Comments  路  Source: spinnaker/spinnaker

Issue Summary:

The pipeline I created from Pipeline Templates v2 will not show the parameters on Confirm Execution window. However, if I enter the configure page and come back to the pipeline page, then those parameters will show up. But they will disappear again if I refresh the page.

Cloud Provider(s):

Kubernetes (v2)

Environment:

Spinnaker is deployed on Kubernetes cluster by helm-chart

version: 1.14.7
timestamp: '2019-06-21 07:40:28'
services:
  echo:
    version: 2.5.1-20190612034009
    commit: e68a464bbb3dcef8ebdb6a7e608a08730af317cd
  clouddriver:
    version: 4.6.3-20190621034009
    commit: be0fb5331837a3bfbf80468f14284295a4ad5b3a
  deck:
    version: 2.9.6-20190613034009
    commit: 5abe4c75f0159bbe10fd56987f942932ae427246
  fiat:
    version: 1.5.1-20190529034009
    commit: 381db2c99a8756af92cac6cf8274cac5ea3408ee
  front50:
    version: 0.17.0-20190510203645
    commit: 0540599582fdefaf5249009c3efdb10d26854956
  gate:
    version: 1.8.3-20190618034010
    commit: 935a3347136727001fa7c89708fe92be23bfb618
  igor:
    version: 1.3.0-20190515102735
    commit: b3f354f0bd49d0656217998108f522519b30444c
  kayenta:
    version: 0.9.0-20190621034009
    commit: 4ae86c0cc23d4cc6a62c3a1a0bd9ced185c75c92
  orca:
    version: 2.7.5-20190619034009
    commit: 8c46567f20b080f3f9c7e359e29cf459a375ae84
  rosco:
    version: 0.12.0-20190517180000
    commit: 59f79299a3fcfb39229cbd0a2e52bf435c340f4a
  defaultArtifact: {}
  monitoring-third-party:
    version: 0.13.0-20190430163248
    commit: bf01bf225168919ad13d63b82f93c39061e0b544
  monitoring-daemon:
    version: 0.13.0-20190430163248
    commit: bf01bf225168919ad13d63b82f93c39061e0b544
dependencies:
  redis:
    version: 2:2.8.4-2
  consul:
    version: 0.7.5
  vault:
    version: 0.7.0
artifactSources:
  debianRepository: https://dl.bintray.com/spinnaker-releases/debians
  dockerRegistry: gcr.io/spinnaker-marketplace
  googleImageProject: marketplace-spinnaker-release
  gitPrefix: https://github.com/spinnaker

Steps to Reproduce:

$ spin pipeline-template save --file test-template.json
---
{
  "schema": "v2",
  "variables": [
    {
      "type": "int",
      "defaultValue": 42,
      "description": "The time a wait stage shall pauseth",
      "name": "timeToWait"
    }
  ],
  "id": "newSpelTemplate",
  "protect": false,
  "metadata": {
    "name": "Variable Wait",
    "description": "A demonstrative Wait Pipeline.",
    "owner": "[email protected]",
    "scopes": [
      "global"
    ]
  },
  "pipeline": {
    "lastModifiedBy": "anonymous",
    "updateTs": "0",
    "parameterConfig": [
      {
        "name": "test",
        "hasOptions": false,
        "required": true
      }
    ],
    "limitConcurrent": true,
    "keepWaitingPipelines": false,
    "description": "",
    "triggers": [],
    "notifications": [],
    "stages": [
      {
        "waitTime": "${ templateVariables.timeToWait }",
        "name": "My Wait Stage",
        "type": "wait",
        "refId": "wait1",
        "requisiteStageRefIds": []
      }
    ]
  }
}
$ spin pipeline-template save --file test-template.json
---
{
  "schema": "v2",
  "application": "test",
  "name": "pipeline-test",
  "template": {
    "artifactAccount": "front50ArtifactCredentials",
    "reference": "spinnaker://newSpelTemplate",
    "type": "front50/pipelineTemplate"
  },
  "variables": {
    "waitTime": 4
  },
  "exclude": [],
  "inherit": [
    "parameters"
  ],
  "triggers": [],
  "parameters": [],
  "notifications": [],
  "description": "",
  "stages": []
}

Execute the pipeline --> no parameters
Enter the configure page --> see the parameters setting
Execute the pipeline again --> parameters show up
Refresh the page --> parameters disappear again

bug

Additional Details:

bug pipelinetemplates sispinnaker-as-code

Most helpful comment

The fix for this has now been cherry picked onto 1.15 and 1.14 and will be in the next patch releases for both versions. I also created a separate pipeline run stage issue.

All 3 comments

Thanks for the detailed issue. I was able to reproduce this and it is due to a discrepancy between how pipeline configs are hydrated with templated items on the configuration page versus how they are loaded or updated when viewed on the executions route. I'll tag this issue once the fix is ready. Thanks!

I also found the pipeline(run as pipeline) stage also can not see the parameters.

The fix for this has now been cherry picked onto 1.15 and 1.14 and will be in the next patch releases for both versions. I also created a separate pipeline run stage issue.

Was this page helpful?
0 / 5 - 0 ratings