Skip to content

pipelineID is not resolved for existing pipeline when multiple pipeline stages are used #84

@milindcq

Description

@milindcq

Pre Requisites

Description

While rendering a nested pipeline If one of the pipeline stage is a nested pipeline and another refers to an existing pipeline. The spinnaker pipeline id for the existing pipeline stage is not resolved. This is due to faulty check that skips the id resolution due to this check (

if !hasChildPipelines && mapContainsKey(innerStage, "application") && mapContainsKey(innerStage, "pipeline") && reflect.TypeOf(innerStage["pipeline"]).Kind() == reflect.String {
))

For example: In the nested pipeline in the image below (which is linked by the main application pipeline), the Redner stage refers to an existing pipeline while the Deploy stage that follows it is a nested pipeline. In the second image you can see that shore did not resolve the id of the Render pipeline (which was set to null).

Screenshot 2023-08-08 at 1 32 52 PM

Pipeline line Is was not resolved instead set to null.
Screenshot 2023-08-10 at 10 25 24 AM

Steps to Reproduce

  1. The existing test pipeline is a good example (
    "pipeline": "Finding Pipeline nested"
    ) where function findAndReplacePipelineNameWithFoundID (
    func (s *SpinClient) findAndReplacePipelineNameWithFoundID(spinnakerObject map[string]interface{}) (bool, map[string]interface{}) {
    ) never gets called to resolve pipeline id for pipeline: "Finding Pipeline nested"

Expected behavior:

The pipeline stage pointing to an existing should have have pipeline id resolved.

Actual behavior:

The pipeline stage pointing to an existing should have have pipeline id resolved to null.

Reproduces how often:

100%

Versions

Additional Information

Metadata

Metadata

Assignees

Labels

Backend-SpinnakerThe issue is related to the built-in Spinnaker BackendbugSomething isn't workingsaveRelated to "shore save"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions