Skip to content

Add client-authority support to config profile settings#1084

Merged
spkane31 merged 3 commits into
temporalio:mainfrom
NasitSony:fix/add-client-authority-to-config
Jun 16, 2026
Merged

Add client-authority support to config profile settings#1084
spkane31 merged 3 commits into
temporalio:mainfrom
NasitSony:fix/add-client-authority-to-config

Conversation

@NasitSony

@NasitSony NasitSony commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Related issues

Closes #1013

What changed?

  • Added authority to envConfigPropsToFieldNames map so
    client-authority can be get/set via config commands
  • Wired cfg.ClientAuthority to profile.Authority in client.go
  • Updated DefaultConfigFilePath() call sites for envconfig v1.0.2
    signature change (returns string instead of (string, error))
  • Bumped go.temporal.io/sdk/contrib/envconfig to v1.0.2
  • Added authority field to config tests

Checklist

Stability

  • ✅ No breaking changes
  • ✅ Works against OSS server
  • ✅ Flag named after API concept (client-authority)
  • ✅ No duplicate flags
  • ✅ No short aliases
  • ✅ Added test coverage in commands.config_test.go

Design

  • ✅ Works against OSS server
  • ✅ Flag named after API concept (client-authority)
  • ✅ No duplicate flags
  • ✅ No short aliases

Tests

  • Added functional test (SharedServerSuite) — config set/get test needed

Manual tests

Setup

temporal server start-dev --headless

Happy path

$ temporal config set --prop authority --value my-authority
$ temporal config get --prop authority
Property   Value
authority   my-authority

Error case

$ temporal config set --prop authority
Error: required flag --value not set

@NasitSony NasitSony requested a review from a team as a code owner June 5, 2026 21:46
package temporalcli

import (
"encoding/json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are the changes to search attributes in schedules required for this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a test for the config set path ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@spkane31 Sure, I'll add a test for the config set path in the next commit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@spkane31 Added test for config set path in the latest commit.

@NasitSony NasitSony force-pushed the fix/add-client-authority-to-config branch from 2289be9 to 52e0f62 Compare June 11, 2026 01:49
@spkane31

Copy link
Copy Markdown
Contributor
$ temporal config set --prop client-authority --value my-authority
$ temporal config get --prop client-authority
my-authority

I think these are wrong in your PR description, it should be --prop authority

@NasitSony

Copy link
Copy Markdown
Contributor Author

@spkane31 Thank you for pointing that out. I have just edited the PR to correct it.

@NasitSony NasitSony requested a review from spkane31 June 12, 2026 02:17

@spkane31 spkane31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the contribution @NasitSony

@spkane31

Copy link
Copy Markdown
Contributor

You will have to rebase on main and then I can merge your PR

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
@NasitSony NasitSony force-pushed the fix/add-client-authority-to-config branch from 502c893 to 570b387 Compare June 16, 2026 19:25
@NasitSony

Copy link
Copy Markdown
Contributor Author

@spkane31 Rebased on main — ready to merge when you have a chance!

@spkane31 spkane31 merged commit 3d715e2 into temporalio:main Jun 16, 2026
11 checks passed
chaptersix added a commit that referenced this pull request Jul 6, 2026
…#1104)

## Summary

Backports server-independent changes from `main` into `release/1.8.x`.
Every commit here was verified to build and pass codegen against the
release line's current dependency pins (`server v1.31.0`, `sdk v1.41.1`,
`api v1.62.8`) — nothing pulls in the newer server/SDK/API that landed
on `main` via #1017.

Scope agreed as: bug fixes + CLI changes + CI/tooling. Dependency bumps
(#1040, #1052, #1063) and server-version-dependent features are
intentionally excluded.

## Included (22 commits, cherry-picked with `-x`)

**CLI / bug fixes**
- #1006 Fix help with value flags (addresses #1003 — `--help` with value
flags like `--address 123` surfaced `pflag: help requested` as an error)
- #1012 skip CountWorkflow in batch operations when `--yes` is set
- #1016 Sort output of listing search attributes
- #1029 Workflow delete now prompts for confirmation
- #1033 Add persistence info to start-dev banner
- #1047 Add `temporal schedule list-matching-times` command
- #1056 Fix task-queue config set help: use real fairness weight flag
names
- #1059 Prefix dev server cluster ID with `dev-server-`
- #1089 fix: tls is not added for profiles without tls
- #1099 Clarify activity pause timeout behavior
- #941 auto-generate deprecation warnings from YAML config

**Tests**
- #1005 Fix flakey test by disabling EC2 metadata lookup
- #1020 Remove `time.Sleep()` in commands.taskqueue_test.go

**CI / tooling**
- #1015 pin alpine docker image to 3.23.4
- #1024 remediate missing-dependency-cooldown
- #1034 Bump actions/upload-artifact from 4 to 7
- #1044 improve dependabot config
- #1045 add PR template
- #1054 pin and bump GitHub Actions to latest versions
- #1057 use allow instead of ignore for dependency-type in dependabot
config
- #1080 Bump the github-actions group with 2 updates

## Excluded (rely on the new server/SDK version)
#1017 (server bump v1.31.0 -> v1.32.0-157.0), #1046, #1087, #1001,
#1091, #1084

## Verification
- `go build ./...` passes
- all test packages compile
- `make gen` reports no codegen drift
- server/sdk/api pins unchanged from `release/1.8.x`



## CI endpoint fix (added)
Also backports the API-key CI test endpoint change from #1087
(`us-east-1` -> `ca-central-1`) as a standalone CI-only commit. This
resolves the `Request unauthorized` failure in the "Test cloud API key"
steps on `release/1.8.x`. The rest of #1087 (Nexus Operation command
code) is excluded as it depends on the new server version.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Co-authored-by: Kevin Woo <3469532+kevinawoo@users.noreply.github.com>
Co-authored-by: Rodrigo Zhou <rodrigo.zhou@temporal.io>
Co-authored-by: Stephan Behnke <stephanos@users.noreply.github.com>
Co-authored-by: Jiechen Zhong <jiechen.zhong@temporal.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Kent Gruber <kent.gruber@temporal.io>
Co-authored-by: picatz <14850816+picatz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Votta <jpvotta@gmail.com>
Co-authored-by: Nasit  Sarwar Sony <nasitsony96@gmail.com>
Co-authored-by: hussam-salah <156124396+hussam-salah@users.noreply.github.com>
Co-authored-by: Sai Asish Y <say.apm35@gmail.com>
Co-authored-by: Bitalizer <23104115+bitalizer@users.noreply.github.com>
Co-authored-by: Sean Kane <spkane31@gmail.com>
Co-authored-by: Jessica Laughlin <JLDLaughlin@users.noreply.github.com>
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] Add client-authority to config settings

2 participants