update samples to use env config to configure clients#440
Conversation
chris-olszewski
left a comment
There was a problem hiding this comment.
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?
| // 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. |
There was a problem hiding this comment.
Are the comments no longer helpful with envconfig?
There was a problem hiding this comment.
Added a little comment, linking to docs
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.
Added a little comment that linked to the docs |
What was changed
Update samples to configure clients using
envconfigpackage.Why?
New standard practice for configuring clients.
Checklist
Closes [Feature Request] Environment configuration #421
How was this tested:
Existing tests and ran a few samples that use slightly different configs (with data converter, with interceptor, etc.)
Any docs updates needed?
No