Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3a9f1f7
feat: build emulator image
hsilan Feb 24, 2026
354f0b5
chore: fix typo in workflows file ecr-release.yml
hsilan Feb 24, 2026
11227c2
chore: change paths
hsilan Feb 24, 2026
2c92361
chore: try changing to relative paths
hsilan Feb 24, 2026
a38e2a4
chore: use root directory for build
hsilan Feb 24, 2026
9500f53
chore: specify build dir as emulator sub folder
hsilan Feb 24, 2026
42366c1
chore: copy files to root of container
hsilan Feb 24, 2026
8658345
chore: try copy all project files
hsilan Feb 24, 2026
7010fae
chore: try different image
hsilan Feb 24, 2026
da9e837
chore: fix typo in ecr-release.yml
hsilan Feb 24, 2026
890c4b9
chore: try different copy command
hsilan Feb 24, 2026
da5365a
chore: try allowing ssh to github
hsilan Feb 24, 2026
df1184d
chore: try
hsilan Feb 24, 2026
0be8526
chore: use versions released to pip
hsilan Feb 24, 2026
d964e53
chore: remove typo from exr-release.yml
hsilan Feb 24, 2026
98c65d6
chore: only use explicit tag on release
hsilan Feb 24, 2026
d1f3a2d
chore: enable hatch executable
hsilan Feb 24, 2026
a600ecc
chore: check the path of hatch executable
hsilan Feb 24, 2026
7d4e0f1
chore: whereis hatch
hsilan Feb 25, 2026
8cf6814
chore: use python3.13-slim
hsilan Feb 25, 2026
942d191
chore: remove chmod +x
hsilan Feb 25, 2026
73dafa5
chore: try directly using pip install and not hatch
hsilan Feb 25, 2026
18e9356
chore: try older version of sdk and testing sdk
hsilan Feb 25, 2026
ce09c72
chore: try using github dependencies
hsilan Feb 25, 2026
2e6f3ff
chore: try installing git into image
hsilan Feb 25, 2026
30fdc78
chore: try apt-get upgrade
hsilan Feb 25, 2026
1855f38
chore: remove on push trigger for the ecr-release.yml workflow
hsilan Feb 25, 2026
72096f2
chore: depend on specific sdk and testing sdk version for clarity
hsilan Feb 25, 2026
4476f4e
chore: update README with installation instructions
hsilan Feb 25, 2026
781d053
chore: try lower version of hatch
hsilan Feb 26, 2026
11718e8
chore: update hatch version
hsilan Feb 26, 2026
172568f
chore: try upgrading virtual env
hsilan Feb 26, 2026
e64541c
chore: remove emulator pr workflow
hsilan Feb 26, 2026
63ce50c
chore: revert hatch upgrade
hsilan Feb 26, 2026
43ad4ca
chore: remove exclude on emulator folder
hsilan Feb 26, 2026
1a2ad02
chore: downgrade virtualenv version
hsilan Feb 26, 2026
91c0e16
chore: reformatted 3 files
hsilan Feb 26, 2026
26e4cc9
chore: update ci.yml step name for virtual env install
hsilan Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Install Hatch
run: |
python -m pip install hatch==1.15.0
- name: Install specific version of Virtual Env due to bug with hatch
run: |
python -m pip install virtualenv==20.39.0
- uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.SDK_KEY }}
Expand Down
189 changes: 0 additions & 189 deletions .github/workflows/create-emulator-pr.yml

This file was deleted.

155 changes: 155 additions & 0 deletions .github/workflows/ecr-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: ecr-release.yml
on:
release:
types: [published]

permissions:
contents: read
id-token: write # This is required for requesting the JWT

env:
path_to_dockerfile: "emulator/DockerFile"
docker_build_dir: "emulator/"
aws_region: "us-east-1"
ecr_repository_name: "o4w4w0v6/aws-durable-execution-emulator"

jobs:
build-and-upload-image-to-ecr:
runs-on: ubuntu-latest
outputs:
full_image_arm64: ${{ steps.build-publish.outputs.full_image_arm64 }}
full_image_x86_64: ${{ steps.build-publish.outputs.full_image_x86_64 }}
ecr_registry_repository: ${{ steps.build-publish.outputs.ecr_registry_repository }}
strategy:
matrix:
include:
- arch: x86_64
- arch: arm64
steps:
- name: Grab version from generate-version job
id: version
env:
VERSION: $${{ github.event.release.name }}
run: |
echo "$VERSION"
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Set up QEMU for multi-platform builds
if: matrix.arch == 'arm64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ECR_UPLOAD_IAM_ROLE_ARN }}
aws-region: ${{ env.aws_region }}
- name: Login to Amazon ECR
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build, tag, and push image to Amazon ECR
id: build-publish
shell: bash
env:
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
ECR_REPOSITORY: ${{ env.ecr_repository_name }}
IMAGE_TAG: "${{ env.image_tag }}${{ github.event.release.name }}"
PER_ARCH_IMAGE_TAG: "${{ matrix.arch }}${{ github.event.release.name }}"
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
docker build --platform linux/amd64 --provenance false "${{ env.docker_build_dir }}" -f "${{ env.path_to_dockerfile }}" -t "$ECR_REGISTRY/$ECR_REPOSITORY:$PER_ARCH_IMAGE_TAG"
else
docker build --platform linux/arm64 --provenance false "${{ env.docker_build_dir }}" -f "${{ env.path_to_dockerfile }}" -t "$ECR_REGISTRY/$ECR_REPOSITORY:$PER_ARCH_IMAGE_TAG"
fi
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$PER_ARCH_IMAGE_TAG"
echo "IMAGE $PER_ARCH_IMAGE_TAG is pushed to $ECR_REGISTRY/$ECR_REPOSITORY"
echo "image_tag=$PER_ARCH_IMAGE_TAG"
echo "full_image=$ECR_REGISTRY/$ECR_REPOSITORY:$PER_ARCH_IMAGE_TAG"
echo "ecr_registry_repository=$ECR_REGISTRY/$ECR_REPOSITORY" >> $GITHUB_OUTPUT
echo "full_image_${{ matrix.arch }}=$ECR_REGISTRY/$ECR_REPOSITORY:$PER_ARCH_IMAGE_TAG" >> $GITHUB_OUTPUT
create-ecr-manifest-per-arch:
runs-on: ubuntu-latest
needs: [build-and-upload-image-to-ecr]
steps:
- name: Grab image and registry/repository name from previous steps
id: ecr_names
env:
ECR_REGISTRY_REPOSITORY: ${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}
FULL_IMAGE_ARM64: ${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}
FULL_IMAGE_X86_64: ${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}
run: |
echo "full_image_arm64=$FULL_IMAGE_ARM64"
echo "ecr_registry_repository=$ECR_REGISTRY_REPOSITORY"
echo "full_image_x86_64=$FULL_IMAGE_X86_64"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ECR_UPLOAD_IAM_ROLE_ARN }}
aws-region: ${{ env.aws_region }}
- name: Login to Amazon ECR
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Create ECR manifest with explicit tag
if: github.event.release.name != ''
id: create-ecr-manifest-explicit
run: |
docker manifest create "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}"
- name: Annotate ECR manifest with explicit arm64 tag
if: github.event.release.name != ''
id: annotate-ecr-manifest-explicit-arm64
run: |
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}" \
--arch arm64 \
--os linux
- name: Annotate ECR manifest with explicit amd64 tag
if: github.event.release.name != ''
id: annotate-ecr-manifest-explicit-amd64
run: |
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
--arch amd64 \
--os linux
- name: Push ECR manifest with explicit version
if: github.event.release.name != ''
id: push-ecr-manifest-explicit
run: |
docker manifest push "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:$${{ github.event.release.name }}"
- name: Create ECR manifest with latest tag
id: create-ecr-manifest-latest
run: |
docker manifest create "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}"
- name: Annotate ECR manifest with latest tag arm64
id: annotate-ecr-manifest-latest-arm64
run: |
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}" \
--arch arm64 \
--os linux
- name: Annotate ECR manifest with latest tag amd64
id: annotate-ecr-manifest-latest-amd64
run: |
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}" \
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
--arch amd64 \
--os linux
- name: Push ECR manifest with latest
id: push-ecr-manifest-latest
run: |
docker manifest push "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}"
11 changes: 0 additions & 11 deletions .github/workflows/emulator-pr-template.md

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ dist/

examples/build/*
examples/*.zip

durable-executions.db*
.coverage
21 changes: 21 additions & 0 deletions emulator/DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.13-slim

WORKDIR /emulator

# Copy project files
COPY . .

# check that correct files are copied over
RUN ls

# Update the package lists and install Git
# The commands are combined to reduce the final image size
# uncomment if we need to depend directly on main branch
# RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recommends git && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*

# install emulator
RUN pip install --no-cache-dir -e .

ENTRYPOINT ["durable-functions-emulator"]

CMD ["--host", "0.0.0.0", "--port", "9014"]
Loading
Loading