jupyterhub / binderhub

Run your code in the cloud, with technology so advanced, it feels like magic!
https://binderhub.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.54k stars 388 forks source link

ProxyRepoProvider which routes requests to existing repoprovider based on external api #1511

Open trevorspreadbury opened 2 years ago

trevorspreadbury commented 2 years ago

What does this do?

This creates a RepoProvider subclass that allows for routing spec resolution through an external API. This has benefits for my use case and may or may not be useful enough to warrant inclusion in binderhub. The most direct use case is that this allows for a dynamic list of allowed repositories #280, which could be useful for organizations that wish to host a binderhub with the ability to regulate repositories that are available.

How else can this be done?

This can be done through extraConfig. Due to SPEC_NAMES in main.py however, the repoprovider would have to be routed through an existing provider name, which seems somewhat hacky. Another potential update would be making all references to the list of repoproviders configurable. This might also be related to a solution to #322

welcome[bot] commented 2 years ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

consideRatio commented 1 year ago

Hi @trevorspreadbury!

I'm struggling to understand what this class would do from the PRs description, can you clarify with a practical example or similar?

This creates a RepoProvider subclass that allows for routing spec resolution through an external API.