Feature #12435

Adding alerting support to command line actions

Added by James Turnbull 4 months ago. Updated 3 months ago.

Status:Needs Decision Start date:02/04/2012
Priority:Normal Due date:
Assignee:Randall Hansen % Done:

0%

Category:Faces
Target version:3.X
Affected Puppet version: Branch:https://github.com/jamtur01/puppet/tree/alerting
Keywords:
Votes: 0

Description

Many Puppet command line functions, for example installing, managing or uninstalling a Puppet module are collaborative actions. You often want to share news of these actions with others.

The alerting framework allows you to specify an option, for example --alert to a Face (see the puppet module install and uninstall faces in the attached branch) for this) that executes a script that can alert others to the action, for example send an IRC or Campfire notification when a module is installed or uninstalled.

History

Updated by Daniel Pittman 3 months ago

This needs a decision on the basic structure, and an answer to the questions:

Is this really a way to classify some-but-not-all log messages as needing to be sent to the alert “thing”?

Do we want to expose this only to the external alert script, or to multiple of them?

Do all consumers want the same information?

Updated by Daniel Pittman 3 months ago

Other questions from the code:

The tests you have are good, but they don’t cover the behaviour of the external script:

  • what happens when the external script fails?
  • what happens when the external script is sleep 900?
  • what happens when the external script prints to STDOUT, and to STDERR?

You also don’t test all the current permutations of invocation – I don’t see testing of failonfail true and false differences in behaviour there. (I think that feature should go, but if it stays, it should be tested.)

I don’t see tests that the places invoking the alert do the right thing – the public API needs more testing.

Otherwise, with some polish and a bit more thought about how it interacts with the logging subsystem, seems like a reasonable thing to me. We should probably run this around UX a bit and see what they think.

Updated by Randall Hansen 3 months ago

This is super cool. I’ve always loved VCSs that allowed me to do this. I’ll get together with James to see it in action.

Updated by Daniel Pittman 3 months ago

Randall Hansen wrote:

This is super cool. I’ve always loved VCSs that allowed me to do this. I’ll get together with James to see it in action.

I should clarify: I absolutely support this, and think that adding extension points in the form of “hook” scripts the user can supply on their system is a great way to give them more capabilities than they had before. This is another instance of the same sort of thing, and we do it enough (eg: cloud provisioner, here) that we should start thinking about how it “grows up” to be a first class citizen of extending the system.

Also available in: Atom PDF