Skip to content

Stateful Hooks #80

Closed
Closed

Description

@robdimsdale

Other CI systems have features like "perform some action (e.g. email/slack) on every failure and once when the build is fixed, but not every time the build passes."

Is something similar planned for concouse

Activity

  1. changed the title [-]Stateful[/-] [+]Stateful Hooks[/+] on Jul 23, 2015
  2. concourse-bot commented on Jul 23, 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:

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

  3. added a commit that references this issue on Aug 17, 2016
  4. osis commented on Mar 16, 2017

    @osis
    Contributor

    @robdimsdale do the on_success on_failure hooks fulfill this need?

  5. robdimsdale commented on Mar 16, 2017

    @robdimsdale
    ContributorAuthor

    @osis no - the intention here is to be able to capture scenarios like:

    • this job passed on the most recent run, and because the previous run failed I will send an email
    • this job passed on the most recent run, but because the previous run succeeded I will not send an email

    The challenge here is that the existing hooks like on_failure and on_success are stateless; they do not take into account any history. This is by design, and makes concourse much simpler, but also much less powerful.

    I've used this proposed feature on other CI tools with success - I think there's a lot of value in this conditional notification.

  6. fiddlerpianist commented on Mar 16, 2017

    @fiddlerpianist

    Wouldn't it be simpler for the statefulness to exist in a resource that provides input to the task that is called from on_failure or on_success? That way, you're keeping the state in the resource (where it belongs).

  7. robdimsdale commented on Mar 16, 2017

    @robdimsdale
    ContributorAuthor

    @fiddlerpianist yes, that would be simpler from concourse's perspective, and I agree would fit much more cleanly into the stateless architecture of concourse.

    Except now we have to extend each and every resource with this feature. Instead of consolidating this logic in once place we have to re-invent it multiple times. Once for the email resource, once for slack resource, etc.

    To be clear, I don't expect this feature to land precisely because it's quite far from concourse's current architecture and philosophy, but it's a feature I miss from other CI systems, and I think there's value in capturing this conversation in a public form for future reference.

  8. jama22 commented on Aug 9, 2017

    @jama22

    Hi there, while it is very interesting to do, there isn't much traction on this so we're closing it for now.

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