Project

General

Profile

Actions

Bug #37979

open

'Failed to parse environment ignore file' error when using Ruby 3+

Added by Romuald Conty 17 days ago. Updated 17 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
easy
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Using Foreman 3.12 under Debian 12 with 'environment ignore file', ie. `/usr/share/foreman/config/ignored_environments.yml`, with this content :

```
:filters:
- !ruby/regexp '/^(?!(profile::|service::))/'
```

When I tried to import Puppet classes, a parsing error is raised.

```
2024-11-05T10:10:40 [W|app|92446c94] Failed to parse environment ignore file
2024-11-05T10:10:40 [I|app|92446c94] Backtrace for 'Failed to parse environment ignore file' error (Psych::DisallowedClass): Tried to load unspecified class: Regexp
92446c94 | /usr/share/foreman/vendor/ruby/3.1.0/gems/psych-5.1.2/lib/psych/class_loader.rb:99:in `find'
```

This is due to the need to allow explicitly loadable classes using YAML Psych parser.

A patch will be proposed.

Actions #1

Updated by Romuald Conty 17 days ago

  • Pull request https://github.com/theforeman/foreman_puppet/pull/411 added
Actions

Also available in: Atom PDF