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

Đang mở Phù hợp với người mới
#39 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github-actions
Lĩnh vực
ci-cd

Hướng nghiên cứu

Kiểm tra bước post-deploy trong action.yml quanh các dòng 155-165, cùng với các định nghĩa input group_co_owners và group_viewers. Tái hiện workflow với de_client_version 1.10.0 và không có input nhóm, sau đó đặt các flag nhóm thành có điều kiện và sửa các kiểu input thành string. Hoàn thành khi workflow chạy thành công mà không có một trong hai input nhóm và vẫn chấp nhận các giá trị nhóm không rỗng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
4
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của plotly/de-deploy

Tất cả issue của plotly/de-deploy

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.