jupyterhub / repo2docker

Turn repositories into Jupyter-enabled Docker images
https://repo2docker.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.61k stars 360 forks source link

Make the names of r2d generated images more readable #701

Open sgibson91 opened 5 years ago

sgibson91 commented 5 years ago

Proposed change

Hi! :wave:

I've always found the naming convention of images generated by repo2docker a little jarring, particularly the rogue 2d that seems to crop up after hyphens (-) and slashes (/).

I propose to change this:

<some-prefix>-binder-2dexamples-2drequirements-55ab5c

to this:

<some-prefix>-binder-examples-requirements-55ab5c

Alternative options

There isn't one really, I can just continue to cope 🙂

Who would use this feature?

I'm unsure how repo2docker is utilised as a single resource. I think in terms of managing a BinderHub/JupyterHub, this would make the image registries and the user pod names more readable, therefore making tracing of repos easier.

How much effort will adding it take?

I hope only a small amount but I'm unfamiliar with r2d's architecture!

Who can do this work?

Need to know how these names are constructed in r2d and understand what unicode/something conversion is happening to cause the 2ds.

manics commented 5 years ago

It looks like this is the line that escapes the name: https://github.com/jupyter/repo2docker/blob/f19e159dfe1006dbd82c7728e15cdd19751e8aec/repo2docker/app.py#L393-L395

And there's a configuration property: https://github.com/jupyter/repo2docker/blob/f19e159dfe1006dbd82c7728e15cdd19751e8aec/repo2docker/app.py#L273-L281

This is just from looking through the code, I haven't checked whether it works.

sgibson91 commented 5 years ago

Good place to start, thanks @manics!

consideRatio commented 5 years ago

Related discussion in Kubespawner: https://github.com/jupyterhub/kubespawner/issues/324

manics commented 3 years ago

A problem would be how to distinguish between binder-examples/requirements and binder/examples-requirements since both would end up as binder-examples-requirements. @sgibson91 Is this something you're still interested in solving?

sgibson91 commented 3 years ago

I don't think this is a mission critical issue. I think if there's a sensible, low-friction path to addressing this while mitigating the problem you raised, then it's worth pursuing. Otherwise, I'm happy to not die on this hill 😄