Skip to content

Conversation

@THardy98
Copy link
Contributor

What was changed

Update samples to configure clients using envconfig package.

Why?

New standard practice for configuring clients.

Checklist

  1. Closes [Feature Request] Environment configuration #421

  2. How was this tested:
    Existing tests and ran a few samples that use slightly different configs (with data converter, with interceptor, etc.)

  3. Any docs updates needed?
    No

@THardy98 THardy98 requested a review from a team as a code owner November 12, 2025 04:30
Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern about switching all of these to use envconfig is possible confusion when setting up an example with npx @temporalio/create and they have a system config file, it will get used as opposed to the defaults referenced in the sample READMEs.

Also, is there no benefit for keeping the comments regarding how to setup the connection for production? Maybe update it to link to envconfig profile docs/sample?

Comment on lines -7 to -8
// In production, pass options to the Connection constructor to configure TLS and other settings.
// This is optional but we leave this here to remind you there is a gRPC connection being established.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the comments no longer helpful with envconfig?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a little comment, linking to docs

@THardy98
Copy link
Contributor Author

My only concern about switching all of these to use envconfig is possible confusion when setting up an example with npx @temporalio/create and they have a system config file, it will get used as opposed to the defaults referenced in the sample READMEs.

That's a good point. My feeling though is that if a user has a system config file already, they know enough about the feature to be aware of this.

Also, is there no benefit for keeping the comments regarding how to setup the connection for production? Maybe update it to link to envconfig profile docs/sample?

Added a little comment that linked to the docs

@THardy98 THardy98 merged commit 9d287a2 into main Nov 12, 2025
94 of 95 checks passed
@THardy98 THardy98 deleted the update_all_samples_env_config branch November 12, 2025 19:59
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

Successfully merging this pull request may close these issues.

[Feature Request] Environment configuration

3 participants