Skip to content

tag_filter and tag_regex won't ignore whitespace-only values #428

Open
@risicle

Description

@risicle

Describe the bug

A tag_filter or tag_regex value of e.g. a single space will activate the filtering mechanism.

Why does this matter? AWS SSM Parameter Store won't accept zero-length strings as values, so without some trickery it's not possible to add an "optional" tag filter variable to your reusable pipeline if you're using parameter store.

I say "without some trickery" because I think I've found a workaround: setting the parameter store value to a single newline character which does seem to get stripped somewhere along the line and allow the filter to be disabled this way. But I suspect this is fragile and by no means guaranteed behaviour, so it would be nice to ensure this works without trickery.

Reproduction steps

  1. Be using Parameter Store as your credentials backend
  2. Configure a git-resource with e.g. tag_filter: ((pipeline_tag_filter))
  3. Set the appropriate pipeline_tag_filter parameter store value to a single space
  4. Watch the checks ignore untagged commits

Expected behavior

All commits should be picked up.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions