Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

rollout_helper.py usage of yaml.load deprecated #738

Closed
AndrewJackson2020 opened this issue Feb 3, 2024 · 1 comment
Closed

rollout_helper.py usage of yaml.load deprecated #738

AndrewJackson2020 opened this issue Feb 3, 2024 · 1 comment
Assignees

Comments

@AndrewJackson2020
Copy link
Contributor

As in the title the usage of yaml.load is deprecated in the rollout_helper.py file. Currently raises a warning but should be an easy one line fix although there are a number of ways to fix it. See link below for more information on the deprecation. Happy to submit a PR later.

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

./pgwatch2/metrics/00_helpers/rollout_helper.py --config-path ./pgwatch2/config/ --mode yaml-all
>> starting in DRY-RUN mode, add --confirm to execute
>> /root/repos/public/pgwatch2/./pgwatch2/metrics/00_helpers/rollout_helper.py:203: YAMLLoadWarning: calling yaml.load() without >>Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
>>  monitored_dbs = yaml.load(config)
>> *** ROLLOUT TO TARGET DB-s ***
>> DB #0: [test1] failed to determine pg version for localhost@5432, skipping rollout
@pashagolub
Copy link
Collaborator

Thanks. Please feel free to contribute a fix.

Thanks in advance!

@pashagolub pashagolub self-assigned this Feb 6, 2024
@github-project-automation github-project-automation bot moved this to Todo in pgwatch2 Feb 6, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in pgwatch2 Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants