puppetlabs / puppetlabs-apt

Puppet module to help manage Apt
https://forge.puppetlabs.com/puppetlabs/apt
Apache License 2.0
215 stars 462 forks source link

Regex for ppa name issues with dotted versions #1057

Closed gsperry2011 closed 1 year ago

gsperry2011 commented 1 year ago

Describe the Bug

This is a valid PPA name from the MAAS documentation: ppa:maas/3.1 but does not pass the regex validation in ppa.pp due to the . in the version number 3.1.

Found from the docs here: https://maas.io/docs/how-to-install-maas

Expected Behavior

It should pass regex checks and be added as normal

Steps to Reproduce

Steps to reproduce the behavior: call this resource:

  apt::ppa { "ppa:maas/3.1": }

Environment

This should be effecting all versions

Additional Context

Issue is here: https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/ppa.pp#L43

elfranne commented 1 year ago

The change was introduced in https://github.com/puppetlabs/puppetlabs-apt/pull/1052 by @chelnak

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Invalid PPA name: ppa:vbernat/haproxy-2.6 (file: /etc/puppetlabs/code/environments/testapt/modules/apt/manifests/ppa.pp, line: 44, column: 5)