spin icon indicating copy to clipboard operation
spin copied to clipboard

return execution id on pipeline execute command

Open suhrud-kumar opened this issue 5 years ago • 8 comments

We are building a wrapper around spin cli, so if spin cli could execution id then we could use it to poll spinnaker to get the status of the pipeline. Looks like the gate api already returns the pipeline execution id but we are not returning it to user. I made a couple of changes for this to work.

before code changes

spin pipeline execute -a testapp -n samplemicroservice
Pipeline execution started

after

./spin pipeline execute -a testapp -n samplemicroservice
{
 "ref": "/pipelines/01EDK74BBVZ97QPWDXBYWARVH4"
}

I understand the code in gateapi is auto-generated using swagger, so probably something needs to be updated in gate service as well (probably here - https://github.com/spinnaker/gate/blob/master/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/PipelineController.groovy#L198). I'm not well versed with java so I'm not sure what needs to be changed there. I'm updating my code here, so that we know what needs to be changed.

This also fixes - https://github.com/spinnaker/spinnaker/issues/5657

cc: @kevinawoo

suhrud-kumar avatar Jul 19 '20 09:07 suhrud-kumar

The following commits need their title changed:

  • 08032950093a0648014a092b8d08fd56c2d6f6eb: manual fix to return pipeline execution id

  • 1310ceb2fb6d6a9332f6a1feb1bd97b96d4cfe75: return execution id on pipeline execute command

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

spinnakerbot avatar Jul 19 '20 09:07 spinnakerbot

hey @suhrud-kumar you're right that we need to have the fix in gate.

I'm hesitant to merge this because it's going to get dropped in the next release because we just replace the autogenerated code blindly.

yes, I agree. I just updated code here so that it could serve as pointer for what needs to be fixed in gate(which i'm not familiar with). Do you want me to open an issue with gate for this ?

suhrud-kumar avatar Jul 21 '20 18:07 suhrud-kumar

Yeah, you can open a issue in spinnaker/spinnaker to update it and someone else might take it.

kevinawoo avatar Jul 24 '20 18:07 kevinawoo

I don't think this is fixed in the gate yet but I think my PR could help here too: https://github.com/spinnaker/spin/pull/311 we often need to get the execution IDs for pipelines for various reasons too.

Chinikins avatar Dec 04 '20 19:12 Chinikins

Any update on this? Looks like Spin CLI still does not support this. It's a crucial feature.

boonware avatar Sep 03 '21 15:09 boonware

could we update this PR with latest master branch? :pray: Just being able to see the response returned I think would be helpful and enables users to parse it as needed.

Chinikins avatar Nov 05 '22 14:11 Chinikins

Any updates on this? Its a cruical thing to have.

girish-netskope avatar Dec 02 '22 16:12 girish-netskope