New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hack/merge_cluster_roles.py: fix deprecation warnings #724
hack/merge_cluster_roles.py: fix deprecation warnings #724
Conversation
Newer versions (>= 5.1) of python-yaml (pyyaml) deprecate calling yaml.load() with no Loader argument. https://msg.pyyaml.org/load This fixes deprecation warnings in merge_cluster_roles.py and uses the SafeLoader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL we have this :D Do you mind opening a tech-debt issue to rewrite this in something that is not python, I am fine with bash. Thanks!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lilic, pgier The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
Personally I don't see why we need to rewrite it to anything. Python is well suited for parsing and outputting yaml (in contrast to bash) and we don't need anything fancy here. |
Hard to maintain as we are not primarily python developers. Its tech-debt only, and of course team decides if we want to do it? But up to you two, I have not the strongest of feelings around this. |
I think i suggested once to rewrite this in Go, and that suggestion was also rejected. I am also fine with leaving this in Python. |
I'd like to open a tech debt issue anyway, since this script is depending on python2 which is now deprecated, and python2 seems to be available in the build/ci container kind of only by chance. |
Newer versions (>= 5.1) of python-yaml (pyyaml) deprecate calling yaml.load() with no Loader argument.
https://msg.pyyaml.org/load
This fixes deprecation warnings in merge_cluster_roles.py and uses the
SafeLoader.