apps update step fails with de-client>=1.10.0 when group_co_owners / group_viewers inputs are not set

オープン 初心者向け
#39 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
github-actions
領域
ci-cd

調査の方向性

action.yml の 155~165 行付近にある post-deploy ステップと、group_co_owners および group_viewers の input 定義を確認してください。de_client_version 1.10.0 を使用し、グループ input を指定せずに workflow を再現してから、グループフラグを条件付きにし、input の型を string に修正してください。どちらのグループ input も指定せずに workflow が成功し、なおかつ空でないグループ値を引き続き受け付ければ完了です。

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

説明

The post-deploy step in action.yml (https://github.com/plotly/de-deploy/blob/main/action.yml#L155-L165) always invokes:

de --no-keyfile apps update --name $APP_NAME \
   --add-group-co-owner "${{ inputs.group_co_owners }}" \
   --add-group-viewer "${{ inputs.group_viewers }}"

When neither input is provided, this expands to literal empty strings:
de --no-keyfile apps update --name de5-de-deploy --add-group-co-owner "" --add-group-viewer ""

With de-client==1.9.5 this was a silent no-op. With de-client==1.10.0, the CLI now strictly validates group names and exits 1:

Error updating app [de5-de-deploy]: Group '' could not be found on <host>.
Error: Process completed with exit code 1.

Repro:
any workflow using plotly/de-deploy@main with de_client_version: '1.10.0' and no group_co_owners / group_viewers inputs.

Proposed fix:
make the flags conditional on the inputs being non-empty, e.g.:

args=()
[[ -n "${{ inputs.group_co_owners }}" ]] && args+=( --add-group-co-owner "${{ inputs.group_co_owners }}" )
[[ -n "${{ inputs.group_viewers  }}" ]] && args+=( --add-group-viewer  "${{ inputs.group_viewers  }}" )
if (( ${#args[@]} > 0 )); then
  de --no-keyfile apps update --name "${{ steps.app_name.outputs.app_name }}" "${args[@]}"
fi

On the side:
input type typos in action.ymlgroup_viewers.type: strong and group_co_owners.type: boolean should both be string.

主要言語
言語のデータがありません
スター
4
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

plotly/de-deploy のほかの issue

plotly/de-deploy の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

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

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