Page MenuHomePhabricator

PendingDeprecationWarning on update_version.py
Open, Stalled, Needs TriagePublic

Description

Running tox in the deployment-charts repo gives the following PendingDeprecationWarning

update_version.py:70: PendingDeprecationWarning:
  load will be removed, use

    yaml=YAML(typ='unsafe', pure=True)
    yaml.load(...)

  instead
    data = ruamel.yaml.load(

Event Timeline

Change 803886 had a related patch set uploaded (by Samtar; author: Samtar):

[operations/deployment-charts@master] update_version.py: Resolve PendingDeprecationWarning

https://gerrit.wikimedia.org/r/803886

TheresNoTime changed the task status from Open to Stalled.Jul 5 2022, 10:48 AM

Stalling on figuring out resolution to this comment:

This looks good to me but before merging we need to update to the newest version of ruamel on the integration agents. It's installed via puppet (https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/refs/heads/production/modules/profile/manifests/ci/pipeline/publisher.pp) and I'm not sure how to update it.

Stalling on figuring out resolution to this comment:

This looks good to me but before merging we need to update to the newest version of ruamel on the integration agents. It's installed via puppet (https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/refs/heads/production/modules/profile/manifests/ci/pipeline/publisher.pp) and I'm not sure how to update it.

packages.debian.org has newer versions for each OS - https://packages.debian.org/buster/python3-ruamel.yaml

I imagine this just needs puppet telling to pull the package from somewhere with a more recent version. It might be better to copy it to apt.wikimedia.org rather than pull a package from the bookworm repo directly.

I saw a question on IRC about which version is needed. According to the docs, https://pypi.org/project/ruamel.yaml/ version 0.16.0 or greater would work

@jeena

Debian buster has 0.15.34 and Debian bullseye has 0.16.12.

The puppet line "ensure_packages('python3-ruamel.yaml')" just tells it to make sure to get that package, in whatever version.

The package does not exist in our own Wikimedia APT repo.

Unless we specifically import the package from another repo or build it manually, it will just get whatever is in the distro in the version that the contint server is on.

::profile::ci::pipeline::publisher is included in the role::ci::master and that is on the servers contint1001 and contint2001. These servers are on buster. So only 0.15.

So this is equivalent to "upgrade contint* servers to bullseye" which would fix it naturally or "backport ruamel.yaml to buster and import into our repo.

@Dzahn I was only commenting to provide information that in order to merge the patch in question, a different version would be needed, and finding out what version that would be if we were to do so, not to make a decision on whether or how to upgrade.

Looking back at my comment I can see how my wording made it seem otherwise.

@jeena And I just wanted to answer the question I saw "I'm not sure how to update it." literally. That is what is needed to update it. Also doesn't include any decisions how to get there and when from my side. All good. Cheers.

👍 thanks @Dzahn, sorry for the misunderstanding

Change 803886 abandoned by Samtar:

[operations/deployment-charts@master] update_version.py: Resolve PendingDeprecationWarning

Reason:

https://gerrit.wikimedia.org/r/803886