Tech debt: make partition layer deployment safe to resume

Đang mở
#8,433 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@dreamorosi đang làm issue này rồi.

Từ ngày 4/9/2026.

  • #8440 của @dreamorosi — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

tech-debt
Why is this needed?

.github/workflows/layers_partitions.yml performs twelve concurrent, irreversible Lambda layer publications without verifying each target layer is at the expected preceding version. It checks the returned version only after publishing, when an incorrect version number can no longer be reused.

The copy matrix also uses the default fail-fast behavior. A failure can cancel sibling jobs after publication but before permission or verification, leaving runtimes and architectures at different versions. The workflow is not idempotent: rerunning a partially successful deployment republishes completed layers at the next version, while rerunning all jobs can conflict with immutable workflow artifacts.

Additional gaps make recovery and operation harder:

  • version is not validated and is interpolated directly into shell commands;
  • AWS retry behavior is not configured for long cross-partition uploads;
  • publication and public-permission creation are coupled in one non-atomic step;
  • the reusable trigger omits the required partition input;
  • source downloads do not fail or retry cleanly on HTTP errors;
  • failed verification does not preserve target metadata artifacts.

These risks can permanently break layer version parity in China or GovCloud. Until addressed, maintainers must use Layer Balancer (Partitions) separately for each runtime because it provides target-position preflight, resumability, SHA checks, visibility mirroring, retries, and non-fail-fast execution.

Which area does this relate to?

Automation

Suggestion

Bring the regular partition deployment workflow up to the balancer safety model:

  • validate and normalize all dispatch/call inputs;
  • require the target latest version to equal version - 1 before publishing;
  • disable matrix fail-fast and consider serial target publication;
  • skip existing versions only when their SHA and visibility match the commercial source;
  • make artifact uploads and permission creation idempotent;
  • configure standard AWS retries;
  • preserve partial-run metadata for recovery;
  • complete or remove the broken workflow_call interface.
Acknowledgment

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Ngôn ngữ chính
Python
Star
3.3k
Fork
511
Merge trung bình
3 ngày 8 giờ
Pull request đã merge (30 ngày)
92

Chuẩn bị môi trường

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 aws-powertools/powertools-lambda-python

Tất cả issue của aws-powertools/powertools-lambda-python

Issue tương tự

Thêm issue về Python

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.