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

Fix custom resources deletion and update dependencies #133

Merged
merged 2 commits into from
Dec 14, 2020

Conversation

seleznev
Copy link
Collaborator

After upgrade k8s client to 12.0.0 in #132 deletion custom objects doesn't work anymore:

2020-12-11 02:22:14 INFO:k8s_handle.k8s.provisioner:Trying to delete VerticalPodAutoscaler "seleznev-test-app"
Traceback (most recent call last):
  File "/usr/local/bin/k8s-handle", line 33, in <module>
    sys.exit(load_entry_point('k8s-handle==0.0.0', 'console_scripts', 'k8s-handle')())
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/__init__.py", line 226, in main
    args.func(args_dict)
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/__init__.py", line 32, in handler_destroy
    _handler_deploy_destroy(args, COMMAND_DESTROY)
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/__init__.py", line 69, in _handler_deploy_destroy
    args.get('show_logs')
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/__init__.py", line 121, in _handler_provision
    provisioner.run(resource)
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/k8s/provisioner.py", line 43, in run
    self._destroy_all(file_path)
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/k8s/provisioner.py", line 169, in _destroy_all
    self._destroy(template_body, file_path)
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/k8s/provisioner.py", line 184, in _destroy
    response = kube_client.delete()
  File "/usr/local/lib/python3.6/site-packages/k8s_handle-0.0.0-py3.6.egg/k8s_handle/k8s/adapters.py", line 281, in delete
    client.V1DeleteOptions(propagation_policy='Foreground')
TypeError: delete_namespaced_custom_object() takes 6 positional arguments but 7 were given

Change in client which caused this issue:

v11.0.0

API Change:


Also I updated dependencies because of:

error: urllib3 1.26.2 is installed but urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 is required by {'requests'}

@seleznev seleznev added the bug Something isn't working label Dec 11, 2020
@seleznev seleznev self-assigned this Dec 11, 2020
@codecov-io
Copy link

codecov-io commented Dec 11, 2020

Codecov Report

Merging #133 (5dfb90d) into master (2e6b886) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #133   +/-   ##
=======================================
  Coverage   81.07%   81.07%           
=======================================
  Files          21       21           
  Lines        1358     1358           
=======================================
  Hits         1101     1101           
  Misses        257      257           
Impacted Files Coverage Δ
k8s_handle/k8s/adapters.py 57.14% <ø> (ø)

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 2e6b886...5dfb90d. Read the comment docs.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@furiousassault furiousassault left a comment

Choose a reason for hiding this comment

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

lgtm

@seleznev seleznev merged commit a687692 into master Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants