Skip to content

Commit a3e9140

Browse files
authored
Merge pull request #11039 from neondatabase/rc/release-compute/2025-02-28
Compute release 2025-02-28
2 parents bcfc633 + 0d3f7a2 commit a3e9140

File tree

438 files changed

+9468
-6633
lines changed

Some content is hidden

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

438 files changed

+9468
-6633
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
!compute/
1515
!compute_tools/
1616
!control_plane/
17+
!docker-compose/ext-src
1718
!libs/
1819
!pageserver/
1920
!pgxn/

scripts/generate_image_maps.py .github/scripts/generate_image_maps.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
registries = {
2828
"dev": [
2929
"docker.io/neondatabase",
30+
"ghcr.io/neondatabase",
3031
f"{dev_aws}.dkr.ecr.{aws_region}.amazonaws.com",
3132
f"{dev_acr}.azurecr.io/neondatabase",
3233
],

.github/scripts/previous-releases.jq

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Expects response from https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#list-releases as input,
2+
# with tag names `release` for storage, `release-compute` for compute and `release-proxy` for proxy releases.
3+
# Extract only the `tag_name` field from each release object
4+
[ .[].tag_name ]
5+
6+
# Transform each tag name into a structured object using regex capture
7+
| reduce map(
8+
capture("^(?<full>release(-(?<component>proxy|compute))?-(?<version>\\d+))$")
9+
| {
10+
component: (.component // "storage"), # Default to "storage" if no component is specified
11+
version: (.version | tonumber), # Convert the version number to an integer
12+
full: .full # Store the full tag name for final output
13+
}
14+
)[] as $entry # Loop over the transformed list
15+
16+
# Accumulate the latest (highest-numbered) version for each component
17+
({};
18+
.[$entry.component] |= (if . == null or $entry.version > .version then $entry else . end))
19+
20+
# Convert the resulting object into an array of formatted strings
21+
| to_entries
22+
| map("\(.key)=\(.value.full)")
23+
24+
# Output each string separately
25+
| .[]
File renamed without changes.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ jobs:
337337
- name: Pytest regression tests
338338
continue-on-error: ${{ matrix.lfc_state == 'with-lfc' && inputs.build-type == 'debug' }}
339339
uses: ./.github/actions/run-python-test-set
340-
timeout-minutes: ${{ inputs.sanitizers != 'enabled' && 60 || 180 }}
340+
timeout-minutes: ${{ inputs.sanitizers != 'enabled' && 75 || 180 }}
341341
with:
342342
build_type: ${{ inputs.build-type }}
343343
test_selection: regress

.github/workflows/_meta.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Generate run metadata
2+
on:
3+
workflow_call:
4+
inputs:
5+
github-event-name:
6+
type: string
7+
required: true
8+
outputs:
9+
build-tag:
10+
description: "Tag for the current workflow run"
11+
value: ${{ jobs.tags.outputs.build-tag }}
12+
previous-storage-release:
13+
description: "Tag of the last storage release"
14+
value: ${{ jobs.tags.outputs.storage }}
15+
previous-proxy-release:
16+
description: "Tag of the last proxy release"
17+
value: ${{ jobs.tags.outputs.proxy }}
18+
previous-compute-release:
19+
description: "Tag of the last compute release"
20+
value: ${{ jobs.tags.outputs.compute }}
21+
run-kind:
22+
description: "The kind of run we're currently in. Will be one of `pr`, `push-main`, `storage-rc`, `storage-release`, `proxy-rc`, `proxy-release`, `compute-rc`, `compute-release` or `merge_queue`"
23+
value: ${{ jobs.tags.outputs.run-kind }}
24+
25+
permissions: {}
26+
27+
jobs:
28+
tags:
29+
runs-on: ubuntu-22.04
30+
outputs:
31+
build-tag: ${{ steps.build-tag.outputs.tag }}
32+
compute: ${{ steps.previous-releases.outputs.compute }}
33+
proxy: ${{ steps.previous-releases.outputs.proxy }}
34+
storage: ${{ steps.previous-releases.outputs.storage }}
35+
run-kind: ${{ steps.run-kind.outputs.run-kind }}
36+
permissions:
37+
contents: read
38+
steps:
39+
# Need `fetch-depth: 0` to count the number of commits in the branch
40+
- uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
43+
44+
- name: Get run kind
45+
id: run-kind
46+
env:
47+
RUN_KIND: >-
48+
${{
49+
false
50+
|| (inputs.github-event-name == 'push' && github.ref_name == 'main') && 'push-main'
51+
|| (inputs.github-event-name == 'push' && github.ref_name == 'release') && 'storage-release'
52+
|| (inputs.github-event-name == 'push' && github.ref_name == 'release-compute') && 'compute-release'
53+
|| (inputs.github-event-name == 'push' && github.ref_name == 'release-proxy') && 'proxy-release'
54+
|| (inputs.github-event-name == 'pull_request' && github.base_ref == 'release') && 'storage-rc-pr'
55+
|| (inputs.github-event-name == 'pull_request' && github.base_ref == 'release-compute') && 'compute-rc-pr'
56+
|| (inputs.github-event-name == 'pull_request' && github.base_ref == 'release-proxy') && 'proxy-rc-pr'
57+
|| (inputs.github-event-name == 'pull_request') && 'pr'
58+
|| 'unknown'
59+
}}
60+
run: |
61+
echo "run-kind=$RUN_KIND" | tee -a $GITHUB_OUTPUT
62+
63+
- name: Get build tag
64+
id: build-tag
65+
env:
66+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}
68+
CURRENT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
69+
RUN_KIND: ${{ steps.run-kind.outputs.run-kind }}
70+
run: |
71+
case $RUN_KIND in
72+
push-main)
73+
echo "tag=$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT
74+
;;
75+
storage-release)
76+
echo "tag=release-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT
77+
;;
78+
proxy-release)
79+
echo "tag=release-proxy-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT
80+
;;
81+
compute-release)
82+
echo "tag=release-compute-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT
83+
;;
84+
pr|storage-rc-pr|compute-rc-pr|proxy-rc-pr)
85+
BUILD_AND_TEST_RUN_ID=$(gh run list -b $CURRENT_BRANCH -c $CURRENT_SHA -w 'Build and Test' -L 1 --json databaseId --jq '.[].databaseId')
86+
echo "tag=$BUILD_AND_TEST_RUN_ID" | tee -a $GITHUB_OUTPUT
87+
;;
88+
*)
89+
echo "Unexpected RUN_KIND ('${RUN_KIND}'), failing to assign build-tag!"
90+
exit 1
91+
esac
92+
93+
- name: Get the previous release-tags
94+
id: previous-releases
95+
env:
96+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
run: |
98+
gh api --paginate \
99+
-H "Accept: application/vnd.github+json" \
100+
-H "X-GitHub-Api-Version: 2022-11-28" \
101+
"/repos/${GITHUB_REPOSITORY}/releases" \
102+
| jq -f .github/scripts/previous-releases.jq -r \
103+
| tee -a "${GITHUB_OUTPUT}"

.github/workflows/_push-to-container-registry.yml

+21-18
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ on:
1111
description: AWS region to log in to. Required when pushing to ECR.
1212
required: false
1313
type: string
14-
aws-account-ids:
15-
description: Comma separated AWS account IDs to log in to for pushing to ECR. Required when pushing to ECR.
14+
aws-account-id:
15+
description: AWS account ID to log in to for pushing to ECR. Required when pushing to ECR.
16+
required: false
17+
type: string
18+
aws-role-to-assume:
19+
description: AWS role to assume to for pushing to ECR. Required when pushing to ECR.
1620
required: false
1721
type: string
1822
azure-client-id:
@@ -31,16 +35,6 @@ on:
3135
description: ACR registry name. Required when pushing to ACR.
3236
required: false
3337
type: string
34-
secrets:
35-
docker-hub-username:
36-
description: Docker Hub username. Required when pushing to Docker Hub.
37-
required: false
38-
docker-hub-password:
39-
description: Docker Hub password. Required when pushing to Docker Hub.
40-
required: false
41-
aws-role-to-assume:
42-
description: AWS role to assume. Required when pushing to ECR.
43-
required: false
4438

4539
permissions: {}
4640

@@ -53,10 +47,11 @@ jobs:
5347
runs-on: ubuntu-22.04
5448
permissions:
5549
id-token: write # Required for aws/azure login
50+
packages: write # required for pushing to GHCR
5651
steps:
5752
- uses: actions/checkout@v4
5853
with:
59-
sparse-checkout: scripts/push_with_image_map.py
54+
sparse-checkout: .github/scripts/push_with_image_map.py
6055
sparse-checkout-cone-mode: false
6156

6257
- name: Print image-map
@@ -67,14 +62,14 @@ jobs:
6762
uses: aws-actions/configure-aws-credentials@v4
6863
with:
6964
aws-region: "${{ inputs.aws-region }}"
70-
role-to-assume: "${{ secrets.aws-role-to-assume }}"
65+
role-to-assume: "arn:aws:iam::${{ inputs.aws-account-id }}:role/${{ inputs.aws-role-to-assume }}"
7166
role-duration-seconds: 3600
7267

7368
- name: Login to ECR
7469
if: contains(inputs.image-map, 'amazonaws.com/')
7570
uses: aws-actions/amazon-ecr-login@v2
7671
with:
77-
registries: "${{ inputs.aws-account-ids }}"
72+
registries: "${{ inputs.aws-account-id }}"
7873

7974
- name: Configure Azure credentials
8075
if: contains(inputs.image-map, 'azurecr.io/')
@@ -89,13 +84,21 @@ jobs:
8984
run: |
9085
az acr login --name=${{ inputs.acr-registry-name }}
9186
87+
- name: Login to GHCR
88+
if: contains(inputs.image-map, 'ghcr.io/')
89+
uses: docker/login-action@v3
90+
with:
91+
registry: ghcr.io
92+
username: ${{ github.repository_owner }}
93+
password: ${{ secrets.GITHUB_TOKEN }}
94+
9295
- name: Log in to Docker Hub
9396
uses: docker/login-action@v3
9497
with:
95-
username: ${{ secrets.docker-hub-username }}
96-
password: ${{ secrets.docker-hub-password }}
98+
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
99+
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
97100

98101
- name: Copy docker images to target registries
99-
run: python scripts/push_with_image_map.py
102+
run: python3 .github/scripts/push_with_image_map.py
100103
env:
101104
IMAGE_MAP: ${{ inputs.image-map }}

.github/workflows/benchmarking.yml

+59
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
--ignore test_runner/performance/test_logical_replication.py
141141
--ignore test_runner/performance/test_physical_replication.py
142142
--ignore test_runner/performance/test_perf_ingest_using_pgcopydb.py
143+
--ignore test_runner/performance/test_cumulative_statistics_persistence.py
143144
env:
144145
BENCHMARK_CONNSTR: ${{ steps.create-neon-project.outputs.dsn }}
145146
VIP_VAP_ACCESS_TOKEN: "${{ secrets.VIP_VAP_ACCESS_TOKEN }}"
@@ -171,6 +172,61 @@ jobs:
171172
env:
172173
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
173174

175+
cumstats-test:
176+
if: ${{ github.event.inputs.run_only_pgvector_tests == 'false' || github.event.inputs.run_only_pgvector_tests == null }}
177+
permissions:
178+
contents: write
179+
statuses: write
180+
id-token: write # aws-actions/configure-aws-credentials
181+
env:
182+
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
183+
DEFAULT_PG_VERSION: 17
184+
TEST_OUTPUT: /tmp/test_output
185+
BUILD_TYPE: remote
186+
SAVE_PERF_REPORT: ${{ github.event.inputs.save_perf_report || ( github.ref_name == 'main' ) }}
187+
PLATFORM: "neon-staging"
188+
189+
runs-on: [ self-hosted, us-east-2, x64 ]
190+
container:
191+
image: neondatabase/build-tools:pinned-bookworm
192+
credentials:
193+
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
194+
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
195+
options: --init
196+
197+
steps:
198+
- uses: actions/checkout@v4
199+
200+
- name: Configure AWS credentials
201+
uses: aws-actions/configure-aws-credentials@v4
202+
with:
203+
aws-region: eu-central-1
204+
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
205+
role-duration-seconds: 18000 # 5 hours
206+
207+
- name: Download Neon artifact
208+
uses: ./.github/actions/download
209+
with:
210+
name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact
211+
path: /tmp/neon/
212+
prefix: latest
213+
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
214+
215+
- name: Verify that cumulative statistics are preserved
216+
uses: ./.github/actions/run-python-test-set
217+
with:
218+
build_type: ${{ env.BUILD_TYPE }}
219+
test_selection: performance/test_cumulative_statistics_persistence.py
220+
run_in_parallel: false
221+
save_perf_report: ${{ env.SAVE_PERF_REPORT }}
222+
extra_params: -m remote_cluster --timeout 3600
223+
pg_version: ${{ env.DEFAULT_PG_VERSION }}
224+
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
225+
env:
226+
VIP_VAP_ACCESS_TOKEN: "${{ secrets.VIP_VAP_ACCESS_TOKEN }}"
227+
PERF_TEST_RESULT_CONNSTR: "${{ secrets.PERF_TEST_RESULT_CONNSTR }}"
228+
NEON_API_KEY: ${{ secrets.NEON_STAGING_API_KEY }}
229+
174230
replication-tests:
175231
if: ${{ github.event.inputs.run_only_pgvector_tests == 'false' || github.event.inputs.run_only_pgvector_tests == null }}
176232
permissions:
@@ -398,6 +454,9 @@ jobs:
398454
runs-on: ${{ matrix.runner }}
399455
container:
400456
image: ${{ matrix.image }}
457+
credentials:
458+
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
459+
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
401460
options: --init
402461

403462
# Increase timeout to 8h, default timeout is 6h

0 commit comments

Comments
 (0)