concourse / pool-resource

atomically manages the state of the world (e.g. external environments)
Apache License 2.0
54 stars 36 forks source link

`get` on a pool-resource should work when there is only one commit #29

Open geofffranks opened 7 years ago

geofffranks commented 7 years ago

Made my pool repo, added all the locking pools to it, and committed. This was the only commit on the repo. gets failed with:

Cloning into '/tmp/build/get'...
106cfe8 Added lock pools
fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
BusyBox v1.26.2 (2017-05-03 17:12:34 UTC) multi-call binary.

Usage: basename FILE [SUFFIX]

Strip directory path and .SUFFIX from FILE
maltevw commented 4 years ago

Is there a fix to this? Just encountered the same problem and didnt find a solution so far.

andrew-edgar commented 4 years ago

This happens when we upgraded to 6.3. now all our pool locks are failing. I think this is also an issue with defaulting to depth: 1.

We need this fixed ASAP. how can we use an older version of the pool resource?

andrew-edgar commented 4 years ago

I can fix the "get" by setting depth: 5 but depth is not a param on the "put" and the child "get" of the put now fails because of this same error!

markround commented 4 years ago

@andrew-edgar

Same issue here. Upgrading to Concourse 6.3.0 breaks all my lock pools. It looks like the change was reverted recently and the fix is in the 1.1.3 release of the resource. As a workaround, until the fixed resource is included in an official Concourse release, you can specify the fixed version at the top of your pipeline:

resource_types:
- name: pool
  type: docker-image
  source:
    repository: concourse/pool-resource
    tag: "1.1.3"

This works fine for me on 6.3.0.