Tech debt: make partition layer deployment safe to resume

Offen
#8,433 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@dreamorosi arbeitet bereits daran.

Seit 04.9.2026.

  • #8440 von @dreamorosi — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
3.3k
Forks
511
Ø Merge
3 T. 8 Std.
Gemergte PRs (30 T.)
92

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aws-powertools/powertools-lambda-python

Alle Issues in aws-powertools/powertools-lambda-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.