Skip to content

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

@RunQi-Han

Description

@RunQi-Han

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions