git-resource icon indicating copy to clipboard operation
git-resource copied to clipboard

New tags are not found in tasks and jobs after the put

Open ggeorgiev opened this issue 9 years ago • 8 comments

I have a pipeline that has a job that adds a tag to git repo. Following jobs do not see the new tag. Is this becuase of the cache? Is this expected ... or I am doing something wrong.

No idea, what should be the solution for this - maybe a flag that forces to: always fetch --tags.

ggeorgiev avatar Nov 21 '16 04:11 ggeorgiev

Hi there!

We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

The current status is as follows:

  • [ ] #134666129 New tags are not found in tasks and jobs after the put

This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

concourse-bot avatar Nov 21 '16 04:11 concourse-bot

Can you post a snippet of an example pipeline that would illustrate your problem a bit more clearly?

d avatar Nov 30 '16 08:11 d

The pipeline looks like this:

  - task: update_vendor
    config:
      image: some_image
      platform: linux
      inputs:
        - name: original_git
          path: original
      run:
        path: /bin/bash
        args: ["somescript.sh"]
      outputs:
        - name: updated_git
          path: updated

  - put: updated_git
    params: {
      rebase: true,
      repository: updated_git
    }

Where somescript.sh creates the updated git repo based on the original where makes some modifications and/or set tags.

When the tag is on sha that is already versioned from the check the following get for the same version do not see the tag. I think this is because it is obtained from the cache - assuming that once sha is obtained there is no change in the repo that might affect working on such version - this is true if all you care is the code, but not if you look for tags in the repo.

By the way, this will become a big issue when the git-tag semver feature is available - it will make impossible for using the tag from the versioning as well.

If I am right - it is probably a good idea if even when taken from the cache additional fetch of the tags is made - maybe not even optional.

ggeorgiev avatar Nov 30 '16 17:11 ggeorgiev

thinking of dropping concourse from our stack because the newly created tags are not pulled " using version of resource found in cache "

titoc avatar Feb 24 '17 20:02 titoc

i'm having similar issue:

"using version of resource found in cache file not found errored"

... is there a way to clear the build cache?

kokoyu avatar Jul 19 '17 07:07 kokoyu

This is a fundamental problem with using the git resource as anything more than just tracking the commits themselves. If anything we should just change it so that /in never leaves any tags in the fetched tree. They're going to be inaccurate the moment any are added to or removed from the repo; the resource is meant to be tracking trees of a repository, not tags, and thus the caching only needs to be keyed by the sha, as that's all that has any bearing on the resulting tree.

To "fix" this we would need a better characterization of what you're trying to do with tags. It may be that a resource specifically for that workflow would be a better idea.

vito avatar Aug 28 '17 21:08 vito

fixed by https://github.com/concourse/git-resource/pull/223

talset avatar Oct 31 '18 10:10 talset