Skip to content

Commit 8b62ea8

Browse files
d4l3kfacebook-github-bot
authored andcommitted
github workfows: allow credentials failure for runs with no secrets (#390)
Summary: Pull Request resolved: #390 https://github.com/pytorch/torchx/runs/5191403515?check_suite_focus=true {F701191215} Our integration tests now fail when exporting from Meta or on external PRs because there's no secrets available to run the integration tests. We used to continue and dryrun the tests but that behavior regressed in adcfcd7 this restores that continue behavior. Reviewed By: kiukchung Differential Revision: D34223966 fbshipit-source-id: 0f5bb62716f3bed9f933343508391031e0ff44fa
1 parent adcfcd7 commit 8b62ea8

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
lines changed

.github/workflows/aws-batch-integration-tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ jobs:
2626
aws-region: us-west-2
2727
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
2828
role-session-name: github-torchx
29+
continue-on-error: true
2930
- name: Install dependencies
3031
run: |
3132
set -eux
3233
pip install -e .[dev]
3334
- name: Run AWS Batch Integration Tests
35+
env:
36+
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
3437
run: |
3538
set -ex
3639

.github/workflows/components-integration-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
aws-region: us-west-2
2727
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
2828
role-session-name: github-torchx
29+
continue-on-error: true
2930
- name: Configure Kube Config
3031
env:
3132
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}

.github/workflows/kfp-integration-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
aws-region: us-west-2
2828
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
2929
role-session-name: github-torchx
30+
continue-on-error: true
3031
- name: Configure Kube Config
3132
env:
3233
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}

.github/workflows/kubernetes-dist-train-integration-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
aws-region: us-west-2
2727
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
2828
role-session-name: github-torchx
29+
continue-on-error: true
2930
- name: Configure Kube Config
3031
env:
3132
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}

.github/workflows/slurm-integration-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
aws-region: us-west-2
2727
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
2828
role-session-name: github-torchx
29+
continue-on-error: true
2930
- name: Install Dependencies
3031
run:
3132
set -ex

scripts/awsbatchint.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77

88
set -ex
99

10-
APP_ID="$(torchx run --wait --scheduler aws_batch -c queue=torchx utils.echo)"
11-
torchx status "$APP_ID"
12-
torchx describe "$APP_ID"
13-
torchx log "$APP_ID"
14-
LINES="$(torchx log "$APP_ID" | wc -l)"
10+
if [ -z "$AWS_ROLE_ARN" ]; then
11+
# only dryrun if no secrets
12+
torchx run --wait --scheduler aws_batch --dryrun -c queue=torchx utils.echo
13+
else
14+
APP_ID="$(torchx run --wait --scheduler aws_batch -c queue=torchx utils.echo)"
15+
torchx status "$APP_ID"
16+
torchx describe "$APP_ID"
17+
torchx log "$APP_ID"
18+
LINES="$(torchx log "$APP_ID" | wc -l)"
1519

16-
if [ "$LINES" -ne 1 ]
17-
then
18-
echo "expected 1 log lines"
19-
exit 1
20+
if [ "$LINES" -ne 1 ]
21+
then
22+
echo "expected 1 log lines"
23+
exit 1
24+
fi
2025
fi

0 commit comments

Comments
 (0)