[Bug] Unable to set multiple grpc-meta in the env config

オープン
#774 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
cli

調査の方向性

まず temporal env set --env=example --key=grpc-meta で問題を再現し、環境設定が ClientOptions.GrpcMeta に読み込まれるまでを追跡します。複数のメタデータエントリが、1つのキーと結合された値としてではなく、個別のキーと値のペアとしてパースされることを確認します; 環境設定から両方の認証ヘッダーが機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
What are you really trying to do?

Similar to how the web UI uses the authorization and authorization-extras headers, I'd like to be able to pass these via the temporal CLI.

I'd like to add these headers (grpc-meta) in the temporal env config file to simplify CLI invocation, e.g.

temporal operator namespace list \
  --grpc-meta "authorization=${AUTHORIZATION}" \
  --grpc-meta "authorization-extras=${AUTHORIZATION_EXTRAS}" \
  --address temporal.example.com \
  --tls

and the command succeeds as expected when valid auth headers are supplied.

Describe the bug

The temporal env command clobbers existing values when setting grpc-meta and it's not clear how to manually edit the YAML file to set them either.

Minimal Reproduction

temporal env set --env=example --key=grpc-meta --value="authorization=${AUTHORIZATION} authorization-extras=${AUTHORIZATION_EXTRAS}"

env:
  example:
    grpc-meta: authorization=Bearer xxx.yyy.zzz authorization-extras=REDACTED

However this doesn't work, the ClientOptions.GrpcMeta according to my debugger has a value like:

map[authorization:Bearer xxx.yyy.zzz authorization-extras=REDACTED]

i.e. a map[string]string but the key is authorization and the value is all the other grpc-meta values I'm trying to populate from the config.

Environment/Versions
  • OS and processor: M1 Mac
  • Temporal Version: 1.3.0
  • Are you using Docker or Kubernetes or building Temporal from source? Temporal CLI install from homebrew
主要言語
Go
スター
390
フォーク
123
平均マージ
2日 9時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

temporalio/cli のほかの issue

temporalio/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。