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

Open Beginner friendly
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
github-actions
Domain
ci-cd

Research direction

Inspect the post-deploy step in action.yml around lines 155-165, along with the group_co_owners and group_viewers input definitions. Reproduce the workflow with de_client_version 1.10.0 and no group inputs, then make the group flags conditional and correct the input types to string. Done means the workflow succeeds without either group input and still accepts non-empty group values.

Written by the indexing model from the issue text.

Description

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.

Dominant language
No language data
Stars
4
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plotly/de-deploy

All issues in plotly/de-deploy

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.