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

Config redirect with local repo-based overrides #94

Closed
alexellis opened this issue Oct 11, 2018 · 11 comments
Closed

Config redirect with local repo-based overrides #94

alexellis opened this issue Oct 11, 2018 · 11 comments

Comments

@alexellis
Copy link
Owner

Expected Behaviour

The config redirect which means a local repo can have just a single entry "redirect_url: https://" rather than a complete .DEREK.yml file has been really useful across the dozen or so OpenFaaS repos. There are times where a local override is needed for a specific repo.

I would see this working as an intersection with the local override taking precedence. This would also be useful for the rebase feature in #91.

There may be a generic config set up in the "main" repo - all other repos may point there defining "@alexellis has rebase access" - then the CLI repo for instance may have @rgee0 and @johnmccabe as having rebase access, so you'd end up with the following for the CLI repo: @alexellis @rgee0 and @johnmccabe without having to specify that @alexellis had access to this feature.

Current Behaviour

Possible, but with duplication and maintenance is required for separate files.

Possible solution

If redirect_url is present, fetch that config file then overlay it with the file being read afterwards.

@rgee0
Copy link
Contributor

rgee0 commented Oct 23, 2018

I think this should be relatively simple to implement.

err = parseConfig(bytesConfig, &config)

We parse the remote .DEREK.yml here into a separate types.DerekRepoConfig and then add a method call immediately afterwards to merge the existing local config with that retrieved remotely, de-duping in the process.

@alexellis
Copy link
Owner Author

That approach sounds good to me.

@burtonr
Copy link
Contributor

burtonr commented Nov 4, 2018

I could take this on as my first contribution to the Derek project 😄

@alexellis
Copy link
Owner Author

Sounds good to me, thanks for commenting so that other people know it's being tackled 👍 🤖

@alexellis
Copy link
Owner Author

I did this in ofc-bootstrap, so should be easy to plugin in the approach from there. I think this is fair game for anyone to pick up now.

@Waterdrips, WDYT?

@Waterdrips
Copy link
Contributor

yeh that would be useful. I can pick that up, or we could see if any of our new contributors want to take it? (and i could focus on the ofc helm chart 😅 )

@alexellis
Copy link
Owner Author

@alexellis
Copy link
Owner Author

Don't mind, as long as it can be done as in finished within the next week to keep the merge/rebase feature moving forward.

@Waterdrips
Copy link
Contributor

Ah if we need it done for that I'll take it and do it this weekend.

@alexellis
Copy link
Owner Author

Merci 👍

@rgee0
Copy link
Contributor

rgee0 commented Oct 27, 2021

Derek close: implemented in #140

@derek derek bot closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants