The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Feature #16647

Client-side soft alternative to fail()

Added by Dan Carley over 3 years ago. Updated over 2 years ago.

Status:Needs DecisionStart date:10/01/2012
Priority:NormalDue date:
Assignee:eric sorenson% Done:

0%

Category:functions
Target version:-
Affected Puppet version: Branch:
Keywords:soft fail immutable

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1396


Description

It would be useful to have a softer alternative to fail() which could client-side fail individual resources and those that depend on them, rather than server-side aborting the entire catalog compilation.

An example use case could be a parameterised class that validates the values it receives. If given invalid values then you would want to generate a real error and prevent the resources (plus reverse dependencies) from being created or modified. But you wouldn’t necessarily want to stop the rest of the catalog from being enforced in the meantime.

History

#1 Updated by Dan Carley over 3 years ago

I guess this would require a new attribute being added to resources in the catalog.

#2 Updated by Nigel Kersten over 3 years ago

  • Category set to functions
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to eric sorenson

#3 Updated by Nigel Kersten over 3 years ago

Thinking about this, it doesn’t have to require client-side functions.

We could have a function that inserted a resource that always fails into the graph at the relevant spot.

#4 Updated by Dan Carley over 3 years ago

That makes sense. Having that resource akin to something between error() and notify{} would make the overall error pretty understandable too.

#5 Updated by Dennis Benzinger | hybris over 2 years ago

Redmine Issue #16647 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1396

Also available in: Atom PDF