concourse icon indicating copy to clipboard operation
concourse copied to clipboard

`clear-resource-cache` does not recognize `instance-var` as a valid Flag

Open reskin89 opened this issue 1 year ago • 2 comments

Summary

I have a set of instanced pipelines. I'd like to clear the resource cache for one of them, but it seems the clear-resource-cache command doesn't recognize instance-var as a flag.

This makes it impossible to clear the resource cache on instanced pipelines.

Steps to reproduce

  1. Create an instanced pipeline utilizing --instance-var
  2. attempt to clear the resource cache of a resource in said instanced pipeline

Expected results

The resource cache of the single instanced pipeline is cleared.

Actual results

error: unknown flag `instance-var'

Additional context

Triaging info

  • Concourse version: 7.6.0
  • Browser (if applicable): N/A
  • Did this used to work? I have utilized instance vars with other commands, this is the first time I have tried it with clear-resource-cache, so I am unsure.

reskin89 avatar Sep 28 '23 20:09 reskin89

So I found that it should be pipelinename/instance-var:value however this still fails with clear-resource-cache:

➜  fly -t ci clear-resource-cache -r REDACTED/repository/team_name:VALUE
error: invalid argument for flag `-r, --resource' (expected flaghelpers.ResourceFlag): instance vars should be formatted as <key1:value1>(,<key2:value2>)

reskin89 avatar Sep 28 '23 20:09 reskin89

I can't reproduce this locally. The command seems working fine.

The format should be something like: fly -t ci clear-resource-cache -r pr/number:8801/unit-image where ci is target, pr is the pipeline name, number:8801 is the instance variable, unit-image is the resource's name.

xtremerui avatar Oct 16 '23 20:10 xtremerui