Skip to content

Incompatibility with Puppet 8 (Puppet::Pops::Evaluator::DeferredValue) #167

@fetzerms

Description

@fetzerms

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 8.0.0
  • Ruby: 3.2.2 (packaged with puppet)
  • Distribution: Debian 11.6
  • Module version: 4.4.0

How to reproduce (e.g Puppet code you use)

class { 'profile::docker':
  manage_iptables => false,
}

ensure_packages(['git-lfs', ], { 'ensure' => 'present' })

class { 'gitlab_ci_runner':
    runners => {
      "${facts['networking']['fqdn']}" => {
        'registration-token' => 'myregtoken',
        'url'                => 'mygitlabhost',
        'tag-list'           => "docker,${facts['os']['family']}",
        'executor'           => 'docker',
        'docker'             => {
          'image'      => 'debian:latest',
          'privileged' => true,
        },
      },
    },
  }
}

What are you seeing

When executing the agent, it fails when using the Deferred function:

Error: /Stage[main]/Gitlab_ci_runner::Config/Concat[/etc/gitlab-runner/config.toml]/Concat_file[/etc/gitlab-runner/config.toml]: Failed to generate additional resources using 'eval_generate': no implicit conversion of Puppet::Pops::Evaluator::DeferredValue into String

What behaviour did you expect instead

It should not abort. Pre-Puppet v8.0 this has been working fine

Output log

See above.

Any additional information you'd like to impart

I was able to pin the issue to the Deferred calls for register_to_file (and to_toml):

https://github.com/voxpupuli/puppet-gitlab_ci_runner/blob/master/manifests/runner.pp#L92
https://github.com/voxpupuli/puppet-gitlab_ci_runner/blob/master/manifests/runner.pp#L107

But I did not (yet) find a better way on how to handle this. At least to me, it seems that this should/must work.

I'm not sure whether it's an issue in the underlying Concat-Module or if its the way Deferred functions are used here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions