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

Set plumber options through env #933

Open
meztez opened this issue Nov 24, 2023 · 3 comments
Open

Set plumber options through env #933

meztez opened this issue Nov 24, 2023 · 3 comments
Labels
difficulty: intermediate Enterprising community members could help effort: low < 1 day of work help wanted Solution is well-specified enough that any community member could fix type: enhancement Adds a new, backwards-compatible feature
Milestone

Comments

@meztez
Copy link
Collaborator

meztez commented Nov 24, 2023

User @slodge proposed to set plumber options through env variable.

Read an option value, if null, check for an ENV variable?

This would allow some of the API behaviors to change without redeploying code. I can see this to be useful in at least a couple scenario like activating debug with redeploying, changing secret.

Current user probably have some kind of options setting mechanism in place within their API, but it would be pretty "dope" to have it available before you know you need it.

I think this should be extended to all plumber options with a proper naming scheme like "PLUMBER_XXX_", replacing the dot in the option name with an underscore and having all caps?

@meztez meztez added type: enhancement Adds a new, backwards-compatible feature difficulty: intermediate Enterprising community members could help effort: low < 1 day of work help wanted Solution is well-specified enough that any community member could fix labels Nov 24, 2023
@meztez meztez added this to the v1.3.0 milestone Nov 24, 2023
@meztez
Copy link
Collaborator Author

meztez commented Nov 25, 2023

#934

@gadenbuie
Copy link
Member

There's a newish R package called options with a really nice interface for consistent handling of package options that are read from R options or environment variables. It has a lot of convenient features that might make it preferable to use over a hand-rolled system. It's worth considering for this task, at least.

@meztez
Copy link
Collaborator Author

meztez commented Nov 27, 2023

There's a newish R package called options with a really nice interface for consistent handling of package options that are read from R options or environment variables. It has a lot of convenient features that might make it preferable to use over a hand-rolled system. It's worth considering for this task, at least.

Thanks, I'll create a separate PR trying options package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: intermediate Enterprising community members could help effort: low < 1 day of work help wanted Solution is well-specified enough that any community member could fix type: enhancement Adds a new, backwards-compatible feature
Projects
None yet
Development

No branches or pull requests

2 participants