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

[PLINT-265] Update pyvmomi to 8.0.2.0.1 #16542

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Conversation

sarah-witt
Copy link
Contributor

@sarah-witt sarah-witt commented Jan 5, 2024

What does this PR do?

Updates pyvmomi to the next major version and newest release

Motivation

Support for new API parameters added in recent releases and eventual support for vSphere 8

Additional Notes

the major upgrade to 8.x (vmware/pyvmomi@a90023f#diff-5a4a25310fcd77c939492db13158e8639be94c33532b071817930805a7be554b) includes removal of the ParserError class. Handling this error was added in #6658 to account for this issue.

ParserError was used as a catch-all parsing excepting in ParseData, which was removed from Deserialize in the new version of the library

def Deserialize(data, resultType=object, stub=None):
   parser = ParserCreate(namespace_separator=NS_SEP)
   ds = SoapDeserializer(stub)
   ds.Deserialize(parser, resultType)
   ParseData(parser, data)
   return ds.GetResult()

-->

def Deserialize(data, resultType=object, stub=None):
    parser = ParserCreate(namespace_separator=NS_SEP)
    ds = SoapDeserializer(stub)
    ds.Deserialize(parser, resultType)
    if isinstance(data, six.binary_type) or isinstance(data, six.text_type):
        parser.Parse(data)
    else:
        parser.ParseFile(data)
    return ds.GetResult()

This issue seems like the equivalent error thrown in pyvmomi 8.x: vmware/pyvmomi#1016. This comment from the older issue vmware/pyvmomi#190 (comment) references the KeyError thrown by GuessWsdlType, which is the resulting error thrown in issue 1016. This is why I've changed our error handling to catch KeyErrors instead.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

@sarah-witt sarah-witt changed the title Update pyvmmomi Update pyvmomi Jan 5, 2024
@sarah-witt sarah-witt changed the title Update pyvmomi Update pyvmomi to 8.x Jan 5, 2024
Copy link

github-actions bot commented Jan 5, 2024

Test Results

    8 files      8 suites   7m 13s ⏱️
  278 tests   277 ✅ 1 💤 0 ❌
1 116 runs  1 108 ✅ 8 💤 0 ❌

Results for commit 70bb3cc.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (110cec7) 90.54% compared to head (70bb3cc) 90.64%.
Report is 13 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
presto ?
solr ?
tomcat ?
vsphere 95.96% <100.00%> (+0.05%) ⬆️
weblogic ?

Flags with carried forward coverage won't be shown. Click here to find out more.

@sarah-witt sarah-witt changed the title Update pyvmomi to 8.x [PLINT-265] Update pyvmomi to 8.x Jan 5, 2024
@sarah-witt sarah-witt changed the title [PLINT-265] Update pyvmomi to 8.x [PLINT-265] Update pyvmomi to 8.0.2.0.1 Jan 5, 2024
@sarah-witt sarah-witt merged commit 07ac11b into master Jan 18, 2024
42 checks passed
@sarah-witt sarah-witt deleted the sarah/update-pyvmomi branch January 18, 2024 16:18
sarah-witt added a commit that referenced this pull request Jan 25, 2024
* Update pyvmmomi

* update to throw type error

* change to key error

* Add changelogs
sarah-witt added a commit that referenced this pull request Jan 31, 2024
* Update pyvmmomi

* update to throw type error

* change to key error

* Add changelogs
sarah-witt added a commit that referenced this pull request Jan 31, 2024
* Update pyvmmomi

* update to throw type error

* change to key error

* Add changelogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants