Add client-authority support to config profile settings#1084
Conversation
| package temporalcli | ||
|
|
||
| import ( | ||
| "encoding/json" |
There was a problem hiding this comment.
Why are the changes to search attributes in schedules required for this change?
There was a problem hiding this comment.
@spkane31 Good catch! That was an unrelated change from another branch
that got included by mistake. I've rebased the PR onto main —
those changes are now removed.
| "address": "my-address", | ||
| "namespace": "my-namespace", | ||
| "api_key": "my-api-key", | ||
| "authority": "my-authority", |
There was a problem hiding this comment.
Can you add a test for the config set path ?
There was a problem hiding this comment.
@spkane31 Sure, I'll add a test for the config set path in the next commit.
There was a problem hiding this comment.
@spkane31 Added test for config set path in the latest commit.
Wire ClientAuthority flag into the envconfig ClientConfigProfile so it can be set via 'temporal config set --prop client-authority'. Also updates DefaultConfigFilePath() call sites to handle the updated signature in envconfig v1.0.2 which now returns a single string instead of (string, error). Fixes temporalio#1013
Wire ClientAuthority flag into envconfig ClientConfigProfile so it can be set and retrieved via 'temporal config set/get': temporal config set --prop client-authority --value my-authority temporal config get --prop client-authority Changes: - Add 'authority' to envConfigPropsToFieldNames map in commands.config.go - Wire cfg.ClientAuthority to profile.Authority in client.go - Update DefaultConfigFilePath() call sites for envconfig v1.0.2 signature change (string instead of string, error) - Bump go.temporal.io/sdk/contrib/envconfig to v1.0.2 - Add authority field to config tests Fixes temporalio#1013
2289be9 to
52e0f62
Compare
I think these are wrong in your PR description, it should be |
|
@spkane31 Thank you for pointing that out. I have just edited the PR to correct it. |
Related issues
Closes #1013
What changed?
authoritytoenvConfigPropsToFieldNamesmap soclient-authoritycan be get/set via config commandscfg.ClientAuthoritytoprofile.Authorityinclient.goDefaultConfigFilePath()call sites for envconfig v1.0.2signature change (returns
stringinstead of(string, error))go.temporal.io/sdk/contrib/envconfigto v1.0.2authorityfield to config testsChecklist
Stability
Design
Tests
Manual tests
Setup
Happy path
Error case