Skip to content

Commit

Permalink
fix: Temporarily pin emulation image pulls on Windows (#5873)
Browse files Browse the repository at this point in the history
* fix: Temporarily pin emulation image pulls on Windows

* Use enum value
  • Loading branch information
mildaniel authored Aug 31, 2023
1 parent 8c6a6da commit 2ac3f45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions samcli/local/docker/lambda_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ def build(self, runtime, packagetype, image, layers, architecture, stream=None,
tag_prefix = f"{runtime_only_number}-"
base_image = f"{self._INVOKE_REPO_PREFIX}/{runtime_image_tag}"

# Temporarily add a version tag to the emulation image so that we don't pull a broken image
if platform.system().lower() == "windows" and runtime in [Runtime.go1x.value, Runtime.java8.value]:
LOG.info("Falling back to a previous version of the emulation image")
base_image = f"{base_image}.2023.08.02.10"

if not base_image:
raise InvalidIntermediateImageError(f"Invalid PackageType, PackageType needs to be one of [{ZIP}, {IMAGE}]")

Expand Down

0 comments on commit 2ac3f45

Please sign in to comment.