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

Replicate base resource for lists functionality #89

Merged
merged 6 commits into from
May 5, 2021

Conversation

gravesm
Copy link
Member

@gravesm gravesm commented Apr 28, 2021

SUMMARY

This replicates specific functionality from the openshift client to more
reliably retrieve the base resource from a resource list.

This addresses part of #34. The specific change to the underlying client being made is here: https://github.com/kubernetes-client/python-base/pull/186/files. The rest of the changes are made to deal with the inheritance chain and hardcoding of the class.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

N/A

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #89 (aab56b9) into main (fc80540) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #89   +/-   ##
=======================================
  Coverage   24.02%   24.02%           
=======================================
  Files           1        1           
  Lines         154      154           
  Branches       29       29           
=======================================
  Hits           37       37           
- Misses        111      112    +1     
+ Partials        6        5    -1     
Impacted Files Coverage Δ
...ections/kubernetes/core/plugins/action/k8s_info.py 24.02% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc80540...aab56b9. Read the comment docs.

@gravesm gravesm requested review from goneri, abikouo and Akasurde April 30, 2021 15:27
@@ -9,4 +9,8 @@ molecule/default/roles/helm/files/appversionless-chart/templates/configmap.yaml
molecule/default/roles/helm/files/test-chart-v2/templates/configmap.yaml yamllint!skip
molecule/default/roles/helm/files/test-chart/templates/configmap.yaml yamllint!skip
plugins/module_utils/k8sdynamicclient.py import-2.7!skip
plugins/module_utils/k8sdynamicclient.py import-3.7!skip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised with cannot import with Python 3.7. Do we use some python 3.8+ features?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is needed because of the bare imports in the new files. We had to do the same thing previously for the k8sdynamicclient.py.

Copy link
Contributor

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gravesm
Copy link
Member Author

gravesm commented May 4, 2021

@alinabuzachis good suggestion. I had to make a few changes to get the unit tests to work.

@@ -0,0 +1,49 @@
# Copyright [2017] [Red Hat, Inc.]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2021?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, no idea. I'm going off what I think @Akasurde said in earlier PRs for this client migration work.

Copy link
Member

@goneri goneri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing really important, LGTM.

gravesm added 4 commits May 4, 2021 14:46
This replicates specific functionality from the openshift client to more
reliably retrieve the base resource from a resource list.
@gravesm gravesm merged commit 2b6a989 into ansible-collections:main May 5, 2021
@gravesm gravesm deleted the resource-lists branch May 5, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants