Skip to content

Commit 4615f1e

Browse files
authored
Fix deploy cancel (#272)
* Fix deploy cancel * Switch to !cancelled()
1 parent fd1979b commit 4615f1e

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jobs:
234234
cp -r /tmp/digests-router-amd64/private/* /tmp/digests-router/private/ || true
235235
cp -r /tmp/digests-router-arm64/public/* /tmp/digests-router/public/ || true
236236
cp -r /tmp/digests-router-arm64/private/* /tmp/digests-router/private/ || true
237-
237+
238238
# List files to verify
239239
echo "Public digests:"
240240
ls -la /tmp/digests-router/public/ || true
@@ -432,7 +432,7 @@ jobs:
432432
run: |
433433
mkdir -p /tmp/digests
434434
rm -rf /tmp/digests/* || true
435-
435+
436436
- name: Download x86_64 digests
437437
uses: actions/download-artifact@v4
438438
with:
@@ -444,13 +444,13 @@ jobs:
444444
with:
445445
name: digests-extension-aarch64
446446
path: /tmp/digests-aarch64
447-
447+
448448
- name: Merge digests
449449
run: |
450450
# Copy files from platform-specific folders to the main folder
451451
cp -r /tmp/digests-x86_64/* /tmp/digests/ || true
452452
cp -r /tmp/digests-aarch64/* /tmp/digests/ || true
453-
453+
454454
# List files to verify
455455
echo "Extension digests:"
456456
ls -la /tmp/digests/ || true
@@ -659,7 +659,7 @@ jobs:
659659
outputs:
660660
stack-url-suffix: ${{ steps.getDeployUrl.outputs.stack-url-suffix }}
661661
url: https://lambdadispatch${{ steps.getDeployUrl.outputs.stack-url-suffix }}.ghpublic.pwrdrvr.com
662-
if: ${{ always() && needs.install-deps.result != 'failed' }}
662+
if: ${{ !cancelled() && needs.install-deps.result != 'failed' }}
663663
env:
664664
DEMO_APP_REGISTRY_IMAGE: public.ecr.aws/pwrdrvr/lambda-dispatch-demo-app${{ github.event_name == 'pull_request' && '-dev' || '' }}
665665
ROUTER_REGISTRY_IMAGE: public.ecr.aws/pwrdrvr/lambda-dispatch-router${{ github.event_name == 'pull_request' && '-dev' || '' }}
@@ -706,7 +706,7 @@ jobs:
706706
smoke-test:
707707
needs: [deploy]
708708
runs-on: ubuntu-latest
709-
if: ${{ always() && needs.deploy.result != 'failed' }}
709+
if: ${{ !cancelled() && needs.deploy.result != 'failed' }}
710710
steps:
711711
- name: Smoke Test
712712
run: |
@@ -722,11 +722,11 @@ jobs:
722722
for i in {1..5}; do
723723
curl ${BASE_URL}/ping
724724
done
725-
725+
726726
create-status-checks:
727727
needs: [deploy, smoke-test]
728728
runs-on: ubuntu-latest
729-
if: ${{ always() && needs.deploy.result != 'failed' && github.event_name == 'pull_request' }}
729+
if: ${{ !cancelled() && needs.deploy.result != 'failed' && github.event_name == 'pull_request' }}
730730
steps:
731731
- name: Generate URLs
732732
id: generate-urls
@@ -737,15 +737,15 @@ jobs:
737737
echo "alb_demoapp=https://lambdadispatch-demoapp-pr-${PR_NUMBER}.ghpublic.pwrdrvr.com" >> $GITHUB_OUTPUT
738738
echo "nlb_router=https://lambdadispatch-nlb-pr-${PR_NUMBER}.ghpublic.pwrdrvr.com" >> $GITHUB_OUTPUT
739739
echo "nlb_demoapp=https://lambdadispatch-nlb-demoapp-pr-${PR_NUMBER}.ghpublic.pwrdrvr.com" >> $GITHUB_OUTPUT
740-
740+
741741
- name: Find Deployment URLs Comment
742742
uses: peter-evans/find-comment@v3
743743
id: find-comment
744744
with:
745745
issue-number: ${{ github.event.pull_request.number }}
746746
comment-author: 'github-actions[bot]'
747747
body-includes: '### 🚀 Deployment URLs'
748-
748+
749749
- name: Post Deployment URLs Comment
750750
uses: peter-evans/create-or-update-comment@v4
751751
with:
@@ -754,55 +754,55 @@ jobs:
754754
issue-number: ${{ github.event.pull_request.number }}
755755
body: |
756756
### 🚀 Deployment URLs
757-
757+
758758
#### Application Load Balancer (ALB)
759759
- **Router**: [${{ steps.generate-urls.outputs.alb_router }}](${{ steps.generate-urls.outputs.alb_router }})
760760
- **Demo App**: [${{ steps.generate-urls.outputs.alb_demoapp }}](${{ steps.generate-urls.outputs.alb_demoapp }})
761-
761+
762762
#### Network Load Balancer (NLB)
763763
- **Router (Port ${{ github.event.pull_request.number }})**: [${{ steps.generate-urls.outputs.nlb_router }}](${{ steps.generate-urls.outputs.nlb_router }})
764764
- **Demo App (Port ${{ github.event.pull_request.number }}+10000)**: [${{ steps.generate-urls.outputs.nlb_demoapp }}](${{ steps.generate-urls.outputs.nlb_demoapp }})
765-
765+
766766
### 🧪 Test Endpoints
767-
767+
768768
#### Basic Tests
769769
```bash
770770
# Simple ping test
771771
curl -v ${{ steps.generate-urls.outputs.alb_router }}/ping
772-
772+
773773
# View request headers
774774
curl ${{ steps.generate-urls.outputs.alb_router }}/headers
775-
775+
776776
# Delayed response (milliseconds)
777777
curl ${{ steps.generate-urls.outputs.alb_router }}/delay?delay=500
778778
```
779-
779+
780780
#### Load/Performance Tests
781781
```bash
782782
# Ping test with 100 concurrent requests (Hey)
783783
hey -h2 -c 100 -n 10000 ${{ steps.generate-urls.outputs.alb_router }}/ping
784-
784+
785785
# Ping test with controlled concurrency (oha)
786786
oha -c 20 -z 60s ${{ steps.generate-urls.outputs.alb_router }}/ping
787-
787+
788788
# Post and echo data
789789
curl -X POST -H "Content-Type: text/plain" --data "Hello World" ${{ steps.generate-urls.outputs.alb_router }}/echo
790790
```
791-
791+
792792
#### Advanced Features
793793
```bash
794794
# Chunked/streaming response
795795
curl ${{ steps.generate-urls.outputs.alb_router }}/chunked-response
796-
796+
797797
# Read from S3
798798
curl ${{ steps.generate-urls.outputs.alb_router }}/read-s3
799-
799+
800800
# Read from DynamoDB
801801
curl ${{ steps.generate-urls.outputs.alb_router }}/read
802802
```
803-
803+
804804
*Deployment updated: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}*
805-
805+
806806
# Create a single environment for the main deployment URL to show in PR checks
807807
- name: Update Main Environment
808808
env:

0 commit comments

Comments
 (0)