Skip to content
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

Merged

Conversation

pgier
Copy link
Contributor

@pgier pgier commented Mar 25, 2020

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.

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.
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2020
Copy link
Contributor

@lilic lilic left a 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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2020
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@paulfantom
Copy link
Contributor

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.

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.

@openshift-merge-robot openshift-merge-robot merged commit e597c67 into openshift:master Mar 26, 2020
@lilic
Copy link
Contributor

lilic commented Mar 26, 2020

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.

@s-urbaniak
Copy link
Contributor

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.

@pgier
Copy link
Contributor Author

pgier commented Mar 26, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants