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

Build links for instanced pipelines don't work #148

Closed
jamiegosling opened this issue Feb 9, 2024 · 8 comments · Fixed by #153
Closed

Build links for instanced pipelines don't work #148

jamiegosling opened this issue Feb 9, 2024 · 8 comments · Fixed by #153
Labels
good first issue Good for newcomers

Comments

@jamiegosling
Copy link

We use Instanced Pipelines, and the build links we get for them in GitHub don't appear to work. Here is an example of a link from cogito:

https://concourse/teams/teamname/pipelines/pipeline_name/jobs/job_name/builds/5?vars=%7B%22DEPLOYMENTID%22%3A%222%22%2C%22DESC%22%3A%22Daily+tests+for+Preprod+2%22%2C%22TITLE%22%3A%22PREPROD+TESTS%22%7D

an example of a working link for the above build

https://concourse/teams/teamname/pipelines/pipeline_name/jobs/job_name/builds/5?vars.DEPLOYMENTID=%222%22&vars.DESC=%22Daily%20tests%20for%20Preprod%202%22&vars.TITLE=%22PREPROD%20TESTS%22

@marco-m-pix4d
Copy link
Contributor

marco-m-pix4d commented Feb 12, 2024

Hello @jamiegosling, thanks for reporting.
Sounds unexpected to me, I remember this was working 🤔
The code in question is

cogito/cogito/putter.go

Lines 336 to 340 in 9328bb4

// BUILD_PIPELINE_INSTANCE_VARS: {"branch":"stable"}
// https://ci.example.com/teams/main/pipelines/cogito/jobs/autocat/builds/3?vars=%7B%22branch%22%3A%22stable%22%7D
if env.BuildPipelineInstanceVars != "" {
buildURL += fmt.Sprintf("?vars=%s", url.QueryEscape(env.BuildPipelineInstanceVars))
}

What is the cogito version you are using? You can see it as the first line output of any step:

[INFO]  cogito: This is the Cogito GitHub status resource.
    Tag: 0.12.0, commit: a18efc3, build date: 2023-11-03

@marco-m-pix4d marco-m-pix4d added the good first issue Good for newcomers label Feb 12, 2024
@jamiegosling
Copy link
Author

jamiegosling commented Feb 12, 2024

Hi @marco-m-pix4d,

Looks like we're on the latest version:

This is the Cogito GitHub status resource. Tag: 0.12.0, commit: a18efc3, build date: 2023-11-03

Looking at it I wonder if it needs a function to convert the JSON instance vars into URL parameters in the format vars.parameter1=value1&parameter2=value2?

@aliculPix4D
Copy link
Contributor

aliculPix4D commented Feb 22, 2024

Sounds unexpected to me, I remember this was working

@marco-m-pix4d can it be that it changed depending on the Concourse version? this is still "experimental" feature subject to changes.

Instanced Pipelines/Instance Groups are currently experimental, and are subject to change.

@jamiegosling just curious a bit, which Concourse version you are using?

@marco-m-pix4d
Copy link
Contributor

can it be that it changed depending on the Concourse version?

Possible. In any case, this makes me think that in general from Cogito we could hit a Concourse endpoint that returns its version and log it, this could be helpful for troubleshooting in general...

@aliculPix4D
Copy link
Contributor

Possible. In any case, this makes me think that in general from Cogito we could hit a Concourse endpoint that returns its version and log it, this could be helpful for troubleshooting in general...

Yes, we have it in header of every request.

X-Concourse-Version: 7.X.X

@marco-m-pix4d
Copy link
Contributor

marco-m-pix4d commented Feb 22, 2024

Ah even better! Good catch.

@jamiegosling
Copy link
Author

Sounds unexpected to me, I remember this was working

@marco-m-pix4d can it be that it changed depending on the Concourse version? this is still "experimental" feature subject to changes.

Instanced Pipelines/Instance Groups are currently experimental, and are subject to change.

@jamiegosling just curious a bit, which Concourse version you are using?

@aliculPix4D we are using Concourse v7.10.0

@aliculPix4D
Copy link
Contributor

My attempt to fix this: #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants