Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool-resource v1.4.0 does not respect timeout #73

Open
jochenehret opened this issue Oct 24, 2024 · 0 comments
Open

pool-resource v1.4.0 does not respect timeout #73

jochenehret opened this issue Oct 24, 2024 · 0 comments
Labels

Comments

@jochenehret
Copy link

jochenehret commented Oct 24, 2024

Describe the bug

We are observing a strange behaviour on Concourse v7.10.0 with pool-resource v1.4.0. We are trying to acquire locks in our pipeline like this:

resources:
  - name: environment-pool
    type: pool
    icon: cloud-lock-outline
    source:
      uri: https://github.com/org/repo.git
      branch: main
      pool: env-name
      username: ((username))
      password: ((token))

jobs:
- name: environment-acquire-pool
  public: true
  serial: true
  plan:
  - in_parallel:
    - get: some-git-resource
      trigger: true
      passed:
      - some-other-job
    - put: environment-pool
      params: {acquire: true}
    timeout: 4h

Now we see that the "put" step tries to acquire the lock for longer than 4 hours. Eventually, the lock is acquired and the state in the git repo is correctly updated. However, as the timeout is exceeded, Concourse shows the job as failed (red) and downstream jobs are not triggered:

put:
environment-pool

06:34:09 selected worker: concourse-worker-89676c5bd-pm9js
06:34:10 acquiring lock on: env-name
06:34:10 waiting for lock
12:20:52 ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
12:20:52 acquired!

timeout exceeded

The expectation is that the jobs fails after 4 hours and the lock is not acquired.

Reproduction steps

Create a pipeline with the resource and job shown above.
Put the lock in "claimed" state.
Trigger the "acquire-pool" job.
Wait until timeout has passed.
Put the lock in "unclaimed" state.
The "acquire-pool" job should now claim the lock and fail.

Expected behavior

When the timeout has passed, the acquire job should fail and should not make any changes on the pool's state.

Additional context

On Concourse v7.9.0 with pool-resource v1.3.1 we don't observe this behaviour.

jochenehret added a commit to cloudfoundry/capi-ci that referenced this issue Dec 3, 2024
* this version is hopefully not affected by the timeout issue: concourse/pool-resource#73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant