Skip to content

Resource versions created with both SHA1 and tag, preventing tag_filter and tag_regex from working #353

Description

@ankeesler

What happened?

  • With this resource:
  - name: mirrors_github_pinniped
    type: git
    icon: github
    tags: [ pinniped-ci-calatrava ]
    source:
      uri: git@gitlab.whatever.com:akeesler/fake-mirrors_github_pinniped.git
      tag_regex: v[0-9]+\.[0-9]+\.[0-9]+ # e.g., v0.4.1
      private_key: REDACTED
  • I see these resource versions:
    image

  • Because of this, the next vx.y.z tags that I pushed to the repo did not show up as a resource version because the latest resource version has a ref of a SHA1 which filtered out all tags at this line:

    tags=$(git tag --list --sort=creatordate | grep -Ex "$tag_regex" | lines_including_and_after $ref)
    .

What did I expect to happen?

  • I hoped to see only resource versions with a ref matching my tag_regex.

Notes

  • Not sure if this functionality has more to do with this git resource type, or the concourse resource checker.
  • I am working with Concourse 7.0.0 at https://hush-house.pivotal.io.

Activity

  1. ankeesler commented on Mar 9, 2021

    @ankeesler
    Author

    FWIW, I saw this with using tag_filter as well.

      - name: mirrors_github_pinniped
        type: git
        icon: github
        tags: [ pinniped-ci-calatrava ]
        source:
          uri: git@gitlab.whatever.com:akeesler/fake-mirrors_github_pinniped.git
          # Workaround https://github.com/concourse/git-resource/issues/353.  There seems to be an issue
          # with tag_regex, so use tag_filter as a workaround until the tag_regex goes away. Note that
          # this workaround will stop working once we release a v1 version upstream!
          tag_filter: v0.*
          # tag_regex: v[0-9]+\.[0-9]+\.[0-9]+ # e.g., v0.4.1
          private_key: REDACTED
    

    image

  2. changed the title [-]Maybe a bug with tag_regex? Resource versions created with both SHA1 and tag[/-] [+]Resource versions created with both SHA1 and tag, preventing tag_filter and tag_regex from working[/+] on Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions