Skip to content

Commit c1e1e82

Browse files
committed
chore: try directly using dex-local-runner start-server command
1 parent 26e4cc9 commit c1e1e82

15 files changed

Lines changed: 36 additions & 863 deletions

File tree

.github/workflows/ecr-release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ name: ecr-release.yml
22
on:
33
release:
44
types: [published]
5+
push:
6+
branches: [feat/publish-emulator-image]
57

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

1012
env:
11-
path_to_dockerfile: "emulator/DockerFile"
12-
docker_build_dir: "emulator/"
13+
path_to_dockerfile: "/DockerFile"
14+
docker_build_dir: "/"
1315
aws_region: "us-east-1"
1416
ecr_repository_name: "o4w4w0v6/aws-durable-execution-emulator"
1517

@@ -26,12 +28,11 @@ jobs:
2628
- arch: x86_64
2729
- arch: arm64
2830
steps:
29-
- name: Grab version from generate-version job
31+
- name: Get version from __about__.py
3032
id: version
31-
env:
32-
VERSION: $${{ github.event.release.name }}
3333
run: |
34-
echo "$VERSION"
34+
VERSION=$(python -c "from src.aws_durable_execution_sdk_python_testing.__about__ import __version__; print(__version__)")
35+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
3536
- uses: actions/checkout@v6
3637
- name: Set up Python
3738
uses: actions/setup-python@v6
@@ -47,6 +48,8 @@ jobs:
4748
uses: docker/setup-qemu-action@v3
4849
with:
4950
platforms: arm64
51+
- name: Build distribution
52+
run: hatch build
5053
- name: Configure AWS Credentials
5154
uses: aws-actions/configure-aws-credentials@v4
5255
with:
@@ -105,30 +108,30 @@ jobs:
105108
if: github.event.release.name != ''
106109
id: create-ecr-manifest-explicit
107110
run: |
108-
docker manifest create "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
111+
docker manifest create "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}" \
109112
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
110113
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}"
111114
- name: Annotate ECR manifest with explicit arm64 tag
112115
if: github.event.release.name != ''
113116
id: annotate-ecr-manifest-explicit-arm64
114117
run: |
115-
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
118+
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}" \
116119
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}" \
117120
--arch arm64 \
118121
--os linux
119122
- name: Annotate ECR manifest with explicit amd64 tag
120123
if: github.event.release.name != ''
121124
id: annotate-ecr-manifest-explicit-amd64
122125
run: |
123-
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
126+
docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}" \
124127
"${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
125128
--arch amd64 \
126129
--os linux
127130
- name: Push ECR manifest with explicit version
128131
if: github.event.release.name != ''
129132
id: push-ecr-manifest-explicit
130133
run: |
131-
docker manifest push "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:$${{ github.event.release.name }}"
134+
docker manifest push "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}"
132135
- name: Create ECR manifest with latest tag
133136
id: create-ecr-manifest-latest
134137
run: |

DockerFile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM python:3.13-slim
2+
3+
# Copy and install the wheel
4+
COPY dist/*.whl /tmp/
5+
RUN pip install --no-cache-dir /tmp/*.whl && rm -rf /tmp/*.whl
6+
7+
# AWS credentials (required for boto3)
8+
ENV AWS_ACCESS_KEY_ID=foo \
9+
AWS_SECRET_ACCESS_KEY=bar \
10+
AWS_DEFAULT_REGION=us-east-1
11+
12+
EXPOSE 9014
13+
14+
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s \
15+
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:9014/health').read()" || exit 1
16+
17+
CMD ["dex-local-runner", "start-server", \
18+
"--host", "0.0.0.0", \
19+
"--port", "9014", \
20+
"--log-level", "DEBUG", \
21+
"--lambda-endpoint", "http://host.docker.internal:3001", \
22+
"--store-type", "sqlite", \
23+
"--store-path", "/tmp/.durable-executions-local/durable-executions.db"]

emulator/DockerFile

Lines changed: 0 additions & 21 deletions
This file was deleted.

emulator/README.md

Lines changed: 0 additions & 125 deletions
This file was deleted.

emulator/pyproject.toml

Lines changed: 0 additions & 125 deletions
This file was deleted.

emulator/src/aws_lambda_durable_functions_emulator/__about__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

emulator/src/aws_lambda_durable_functions_emulator/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

emulator/src/aws_lambda_durable_functions_emulator/__main__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)