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

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

Open
1 task done
milindcq opened this issue Aug 9, 2023 · 0 comments
Open
1 task done
Assignees
Labels
Backend-Spinnaker The issue is related to the built-in Spinnaker Backend bug Something isn't working save Related to "shore save"

Comments

@milindcq
Copy link
Contributor

milindcq commented Aug 9, 2023

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

@dkirillov dkirillov changed the title If one or more the pipeline stages in a nested pipeline and the other(s) refers to an existing pipeline. The shore does not resolve the pipelineID (from spinnaker) of an existing pipeline pipelineID is not resolved for existing pipeline when multiple pipeline stages are used Aug 10, 2023
@dkirillov dkirillov added the bug Something isn't working label Aug 10, 2023
@dkirillov dkirillov added save Related to "shore save" Backend-Spinnaker The issue is related to the built-in Spinnaker Backend labels Aug 10, 2023
dkirillov pushed a commit that referenced this issue Aug 10, 2023
…ages (#83)

* remove faulty !hasChildPipelines check

* Fix logging and a mock output

---------

Co-authored-by: Milind Mistry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend-Spinnaker The issue is related to the built-in Spinnaker Backend bug Something isn't working save Related to "shore save"
Projects
None yet
Development

No branches or pull requests

2 participants