Concourse: To support empty tags

Created on 24 Mar 2020  路  3Comments  路  Source: concourse/concourse

Bug Report

We received a use case from our users about pipeline templating. The users want to use var for tags, like:

- task: some-task
  tags: [((worker-tag))]
  ...

Then the var will be given from a var file as:

worker-tag: "a"

which works properly to direct the task to a "a" worker.

But if task needs to go to the default worker pool, specifying

worker-tag: ""

doesn't work. The error is no workers satisfying: resource type 'registry-image', platform 'linux', tag ''

Steps to Reproduce

  1. Add tags: [""] to a task.
  2. Then run the job.

Expected Results

We expect the empty tag "" to be considered as null tag, and be ignored.

Actual Results

"" is considered as a meaning tag, thus cannot match to any worker.

Version Info

  • Concourse version: 5.8.0
  • Did this used to work? No
bug

Most helpful comment

I just tried, that works.

All 3 comments

Would an acceptable alternative be to specify the array?:

tags: ((worker_tags))

+

worker_tags: []

I just tried, that works.

@vito this is a great solution. I think this might be a helpful tip to put in the documentation somewhere.

Was this page helpful?
0 / 5 - 0 ratings