-
Notifications
You must be signed in to change notification settings - Fork 13
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
Verify that environment's dask-gateway matches binder's dask-gateway #144
Comments
Thanks for opening @TomAugspurger. Looks like in TomAugspurger/pangeo-dask-gateway#2, the situation leads to
Rather than a kubespawner change, maybe this could be build into dask_gateway itself? I'm wondering if gateway.new_cluster() can do a get_vertsions(check=True) test https://distributed.dask.org/en/latest/api.html#distributed.Client.get_versions? |
Dask does a |
Ah, I see. If you're up for adding a hook function that could certainly be useful. Another simple option might be to just add a highly visible jupyterhub page announcement (https://jupyterhub.readthedocs.io/en/stable/reference/templates.html#page-announcements). Such as |
@consideRatio do you have a feeling where in the KubeSpawner lifecycle this would be best to insert? It has to be after the image has been downloaded. The most robust way to do this is to execute a small command in the container like |
@TomAugspurger I'm not sure, I'm raising questions rather than answering :p Rubber ducking a bit.
Thoughts:
My gut feeling is that this may introduce so much complexity that it isn't worth it, but perhaps an approach that would be nice would be to extract some along with the build stage perhaps also combined with a diagnostic on already available images. Such final step of the build or standalone diagnostic run could start a container with the intention to extract som version info, and by doing that you could for example remove the cached image to trigger a rebuild or similarly. Hmmm... |
Thanks.
I don't think this would be an option. Imagine: I have an environment built today that includes Dask Gateway 0.7.1. Things are working fine. Suppose that a year from now we're running dask-gateway 0.8 on the binderhub, which includes a breaking change and is incompatible with dask-gateway 0.7.1. We'd like to inform the user of that pod that dask-gateway won't work and refuse to start the pod. Basically, I want something like class DaskGatewayCheckKubeSpawner(KubeSpawner):
def start(self):
# download image...
self.check_dask_gateway_image()
# continue with the rest of start Perhaps I can get away with just |
I figured that would be a way to extract information, and then how to act on that could be entirely left to other logic. Information of relevance to extract could for example be a mapping of docker image hash -> versions map. Then logic could be made to act based on that, directly, or in the future. |
Ah, understood. Yes that would be easier when it comes to starting the pod,
especially if we envision many of these checks.
For now, I'm going to go the hacky route and see if I can get something
simple working :)
…On Mon, May 11, 2020 at 2:22 PM Erik Sundell ***@***.***> wrote:
Suppose that a year from now we're running dask-gateway 0.8 on the
binderhub, which includes a breaking change and is incompatible with
dask-gateway 0.7.1. We'd like to inform the user of that pod that
dask-gateway won't work and refuse to start the pod.
I figured that would be a way to extract information, and then how to act
on that could be entirely left to other logic. Information of relevance to
extract could for example be a mapping of docker image hash -> versions
map. Then logic could be made to act based on that, directly, or in the
future.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKAOIQCJB2YWQHIN5OOBADRRBGAZANCNFSM4MOKML6Q>
.
|
@TomAugspurger -thanks for looking into this.
|
FWIW, I looked into this a bit and didn't see an easy to to achieve it in the binder startup process. I wonder if we're trying to solve this problem at the wrong level. I believe that Dask-Gateway now has versioned API requests, so it may have already solved the problem for us. When the client and different, but compatible versions things will be OK. When they have incompatible versions (in our case, the client is too old for the server), the server will presumably return a nice error message saying that the client is out of date. |
We can get into poor situations when launching an image that's incompatible with the version of
dask-gateway-server
running on the binder. This happened recently with https://github.com/TomAugspurger/pangeo-dask-gateway whereTwo possible solutions
dask-gateway-server
running on the binder.We should be able to hack something together that makes a KubeSpawner that just does a simple check for the dask-gateway version in the image when we start. We check that version against the minimum supported version (0.7.1 for now. Bump that when there's an incompatible upgrade to dask-gateway). If there's an issue we raise an informative error message.
The text was updated successfully, but these errors were encountered: