diff --git a/.github/actions/run-python-test-set/action.yml b/.github/actions/run-python-test-set/action.yml index 91d2f7b998..bd1ac828e2 100644 --- a/.github/actions/run-python-test-set/action.yml +++ b/.github/actions/run-python-test-set/action.yml @@ -1,53 +1,53 @@ -name: 'Run python test' -description: 'Runs a Neon python test set, performing all the required preparations before' +name: "Run python test" +description: "Runs a Neon python test set, performing all the required preparations before" inputs: build_type: description: 'Type of Rust (neon) and C (postgres) builds. Must be "release" or "debug", or "remote" for the remote cluster' required: true test_selection: - description: 'A python test suite to run' + description: "A python test suite to run" required: true extra_params: description: 'Arbitrary parameters to pytest. For example "-s" to prevent capturing stdout/stderr' required: false - default: '' + default: "" needs_postgres_source: - description: 'Set to true if the test suite requires postgres source checked out' + description: "Set to true if the test suite requires postgres source checked out" required: false - default: 'false' + default: "false" run_in_parallel: - description: 'Whether to run tests in parallel' + description: "Whether to run tests in parallel" required: false - default: 'true' + default: "true" save_perf_report: - description: 'Whether to upload the performance report, if true PERF_TEST_RESULT_CONNSTR env variable should be set' + description: "Whether to upload the performance report, if true PERF_TEST_RESULT_CONNSTR env variable should be set" required: false - default: 'false' + default: "false" run_with_real_s3: - description: 'Whether to pass real s3 credentials to the test suite' + description: "Whether to pass real s3 credentials to the test suite" required: false - default: 'false' + default: "false" real_s3_bucket: - description: 'Bucket name for real s3 tests' + description: "Bucket name for real s3 tests" required: false - default: '' + default: "" real_s3_region: - description: 'Region name for real s3 tests' + description: "Region name for real s3 tests" required: false - default: '' + default: "" rerun_flaky: - description: 'Whether to rerun flaky tests' + description: "Whether to rerun flaky tests" required: false - default: 'false' + default: "false" pg_version: - description: 'Postgres version to use for tests' + description: "Postgres version to use for tests" required: false - default: 'v16' + default: "v16" benchmark_durations: - description: 'benchmark durations JSON' + description: "benchmark durations JSON" required: false - default: '{}' + default: "{}" runs: using: "composite" @@ -56,14 +56,14 @@ runs: if: inputs.build_type != 'remote' uses: ./.github/actions/download with: - name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build_type }}-artifact + name: neon-${{ runner.os }}-bookworm-${{ inputs.build_type }}-artifact path: /tmp/neon - name: Download Neon binaries for the previous release if: inputs.build_type != 'remote' uses: ./.github/actions/download with: - name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build_type }}-artifact + name: neon-${{ runner.os }}-bookworm-${{ inputs.build_type }}-artifact path: /tmp/neon-previous prefix: latest diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index ad0be6f485..e0759a5f95 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -401,7 +401,7 @@ jobs: - name: Upload Neon artifact uses: ./.github/actions/upload with: - name: neon-${{ runner.os }}-${{ matrix.build_type }}-artifact + name: neon-${{ runner.os }}-bookworm-${{ matrix.build_type }}-artifact path: /tmp/neon # XXX: keep this after the binaries.list is formed, so the coverage can properly work later @@ -629,7 +629,7 @@ jobs: - name: Get Neon artifact uses: ./.github/actions/download with: - name: neon-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build_type }}-artifact + name: neon-${{ runner.os }}-bookworm-${{ matrix.build_type }}-artifact path: /tmp/neon - name: Get coverage artifact @@ -1384,8 +1384,18 @@ jobs: done done - for f in "${files_to_promote[@]}"; do - time aws s3 cp --only-show-errors ${f} s3://${BUCKET}/${new_prefix}/ + # Update Neon artifact for the release (reuse already uploaded artifact) + for build_type in debug release; do + OLD_PREFIX=artifacts/${GITHUB_RUN_ID} + FILENAME=neon-${{ runner.os }}-bookworm-${build_type}-artifact.tar.zst + + S3_KEY=$(aws s3api list-objects-v2 --bucket ${BUCKET} --prefix ${OLD_PREFIX} | jq -r '.Contents[]?.Key' | grep ${FILENAME} | sort --version-sort | tail -1 || true) + if [ -z "${S3_KEY}" ]; then + echo >&2 "Neither s3://${BUCKET}/${OLD_PREFIX}/${FILENAME} nor its version from previous attempts exist" + exit 1 + fi + + time aws s3 cp --only-show-errors s3://${BUCKET}/${S3_KEY} s3://${BUCKET}/${PREFIX}/${FILENAME} done pin-build-tools-image: