Project

General

Profile

Bug #11782

Puppet override with invalid hash array doesn't give error

Added by Jon Skarpeteig almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart Variables
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When modifying Puppet class changing default value to a hash with invalid syntax - there's an error.

When editing a host definition editing the same value - the submit/save completes successfully, while ignoring the (invalue) value entered.

This in turn leads to confusion as it seems as if the host override completed successfully when in fact it did not.


Related issues

Related to Foreman - Bug #11375: Smart class parameters turn YAML to string when using a multi line yamlClosed2015-08-16

Associated revisions

Revision 00335956 (diff)
Added by Dominic Cleal almost 4 years ago

fixes #11375, #11782 - validate a host's lookup_values

Enabling validation ensures the casting and validation within
LookupValue runs during host/hostgroup save. Tweaks to hostgroup
cloning ensure that the newly cloned hostgroup now passes validation
when it has associated lookup values.

Don't show any LookupValue#match errors in the host/hostgroup forms
as the value is autogenerated by the nested attribute setter.

Revision e476ae3a (diff)
Added by Dominic Cleal almost 4 years ago

fixes #11375, #11782 - validate a host's lookup_values

Enabling validation ensures the casting and validation within
LookupValue runs during host/hostgroup save. Tweaks to hostgroup
cloning ensure that the newly cloned hostgroup now passes validation
when it has associated lookup values.

Don't show any LookupValue#match errors in the host/hostgroup forms
as the value is autogenerated by the nested attribute setter.

(cherry picked from commit 003359564b4ab5fa8198cc9b035df405e7e600cd)

History

#1 Updated by Jon Skarpeteig almost 4 years ago

  • value entered.

#2 Updated by Dominic Cleal almost 4 years ago

  • Category set to Smart Variables

#3 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #11375: Smart class parameters turn YAML to string when using a multi line yaml added

#4 Updated by Dominic Cleal almost 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#5 Updated by The Foreman Bot almost 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2755 added
  • Pull request deleted ()

#6 Updated by Dominic Cleal almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#7 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 63

Also available in: Atom PDF