Skip to content

Commit

Permalink
fix(ci): Add aws auth require for rust test with s3
Browse files Browse the repository at this point in the history
and other typo in var
  • Loading branch information
rahulinux committed Dec 10, 2024
1 parent 40cedcd commit aa28fdc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/actions/run-python-test-set/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ runs:
with:
name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build_type }}-artifact
path: /tmp/neon
aws_oicd_role_arn: ${{ inputs.DEV_AWS_OIDC_ROLE_ARN }}
aws_oicd_role_arn: ${{ inputs.aws_oicd_role_arn }}

- name: Download Neon binaries for the previous release
if: inputs.build_type != 'remote'
Expand All @@ -71,7 +71,7 @@ runs:
name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build_type }}-artifact
path: /tmp/neon-previous
prefix: latest
aws_oicd_role_arn: ${{ inputs.DEV_AWS_OIDC_ROLE_ARN }}
aws_oicd_role_arn: ${{ inputs.aws_oicd_role_arn }}

- name: Download compatibility snapshot
if: inputs.build_type != 'remote'
Expand All @@ -83,7 +83,7 @@ runs:
# The lack of compatibility snapshot (for example, for the new Postgres version)
# shouldn't fail the whole job. Only relevant test should fail.
skip-if-does-not-exist: true
aws_oicd_role_arn: ${{ inputs.DEV_AWS_OIDC_ROLE_ARN }}
aws_oicd_role_arn: ${{ inputs.aws_oicd_role_arn }}

- name: Checkout
if: inputs.needs_postgres_source == 'true'
Expand Down Expand Up @@ -236,3 +236,4 @@ runs:
with:
report-dir: /tmp/test_output/allure/results
unique-key: ${{ inputs.build_type }}-${{ inputs.pg_version }}
aws_oicd_role_arn: ${{ inputs.aws_oicd_role_arn }}
2 changes: 1 addition & 1 deletion .github/actions/save-coverage-data/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
name: coverage-data-artifact
path: /tmp/coverage
skip-if-does-not-exist: true # skip if there's no previous coverage to download
aws_oicd_role_arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
aws_oicd_role_arn: ${{ inputs.aws_oicd_role_arn }}

- name: Upload coverage data
uses: ./.github/actions/upload
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/_build-and-test-locally.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ jobs:
done
fi
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-central-1
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
role-duration-seconds: 18000 # 5 hours

- name: Run rust tests
env:
NEXTEST_RETRIES: 3
Expand Down Expand Up @@ -267,6 +274,10 @@ jobs:
regress-tests:
# Don't run regression tests on debug arm64 builds
if: inputs.build-type != 'debug' || inputs.arch != 'arm64'
permissions:
id-token: write # aws-actions/configure-aws-credentials
contents: read
statuses: write
needs: [ build-neon ]
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.arch == 'arm64' && 'large-arm64' || 'large')) }}
container:
Expand Down Expand Up @@ -297,6 +308,7 @@ jobs:
real_s3_region: eu-central-1
rerun_failed: true
pg_version: ${{ matrix.pg_version }}
aws_oicd_role_arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
env:
TEST_RESULT_CONNSTR: ${{ secrets.REGRESS_TEST_RESULT_CONNSTR_NEW }}
CHECK_ONDISK_DATA_COMPATIBILITY: nonempty
Expand Down

0 comments on commit aa28fdc

Please sign in to comment.