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

rollout_helper.py usage of yaml.load deprecated  #738

@AndrewJackson2020

Description

@AndrewJackson2020

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

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions