Skip to content

puppet 7.29.0 and 8.5.0 sink my arithmetic battleship! #9268

Closed
@jhoblitt

Description

@jhoblitt

Describe the Bug

Using a negative value with the Integer type assertion on a class causes a rather surprising pops error.

Example code which triggers the error:

  Integer[-1] $slowlog_log_slower_than                           = 10000,

from

https://github.com/voxpupuli/puppet-redis/blob/e8ca35a403653a2dac60dd93afd33cca4f9c2d2e/manifests/init.pp#L432

causes

       error during compilation: The parameter '$slowlog_log_slower_than' must be a literal type, not a Puppet::Pops::Model::AccessExpression (file: /home/jhoblitt/github/lsst-control/spec/fixtures/modules/redis/manifests/init.pp, line: 432, column: 15) on node foreman.cp.lsst.org

Expected Behavior

I expect my battleship to float!

Steps to Reproduce

Steps to reproduce the behavior:

  1. configure CI with a pessimistic version constraint which allows 7.29.0
  2. have code which uses Integer[<a filthy no good negative integer>]
  3. run ci

Environment

  • Version 7.29.0
  • gha ubuntu latest runner

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedJira issue has been created for this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions