Skip to content

Commit 85072b7

Browse files
Merge pull request #11106 from neondatabase/rc/release-proxy/2025-03-06
Proxy release 2025-03-06
2 parents 66d5fe7 + 6c86fe7 commit 85072b7

File tree

141 files changed

+5702
-2685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+5702
-2685
lines changed

.github/actionlint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ config-variables:
3232
- NEON_DEV_AWS_ACCOUNT_ID
3333
- NEON_PROD_AWS_ACCOUNT_ID
3434
- AWS_ECR_REGION
35+
- BENCHMARK_LARGE_OLTP_PROJECTID

.github/actions/neon-branch-create/action.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ runs:
8484
--header "Authorization: Bearer ${API_KEY}"
8585
)
8686
87-
role_name=$(echo $roles | jq --raw-output '.roles[] | select(.protected == false) | .name')
87+
role_name=$(echo "$roles" | jq --raw-output '
88+
(.roles | map(select(.protected == false))) as $roles |
89+
if any($roles[]; .name == "neondb_owner")
90+
then "neondb_owner"
91+
else $roles[0].name
92+
end
93+
')
8894
echo "role_name=${role_name}" >> $GITHUB_OUTPUT
8995
env:
9096
API_HOST: ${{ inputs.api_host }}
@@ -107,13 +113,13 @@ runs:
107113
)
108114
109115
if [ -z "${reset_password}" ]; then
110-
sleep 1
116+
sleep $i
111117
continue
112118
fi
113119
114120
password=$(echo $reset_password | jq --raw-output '.role.password')
115121
if [ "${password}" == "null" ]; then
116-
sleep 1
122+
sleep $i # increasing backoff
117123
continue
118124
fi
119125

.github/actions/run-python-test-set/action.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ inputs:
4444
description: 'Postgres version to use for tests'
4545
required: false
4646
default: 'v16'
47+
sanitizers:
48+
description: 'enabled or disabled'
49+
required: false
50+
default: 'disabled'
51+
type: string
4752
benchmark_durations:
4853
description: 'benchmark durations JSON'
4954
required: false
@@ -59,7 +64,7 @@ runs:
5964
if: inputs.build_type != 'remote'
6065
uses: ./.github/actions/download
6166
with:
62-
name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build_type }}-artifact
67+
name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build_type }}${{ inputs.sanitizers == 'enabled' && '-sanitized' || '' }}-artifact
6368
path: /tmp/neon
6469
aws-oicd-role-arn: ${{ inputs.aws-oicd-role-arn }}
6570

@@ -112,6 +117,7 @@ runs:
112117
ALLOW_FORWARD_COMPATIBILITY_BREAKAGE: contains(github.event.pull_request.labels.*.name, 'forward compatibility breakage')
113118
RERUN_FAILED: ${{ inputs.rerun_failed }}
114119
PG_VERSION: ${{ inputs.pg_version }}
120+
SANITIZERS: ${{ inputs.sanitizers }}
115121
shell: bash -euxo pipefail {0}
116122
run: |
117123
# PLATFORM will be embedded in the perf test report

.github/workflows/_build-and-test-locally.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ jobs:
280280
- name: Upload Neon artifact
281281
uses: ./.github/actions/upload
282282
with:
283-
name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build-type }}-artifact
283+
name: neon-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build-type }}${{ inputs.sanitizers == 'enabled' && '-sanitized' || '' }}-artifact
284284
path: /tmp/neon
285285
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
286286

@@ -347,6 +347,7 @@ jobs:
347347
real_s3_region: eu-central-1
348348
rerun_failed: true
349349
pg_version: ${{ matrix.pg_version }}
350+
sanitizers: ${{ inputs.sanitizers }}
350351
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
351352
# `--session-timeout` is equal to (timeout-minutes - 10 minutes) * 60 seconds.
352353
# Attempt to stop tests gracefully to generate test reports
@@ -359,7 +360,6 @@ jobs:
359360
PAGESERVER_VIRTUAL_FILE_IO_ENGINE: tokio-epoll-uring
360361
PAGESERVER_GET_VECTORED_CONCURRENT_IO: sidecar-task
361362
USE_LFC: ${{ matrix.lfc_state == 'with-lfc' && 'true' || 'false' }}
362-
SANITIZERS: ${{ inputs.sanitizers }}
363363

364364
# Temporary disable this step until we figure out why it's so flaky
365365
# Ref https://github.com/neondatabase/neon/issues/4540

.github/workflows/benchmarking.yml

+2
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ jobs:
141141
--ignore test_runner/performance/test_physical_replication.py
142142
--ignore test_runner/performance/test_perf_ingest_using_pgcopydb.py
143143
--ignore test_runner/performance/test_cumulative_statistics_persistence.py
144+
--ignore test_runner/performance/test_perf_many_relations.py
145+
--ignore test_runner/performance/test_perf_oltp_large_tenant.py
144146
env:
145147
BENCHMARK_CONNSTR: ${{ steps.create-neon-project.outputs.dsn }}
146148
VIP_VAP_ACCESS_TOKEN: "${{ secrets.VIP_VAP_ACCESS_TOKEN }}"

.github/workflows/build_and_test.yml

+34-9
Original file line numberDiff line numberDiff line change
@@ -692,15 +692,15 @@ jobs:
692692
neondatabase/neon-test-extensions-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.version.debian }}-x64 \
693693
neondatabase/neon-test-extensions-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.version.debian }}-arm64
694694
695-
vm-compute-node-image:
695+
vm-compute-node-image-arch:
696696
needs: [ check-permissions, meta, compute-node-image ]
697697
if: ${{ contains(fromJSON('["push-main", "pr", "compute-release", "compute-rc-pr"]'), needs.meta.outputs.run-kind) }}
698-
runs-on: [ self-hosted, large ]
698+
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
699699
strategy:
700700
fail-fast: false
701701
matrix:
702+
arch: [ amd64, arm64 ]
702703
version:
703-
# see the comment for `compute-node-image-arch` job
704704
- pg: v14
705705
debian: bullseye
706706
- pg: v15
@@ -717,7 +717,7 @@ jobs:
717717

718718
- name: Downloading vm-builder
719719
run: |
720-
curl -fL https://github.com/neondatabase/autoscaling/releases/download/$VM_BUILDER_VERSION/vm-builder-amd64 -o vm-builder
720+
curl -fL https://github.com/neondatabase/autoscaling/releases/download/$VM_BUILDER_VERSION/vm-builder-${{ matrix.arch }} -o vm-builder
721721
chmod +x vm-builder
722722
723723
- uses: neondatabase/dev-actions/set-docker-config-dir@6094485bf440001c94a94a3f9e221e81ff6b6193
@@ -738,12 +738,37 @@ jobs:
738738
-size=2G \
739739
-spec=compute/vm-image-spec-${{ matrix.version.debian }}.yaml \
740740
-src=neondatabase/compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} \
741-
-dst=neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} \
742-
-target-arch=linux/amd64
741+
-dst=neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.arch }} \
742+
-target-arch=linux/${{ matrix.arch }}
743743
744744
- name: Pushing vm-compute-node image
745745
run: |
746-
docker push neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}
746+
docker push neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.arch }}
747+
748+
vm-compute-node-image:
749+
needs: [ vm-compute-node-image-arch, meta ]
750+
if: ${{ contains(fromJSON('["push-main", "pr", "compute-release", "compute-rc-pr"]'), needs.meta.outputs.run-kind) }}
751+
runs-on: ubuntu-22.04
752+
strategy:
753+
matrix:
754+
version:
755+
# see the comment for `compute-node-image-arch` job
756+
- pg: v14
757+
- pg: v15
758+
- pg: v16
759+
- pg: v17
760+
steps:
761+
- uses: docker/login-action@v3
762+
with:
763+
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
764+
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
765+
766+
- name: Create multi-arch compute-node image
767+
run: |
768+
docker buildx imagetools create -t neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} \
769+
neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-amd64 \
770+
neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-arm64
771+
747772
748773
test-images:
749774
needs: [ check-permissions, meta, neon-image, compute-node-image ]
@@ -831,7 +856,7 @@ jobs:
831856
|| needs.meta.outputs.run-kind == 'pr' && needs.meta.outputs.build-tag
832857
|| needs.meta.outputs.run-kind == 'compute-rc-pr' && needs.meta.outputs.previous-storage-release
833858
}}
834-
TEST_EXTENSIONS_TAG: latest
859+
TEST_EXTENSIONS_TAG: ${{ needs.meta.outputs.previous-compute-release }}
835860
NEW_COMPUTE_TAG: ${{ needs.meta.outputs.build-tag }}
836861
OLD_COMPUTE_TAG: ${{ needs.meta.outputs.previous-compute-release }}
837862
run: ./docker-compose/test_extensions_upgrade.sh
@@ -1036,7 +1061,7 @@ jobs:
10361061
exit 1
10371062
10381063
deploy:
1039-
needs: [ check-permissions, push-neon-image-prod, push-compute-image-prod, meta, build-and-test-locally, trigger-custom-extensions-build-and-wait ]
1064+
needs: [ check-permissions, push-neon-image-dev, push-compute-image-dev, push-neon-image-prod, push-compute-image-prod, meta, build-and-test-locally, trigger-custom-extensions-build-and-wait ]
10401065
# `!failure() && !cancelled()` is required because the workflow depends on the job that can be skipped: `push-neon-image-prod` and `push-compute-image-prod`
10411066
if: ${{ contains(fromJSON('["push-main", "storage-release", "proxy-release", "compute-release"]'), needs.meta.outputs.run-kind) && !failure() && !cancelled() }}
10421067
permissions:

.github/workflows/force-test-extensions-upgrade.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ jobs:
5252
- name: Test extension upgrade
5353
timeout-minutes: 20
5454
env:
55-
NEWTAG: latest
56-
OLDTAG: ${{ steps.get-last-compute-release-tag.outputs.tag }}
55+
NEW_COMPUTE_TAG: latest
56+
OLD_COMPUTE_TAG: ${{ steps.get-last-compute-release-tag.outputs.tag }}
57+
TEST_EXTENSIONS_TAG: ${{ steps.get-last-compute-release-tag.outputs.tag }}
5758
PG_VERSION: ${{ matrix.pg-version }}
5859
FORCE_ALL_UPGRADE_TESTS: true
5960
run: ./docker-compose/test_extensions_upgrade.sh
+147
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: large oltp benchmark
2+
3+
on:
4+
# uncomment to run on push for debugging your PR
5+
push:
6+
branches: [ bodobolero/synthetic_oltp_workload ]
7+
8+
schedule:
9+
# * is a special character in YAML so you have to quote this string
10+
# ┌───────────── minute (0 - 59)
11+
# │ ┌───────────── hour (0 - 23)
12+
# │ │ ┌───────────── day of the month (1 - 31)
13+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
14+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
15+
- cron: '0 15 * * *' # run once a day, timezone is utc, avoid conflict with other benchmarks
16+
workflow_dispatch: # adds ability to run this manually
17+
18+
defaults:
19+
run:
20+
shell: bash -euxo pipefail {0}
21+
22+
concurrency:
23+
# Allow only one workflow globally because we need dedicated resources which only exist once
24+
group: large-oltp-bench-workflow
25+
cancel-in-progress: true
26+
27+
jobs:
28+
oltp:
29+
strategy:
30+
fail-fast: false # allow other variants to continue even if one fails
31+
matrix:
32+
include:
33+
- target: new_branch
34+
custom_scripts: insert_webhooks.sql@2 select_any_webhook_with_skew.sql@4 select_recent_webhook.sql@4
35+
- target: reuse_branch
36+
custom_scripts: insert_webhooks.sql@2 select_any_webhook_with_skew.sql@4 select_recent_webhook.sql@4
37+
max-parallel: 1 # we want to run each stripe size sequentially to be able to compare the results
38+
permissions:
39+
contents: write
40+
statuses: write
41+
id-token: write # aws-actions/configure-aws-credentials
42+
env:
43+
TEST_PG_BENCH_DURATIONS_MATRIX: "1h" # todo update to > 1 h
44+
TEST_PGBENCH_CUSTOM_SCRIPTS: ${{ matrix.custom_scripts }}
45+
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
46+
PG_VERSION: 16 # pre-determined by pre-determined project
47+
TEST_OUTPUT: /tmp/test_output
48+
BUILD_TYPE: remote
49+
SAVE_PERF_REPORT: ${{ github.ref_name == 'main' }}
50+
PLATFORM: ${{ matrix.target }}
51+
52+
runs-on: [ self-hosted, us-east-2, x64 ]
53+
container:
54+
image: neondatabase/build-tools:pinned-bookworm
55+
credentials:
56+
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
57+
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
58+
options: --init
59+
60+
# Increase timeout to 8h, default timeout is 6h
61+
timeout-minutes: 480
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Configure AWS credentials # necessary to download artefacts
67+
uses: aws-actions/configure-aws-credentials@v4
68+
with:
69+
aws-region: eu-central-1
70+
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
71+
role-duration-seconds: 18000 # 5 hours is currently max associated with IAM role
72+
73+
- name: Download Neon artifact
74+
uses: ./.github/actions/download
75+
with:
76+
name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact
77+
path: /tmp/neon/
78+
prefix: latest
79+
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
80+
81+
- name: Create Neon Branch for large tenant
82+
if: ${{ matrix.target == 'new_branch' }}
83+
id: create-neon-branch-oltp-target
84+
uses: ./.github/actions/neon-branch-create
85+
with:
86+
project_id: ${{ vars.BENCHMARK_LARGE_OLTP_PROJECTID }}
87+
api_key: ${{ secrets.NEON_STAGING_API_KEY }}
88+
89+
- name: Set up Connection String
90+
id: set-up-connstr
91+
run: |
92+
case "${{ matrix.target }}" in
93+
new_branch)
94+
CONNSTR=${{ steps.create-neon-branch-oltp-target.outputs.dsn }}
95+
;;
96+
reuse_branch)
97+
CONNSTR=${{ secrets.BENCHMARK_LARGE_OLTP_REUSE_CONNSTR }}
98+
;;
99+
*)
100+
echo >&2 "Unknown target=${{ matrix.target }}"
101+
exit 1
102+
;;
103+
esac
104+
105+
echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT
106+
107+
- name: Benchmark pgbench with custom-scripts
108+
uses: ./.github/actions/run-python-test-set
109+
with:
110+
build_type: ${{ env.BUILD_TYPE }}
111+
test_selection: performance
112+
run_in_parallel: false
113+
save_perf_report: ${{ env.SAVE_PERF_REPORT }}
114+
extra_params: -m remote_cluster --timeout 21600 -k test_perf_oltp_large_tenant
115+
pg_version: ${{ env.PG_VERSION }}
116+
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
117+
env:
118+
BENCHMARK_CONNSTR: ${{ steps.set-up-connstr.outputs.connstr }}
119+
VIP_VAP_ACCESS_TOKEN: "${{ secrets.VIP_VAP_ACCESS_TOKEN }}"
120+
PERF_TEST_RESULT_CONNSTR: "${{ secrets.PERF_TEST_RESULT_CONNSTR }}"
121+
122+
- name: Delete Neon Branch for large tenant
123+
if: ${{ always() && matrix.target == 'new_branch' }}
124+
uses: ./.github/actions/neon-branch-delete
125+
with:
126+
project_id: ${{ vars.BENCHMARK_LARGE_OLTP_PROJECTID }}
127+
branch_id: ${{ steps.create-neon-branch-oltp-target.outputs.branch_id }}
128+
api_key: ${{ secrets.NEON_STAGING_API_KEY }}
129+
130+
- name: Create Allure report
131+
id: create-allure-report
132+
if: ${{ !cancelled() }}
133+
uses: ./.github/actions/allure-report-generate
134+
with:
135+
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
136+
137+
- name: Post to a Slack channel
138+
if: ${{ github.event.schedule && failure() }}
139+
uses: slackapi/slack-github-action@v1
140+
with:
141+
channel-id: "C06KHQVQ7U3" # on-call-qa-staging-stream
142+
slack-message: |
143+
Periodic large oltp perf testing: ${{ job.status }}
144+
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Run>
145+
<${{ steps.create-allure-report.outputs.report-url }}|Allure report>
146+
env:
147+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/periodic_pagebench.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ jobs:
7878
run: |
7979
if [ -z "$INPUT_COMMIT_HASH" ]; then
8080
echo "COMMIT_HASH=$(curl -s https://api.github.com/repos/neondatabase/neon/commits/main | jq -r '.sha')" >> $GITHUB_ENV
81+
echo "COMMIT_HASH_TYPE=latest" >> $GITHUB_ENV
8182
else
8283
echo "COMMIT_HASH=$INPUT_COMMIT_HASH" >> $GITHUB_ENV
84+
echo "COMMIT_HASH_TYPE=manual" >> $GITHUB_ENV
8385
fi
8486
8587
- name: Start Bench with run_id
@@ -89,7 +91,7 @@ jobs:
8991
-H 'accept: application/json' \
9092
-H 'Content-Type: application/json' \
9193
-H "Authorization: Bearer $API_KEY" \
92-
-d "{\"neonRepoCommitHash\": \"${COMMIT_HASH}\"}"
94+
-d "{\"neonRepoCommitHash\": \"${COMMIT_HASH}\", \"neonRepoCommitHashType\": \"${COMMIT_HASH_TYPE}\"}"
9395
9496
- name: Poll Test Status
9597
id: poll_step

0 commit comments

Comments
 (0)