Skip to content

Conversation

trevorspreadbury
Copy link

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

ProxyRepoProvider queries an API endpoint on instantiation with
the provided 'spec' as the resource id. The API must return both
a 'provider' and an updated 'spec'. Attributes are then copied from
the proper RepoProvider. The initializatin returns the proper
RepoProvider and updated kwargs
@welcome
Copy link

welcome bot commented Jul 21, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

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! 👋

Welcome to the Jupyter community! 🎉

@consideRatio consideRatio marked this pull request as draft October 20, 2022 11:15
@consideRatio consideRatio changed the title [WIP] ProxyRepoProvider which routes requests to existing repoprovider based on external api ProxyRepoProvider which routes requests to existing repoprovider based on external api Oct 20, 2022
@consideRatio
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code:python Python changes. new

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants