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

Does dask-kubernetes compatible with newer version of k8rs? #848

Closed
dbalabka opened this issue Dec 21, 2023 · 4 comments
Closed

Does dask-kubernetes compatible with newer version of k8rs? #848

dbalabka opened this issue Dec 21, 2023 · 4 comments

Comments

@dbalabka
Copy link
Contributor

Describe the issue:

Using "NodePort" leads to the following error:

File [.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:82](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:82), in <listcomp>(.0)
     [79](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:79) def _get_port(service, port_name, is_node_port=False):
     [80](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:80)     """NodePort is a special case when we have to use node_port instead of node"""
     [81](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:81)     [port] = [
---> [82](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:82)         port.port if not is_node_port else port.node_port
     [83](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:83)         for port in service.spec.ports
     [84](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:84)         if port.name == service.metadata.name or port.name == port_name
     [85](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:85)     ]
     [86](.venv/lib/python3.10/site-packages/dask_kubernetes/operator/networking.py:86)     return port

File [.venv/lib/python3.10/site-packages/box/box.py:647](.venv/lib/python3.10/site-packages/box/box.py:647), in box.box.Box.__getattr__()

BoxKeyError: "'Box' object has no attribute 'node_port'"

The Box class was introduced in some newer versions of k8rs and has different attribute notation "nodePort"

Minimal Complete Verifiable Example:

TBD

Anything else we need to know?:

Environment:

  • Dask version: 2023.11.0
  • Python version: 3.10
  • Operating System: Linux
  • Install method (conda, pip, source): poetry
dbalabka added a commit to dbalabka/dask-kubernetes that referenced this issue Dec 21, 2023
@dbalabka
Copy link
Contributor Author

While I believe that #849 is a proper fix, the open constraints like kr8s>=0.9.0 should be avoided because they might introduce problems with library compatibility:
https://github.com/dask/dask-kubernetes/blob/main/requirements.txt#L8
Probably, the correct constraint should be kr8s>=0.9.0,<0.13 (depending on supported version)

@jacobtomlinson
Copy link
Member

Thanks @dbalabka. I've switched back to a hard pin on the kr8s dependency for now, but I hope to remove it again as things continue to become more stable in the future.

Adding upper bounds to dependencies is a highly debated subject. In Dask we typically do not do this.

jacobtomlinson added a commit that referenced this issue Jan 5, 2024
dbalabka added a commit to dbalabka/dask-kubernetes that referenced this issue Feb 5, 2024
@dbalabka
Copy link
Contributor Author

dbalabka commented Feb 6, 2024

@jacobtomlinson, it seems another place should be fixed with the same problem. Please see #858

jacobtomlinson added a commit that referenced this issue Feb 20, 2024
@jacobtomlinson
Copy link
Member

Updated kr8s to the latest version in #880

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

No branches or pull requests

2 participants