Feat/use durable functions emulator image#8708
Conversation
…tead of building image using binary
# Conflicts: # samcli/local/docker/durable_functions_emulator_container.py
… fails to start up
| """ | ||
| Allow pinning to a specific emulator image tag/version | ||
| """ | ||
| ENV_EMULATOR_IMAGE_TAG = "DURABLE_EXECUTIONS_EMULATOR_IMAGE_TAG" |
There was a problem hiding this comment.
sam local invoke has a --invoke-image parameter, where customers can pass the location of a specific image to be used as the execution base image instead of the default Lambda base image.
could explore using this established pattern rather than adding ENV_EMULATOR_IMAGE_TAG?
There was a problem hiding this comment.
I think that is a good idea however due to time constraints I won't have any more capacity to work on this for a while so I'd be happy to have this as a follow up item. I'm guessing I'll have to confer with SAM CLI team for the name of the parameter, updating the docs, etc.
I don't think having it as an environment variable makes it substantially harder to use in the meantime.
There was a problem hiding this comment.
Personally I don't think this should be exposed as a new parameter on the CLI. Our expectation is for the latest image to always be "stable", so it should only be overridden in unexpected cases. The way I see this, having this be overridable at all is like a backdoor, and we shouldn't expect customers to need to use this.
Do you agree?
|
I ran integration tests locally and they all passed |
valerena
left a comment
There was a problem hiding this comment.
LGTM. Waiting for the final official image location.
bchampp
left a comment
There was a problem hiding this comment.
Nice - I much prefer this approach, 1 blocking comment about the --lambda-endpoint and two minor suggestions.
…or logs after the container is shut down in case of failures
…local image if remote image pull fails
Which issue(s) does this change fix?
#8488
Why is this change necessary?
This introduces a fix for the Homebrew linkage issue with the Durable Functions emulator. We are also introducing this so that SAM CLI can receive Durable Functions emulator updates uncoupled with SAM CLI release.
How does it address the issue?
We are automatically vending the emulator via an image published to ECR. See aws/aws-durable-execution-sdk-python-testing#196. Since the arm64 emulator is no longer included as an executable directly in the SAM CLI, this also fixed the issue where Homebrew users of SAM CLI could not emulate durable functions locally without doing some workaround.
What side effects does this change have?
As a bonus, this reduces the SAM CLI size.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.