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

[Feature Request] Common external configuration of client connection options #441

Open
cretz opened this issue Mar 26, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@cretz
Copy link
Member

cretz commented Mar 26, 2024

Describe the solution you'd like

Will add more as more is discussed. Notes:

  • Probably want to use same env vars as CLI
  • User has to opt-in to use, e.g. NewClientOptionsFromEnvironment() instead of just assuming when unset to pull from env
  • May want YAML config or similar
    • Discuss the tradeoffs of language-specific approaches vs dependency additions

EDIT: Initial proposal now available at temporalio/proposals#94

@cretz cretz added the enhancement New feature or request label Mar 26, 2024
@cretz
Copy link
Member Author

cretz commented Mar 27, 2024

Ok, we're fairly sure we want to combine concepts here. Here are some requirements:

  • We want CLI to be able to use same environment variables and same config files as all SDKs
  • We want a single opt-in call to create connection options that use environment variables and config file (former overrides latter)
  • CLI can be used to mutate the config file

Today we already have temporal env, so we may be able to reuse that, but there are some problems:

  • This is YAML and adding YAML libraries to our SDKs has knock-on effects for users
    • AWS's SDKs use AWS configuration files which are INI based and therefore they have their own INI parsers
  • Environment variables don't have an "env" name, but "envs" do
  • The use of the term "env" for config file with "env name" and "setting name" instead of something like "config" and "profile" is confusing

These need to be solved.

@bergundy
Copy link
Member

Agree that it would be great to reuse the CLI env file and unify that experience.

This is YAML and adding YAML libraries to our SDKs has knock-on effects for users

Maybe we should just switch to JSON as we don't expect most users to be editing this file manually. That would remove the YAML lib dependency.

The use of the term "env" for config file with "env name" and "setting name" instead of something like "config" and "profile" is confusing

Agree, profile might be less confusing but I'm not sure we want to change the terminology for CLI users that already use the feature although now might be the perfect time to make this change since we're redesigning the env command API.

@cretz
Copy link
Member Author

cretz commented Aug 15, 2024

Initial proposal now available at temporalio/proposals#94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants