cloudfoundry / cf-deployment-concourse-tasks

Apache License 2.0
23 stars 75 forks source link

null bug in delete-deployment task #145

Closed bruce-ricard closed 1 year ago

bruce-ricard commented 1 year ago

When attempting to run the delete-deployment task with DELETE_ALL_DEPLOYMENTS set to true, and if your environment doesn't have any deployments, you run into a null error:

++ jq -r '.Tables[].Rows[].name'
jq: error (at <stdin>:7): Cannot iterate over null (null)

Which appears to be coming from this line of code.

I don't know if this ever worked, or if a recent change to the bosh CLI made it break recently.

Here is a fuller log of our task output:

+ '[' true = true ']'
+ bosh_delete_all_deployments
+ local deployments
++ bosh deployments --json
++ jq -r '.Tables[].Rows[].name'
jq: error (at <stdin>:7): Cannot iterate over null (null)
+ deployments=
ctlong commented 1 year ago

@bruce-ricard I've not been able to reproduce this locally, and we haven't seen this error thus far in any of our pipelines.

The next time this occurs, could you please hijack the container and comment here the (sanitized) output of bosh deployments --json 🙏 .

ctlong commented 1 year ago

I'm going to close this issue due to lack of activity. Please feel free to re-open if something changes.