Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5839

Potential regressions in relationship validation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      So our tests in PuppetDB have divulged a number of new validation errors, on what seems to be previously legal Puppet code.

      https://jenkins.puppetlabs.com/job/legacy_puppetdb_unit-rspec_puppet-master/label=unit,puppet_branch=master,ruby=ruby-2.0.0-p481/5/console

      This seems to have come about after this change was merged into master:

      https://github.com/puppetlabs/puppet/commit/676f0b7a2d78b2727c991f44e1c23f6df8e5233e

      We found 2 problems that might concern Puppet, and should be treated like potential bugs in the code-base:

      a) Resource relationships to resource aliases no longer seems to work:

      notify { 'a': alias => 'b'} ... notify { 'c': require => Notify['b'] }
      

      b) In the past a trailing forward slash was handled as the same thing, as if it was missing:

      file { '/tmp/': } ... notify { 'a': require => File['/tmp'] } (note the trailing forward slash).
      

      I've written some tests in puppet that confirm this behaviour change:

      https://github.com/kbarber/puppet/commit/76ae1022cc754389bfac157c29159741b523b41d

      I'm fairly certain problem a) is a valid bug. Problem b) however might be first construed as a better behaviour now we validate/stop this, but it might indicate users in the wild will now have failing manifests/code if we don't handle the backwards compatible behaviour - something controversial for a Y or Z release.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ken Ken Barber
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support