puppetlabs / puppetlabs/puppetlabs-docker
docker_stack uses outdated way of using psych's YAML.safe_load
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 94
- Forks
- 337
- Avg merge
- 11d 15h
- Merged PRs (30d)
- 2
Description
Describe the Bug
This module inherited a bug in PDK which causes the docker_stack resource to ungracefully fail with a "wrong number of arguments" error while calling psych's YAML.safe_load.
See the following issues:
https://github.com/puppetlabs/pdk/issues/1143
https://github.com/ruby/psych/discussions/571
It looks like this issue was fixed in 2021, however, this module is still using the old way of calling safe_load in both of these resources. Any recent installation of psych (which is a dependency of the PDK) will error out.
Expected Behavior
I should be able to use docker_stack without an error.
Steps to Reproduce
Deploy a docker_stack resource with a version of psych greater than 4 on the host system. You can see the version of the gem installed in /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems although your installed version of ruby may be different.
Environment
- Version 9.1
- Platform Ubuntu 22
Additional Context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docker_stack resources and locate both YAML.safe_load calls. Reproduce with Psych greater than 4 on the stated Ubuntu 22 environment, then verify the docker_stack resource completes without the wrong-number-of-arguments error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, ruby
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100