Skip to content

trigger on new upstream build (same resource versions) #92

Closed

Description

@dliebreich

We have a job sequence a->b->c->d, where if d fails, we want to rerun a, b, c, and d. Re-running a does not trigger b because the resource versions have not changed. So we have to re-run a, wait for it to finish, re-run b, wait, re-run c, wait, and re-run d.

We would like concourse to re-run b, c, and d without manual intervention when we re-run a.

Activity

  1. concourse-bot commented on Jul 31, 2015

    @concourse-bot

    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:

    • #100265590 trigger on new upstream build (same resource versions)

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

  2. paulieborg commented on Jul 25, 2016

    @paulieborg

    Hi there. I have a similar related issue. I use the pipeline for orchestration of cloud formation tasks whereby I tear down the infrastructure each night and want to rebuild from scratch each morning. I can use a time trigger which will happily invoke the first job but subsequent jobs don't activate as the sha on the input repo hasn't changed. I want to rebuild similar a->b->c without change to input resource.

  3. vito commented on Jul 25, 2016

    @vito
    Contributor

    @paulieborg I don't think that's a good idea. Pipelines are a dependency chain; if no dependencies between jobs are new, the downstream job shouldn't trigger. Even as an opt-in feature I think it would do a disservice to the mental model.

    If something has changed in the real world but the resources aren't expressing that, it sounds like something is either being done by resources out-of-band (i.e. tasks, which should not have side-effects in the mental model) or a resource is not sufficiently capturing the external state in its version.

  4. paulieborg commented on Jul 25, 2016

    @paulieborg

    Heh @vito - thanks for the response. I've had similar feedback from peers and I can work around this using the feature listed here:
    https://github.com/starkandwayne/concourse-tutorial/tree/master/12_publishing_outputs
    It allows me to start the pipeline by forcibly pushing a change to the repo and causing subsequent dependencies to be triggered after. It is not completely ugly.
    I was more curious if there was an option to trigger a job, simply based on the prior job succeeding and 'ignore' the fact that the resource has not changed. This is for my specific use case but I can think of some others that are not unheard of:
    Re-run a same version deployment job + smoke tests because a target system was lost.
    Re-run a set of dependent test jobs again to see if they fail a second time.
    Re-run a dependency job chain to simply check if a target state has changed (and fail if it has)

    I'm willing to accept I'm doing it wrong so don't take this as disagreement - more that the current model doesn't suit my use case and I might need to consider a different tool.

    Thanks again

  5. vito commented on Aug 8, 2016

    @vito
    Contributor

    @paulieborg A reasonable way to do those kinds of things (which I would argue that, again, are pointing at something missing with the use of resources) may be to shim in a time resource as an output of the upstream job, and have downstreams dependent on it. This expresses that at least some change has happened over time and that dependents should update.

    For example:

    resources:
    - name: force
      type: time
      source: {interval: 24000h} # ideally this could be disabled
    
    jobs:
    - name: a
      plan:
      - # ... do stuff ...
      - put: force
    
    - name: b
      plan:
      - get: force
        passed: [a]
        trigger: true
      - # ... do stuff ...
      - put: force
    
    - name: c
      plan:
      - get: force
        passed: [b]
        trigger: true
      - # ... do stuff ...
      - put: force

    I'm gonna close this issue for now though since I think we've covered it pretty well and why we won't bake this in as a first-class feature. The above seems like a reasonable workaround.

  6. added a commit that references this issue on Aug 17, 2016
  7. added a commit that references this issue on Dec 30, 2016
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