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

Add regex-based repository configuration #887

Closed
choldgraf opened this issue Jul 2, 2019 · 4 comments
Closed

Add regex-based repository configuration #887

choldgraf opened this issue Jul 2, 2019 · 4 comments

Comments

@choldgraf
Copy link
Member

choldgraf commented Jul 2, 2019

In #882 @betatim and I discussed exposing configuration for specific key:value pairs using regexes (similar to how we ban repositories, but with an extra level that would let you add custom key/values)

I had suggested:

so in this case the config file would look something like:

  config:
    GitHubRepoProvider:
      # Add banned repositories to the list below
      # They should be strings that will match "^<org-name>/<repo-name>.*"
      spec_configuration_override:
        ^ines/spacy-binder.*:
		    quota: 1000
        ^binder-examples/requirements.*:
   			quota: 10     

You could imagine in the future extending that if you wanted other repo-specific config keys. Does that make sense?

and @betatim replied:

I think we should consolidate banned_specs with this new key so we don't end up with two places that do similar stuff. It would be polite to provide some amount of time where people can keep using banned_specs (internally we translate it to a repo with a quota of zero?!) and get a warning that they should transition to the new way. Seems like the polite thing to do and makes mybinder.org ops team's life a little easier too.

Not a fan of the new name spec_configuration_override. I had to think a good moment about what it meant, what was likely to be the config found within it, etc. I'll suggest some names in the PR.

What do you think of using this as a way to configure limits for whole organisations (say all repos in the binder-examples org)? It is possible right now, I like the idea of being able to do this and maybe it gives us an idea for how to name this config option.

Then the issue got closed...this issue is just keeping that thread alive :-)

@betatim
Copy link
Member

betatim commented Jul 3, 2019

Except for trying to come up with a more intuitive name I'd merge a PR implementing this in no time. It would let us set limits per repo which would be nice for heavy hitters and a kind of "soft ban" and one day maybe even per spec resources.

@betatim
Copy link
Member

betatim commented Aug 1, 2019

Time to close this?

@choldgraf
Copy link
Member Author

I think so? Do we have a definitive test to know that it works yet?

@betatim betatim closed this as completed Aug 2, 2019
@betatim
Copy link
Member

betatim commented Aug 2, 2019

Kind of as it is used on mybinder.org. Could transition some of the high spec repos to it to make really sure.

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