concourse / time-resource

a resource for triggering on an interval
Apache License 2.0
44 stars 32 forks source link

Not working in Concourse 6 #57

Open pikesley opened 3 years ago

pikesley commented 3 years ago

Hi

We've just upgraded to Concourse 6.7 (from 5.8), and time-triggered pipelines that worked fine in 5 are now broken. I have some pipelines that are set to run every 5 minutes that are now launching once an hour.

I've setup a very simple pipeline to demonstrate what I mean:

jobs:
- name: do-something
  plan:
  - get: timed-run
    trigger: true
  - get: ubuntu
  - config:
      platform: linux
      run:
        args:
        - hello world
        path: echo
    image: ubuntu
    task: print-words
resources:
- icon: alarm
  name: timed-run
  source:
    interval: 1m
  type: time
- name: ubuntu
  source:
    repository: ubuntu
  type: docker-image

When I deploy this, the timed-run resource immediately shows checked successfully but does not trigger the job. When I force a check, the job is eventually triggered, but then the resource sits and waits, seemingly forever. It currently says

checked | 8m 24s ago

EDIT: I went to lunch and left it running and it seems to have run after roughly an hour, which I guess is the default?

Am I doing something wrong? Has something changed? Please help, this is breaking quite a few workflows now

Thanks

Sam

skreddy6673 commented 3 years ago

@pikesley Try adding check_every.

clarafu commented 2 years ago

@pikesley Do you have global-resources enabled? Also, are those resources sharing the same resource configuration as other resources? (for ex, you have a lot of resources in your deployment that point to the same docker registry)

iomarcovalente commented 2 years ago

@pikesley Try adding check_every.

This is what worked for me. This led me to check what Global Env Var I have set and surely enough I found: CONCOURSE_RESOURCE_CHECKING_INTERVAL=12h

I guess by setting it on the resource it overrides that Default Env Var:

resources:
- name: my-timer
  type: time
  check_every: 1m
  source:
    interval: 120s
    location: Europe/London