Skip to content

Commit e5b3eb1

Browse files
authored
Merge pull request #10500 from neondatabase/rc/release/2025-01-24
Storage release 2025-01-24
2 parents 4dec0dd + f35e135 commit e5b3eb1

File tree

91 files changed

+3831
-986
lines changed

Some content is hidden

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

91 files changed

+3831
-986
lines changed

Diff for: .github/workflows/_build-and-test-locally.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,13 @@ jobs:
229229
${cov_prefix} cargo nextest run $CARGO_FLAGS $CARGO_FEATURES -E '!package(pageserver)'
230230
231231
# run pageserver tests with different settings
232-
for io_engine in std-fs tokio-epoll-uring ; do
233-
NEON_PAGESERVER_UNIT_TEST_VIRTUAL_FILE_IOENGINE=$io_engine ${cov_prefix} cargo nextest run $CARGO_FLAGS $CARGO_FEATURES -E 'package(pageserver)'
232+
for get_vectored_concurrent_io in sequential sidecar-task; do
233+
for io_engine in std-fs tokio-epoll-uring ; do
234+
NEON_PAGESERVER_UNIT_TEST_GET_VECTORED_CONCURRENT_IO=$get_vectored_concurrent_io \
235+
NEON_PAGESERVER_UNIT_TEST_VIRTUAL_FILE_IOENGINE=$io_engine \
236+
${cov_prefix} \
237+
cargo nextest run $CARGO_FLAGS $CARGO_FEATURES -E 'package(pageserver)'
238+
done
234239
done
235240
236241
# Run separate tests for real S3
@@ -314,6 +319,7 @@ jobs:
314319
CHECK_ONDISK_DATA_COMPATIBILITY: nonempty
315320
BUILD_TAG: ${{ inputs.build-tag }}
316321
PAGESERVER_VIRTUAL_FILE_IO_ENGINE: tokio-epoll-uring
322+
PAGESERVER_GET_VECTORED_CONCURRENT_IO: sidecar-task
317323
USE_LFC: ${{ matrix.lfc_state == 'with-lfc' && 'true' || 'false' }}
318324

319325
# Temporary disable this step until we figure out why it's so flaky

Diff for: .github/workflows/build_and_test.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ jobs:
824824
docker compose -f ./docker-compose/docker-compose.yml down
825825
826826
promote-images-dev:
827-
needs: [ check-permissions, tag, vm-compute-node-image ]
827+
needs: [ check-permissions, tag, vm-compute-node-image, neon-image ]
828828
runs-on: ubuntu-22.04
829829

830830
permissions:
@@ -892,14 +892,14 @@ jobs:
892892
run: |
893893
for repo in neondatabase 369495373322.dkr.ecr.eu-central-1.amazonaws.com; do
894894
docker buildx imagetools create -t $repo/neon:latest \
895-
$repo/neon:${{ needs.tag.outputs.build-tag }}
895+
neondatabase/neon:${{ needs.tag.outputs.build-tag }}
896896
897897
for version in ${VERSIONS}; do
898898
docker buildx imagetools create -t $repo/compute-node-${version}:latest \
899-
$repo/compute-node-${version}:${{ needs.tag.outputs.build-tag }}
899+
neondatabase/compute-node-${version}:${{ needs.tag.outputs.build-tag }}
900900
901901
docker buildx imagetools create -t $repo/vm-compute-node-${version}:latest \
902-
$repo/vm-compute-node-${version}:${{ needs.tag.outputs.build-tag }}
902+
neondatabase/vm-compute-node-${version}:${{ needs.tag.outputs.build-tag }}
903903
done
904904
done
905905
docker buildx imagetools create -t neondatabase/neon-test-extensions-v16:latest \
@@ -1078,12 +1078,6 @@ jobs:
10781078
console.log(`Tag ${tag} created successfully.`);
10791079
}
10801080
1081-
// TODO: check how GitHub releases looks for proxy/compute releases and enable them if they're ok
1082-
if (context.ref !== 'refs/heads/release') {
1083-
console.log(`GitHub release skipped for ${context.ref}.`);
1084-
return;
1085-
}
1086-
10871081
try {
10881082
const existingRelease = await github.rest.repos.getReleaseByTag({
10891083
owner: context.repo.owner,
@@ -1102,7 +1096,8 @@ jobs:
11021096
owner: context.repo.owner,
11031097
repo: context.repo.repo,
11041098
tag_name: tag,
1105-
generate_release_notes: true,
1099+
// TODO: Automate release notes properly
1100+
generate_release_notes: false,
11061101
});
11071102
console.log(`Release for tag ${tag} created successfully.`);
11081103
}

Diff for: .github/workflows/release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: Create Release Branch
33
on:
44
schedule:
55
# It should be kept in sync with if-condition in jobs
6-
- cron: '0 6 * * FRI' # Storage release
76
- cron: '0 6 * * THU' # Proxy release
7+
- cron: '0 6 * * FRI' # Storage release
8+
- cron: '0 7 * * FRI' # Compute release
89
workflow_dispatch:
910
inputs:
1011
create-storage-release-branch:
@@ -55,7 +56,7 @@ jobs:
5556
ci-access-token: ${{ secrets.CI_ACCESS_TOKEN }}
5657

5758
create-compute-release-branch:
58-
if: inputs.create-compute-release-branch
59+
if: ${{ github.event.schedule == '0 7 * * FRI' || inputs.create-compute-release-branch }}
5960

6061
permissions:
6162
contents: write

Diff for: Cargo.lock

+2-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ tokio-tar = "0.3"
187187
tokio-util = { version = "0.7.10", features = ["io", "rt"] }
188188
toml = "0.8"
189189
toml_edit = "0.22"
190-
tonic = {version = "0.12.3", features = ["tls", "tls-roots"]}
190+
tonic = {version = "0.12.3", default-features = false, features = ["channel", "tls", "tls-roots"]}
191191
tower = { version = "0.5.2", default-features = false }
192192
tower-http = { version = "0.6.2", features = ["request-id", "trace"] }
193193
tower-service = "0.3.3"

Diff for: compute/compute-node.Dockerfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ RUN cd postgres && \
6767
# Enable some of contrib extensions
6868
echo 'trusted = true' >> /usr/local/pgsql/share/extension/autoinc.control && \
6969
echo 'trusted = true' >> /usr/local/pgsql/share/extension/dblink.control && \
70+
echo 'trusted = true' >> /usr/local/pgsql/share/extension/postgres_fdw.control && \
71+
file=/usr/local/pgsql/share/extension/postgres_fdw--1.0.sql && [ -e $file ] && \
72+
echo 'GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO neon_superuser;' >> $file && \
7073
echo 'trusted = true' >> /usr/local/pgsql/share/extension/bloom.control && \
7174
echo 'trusted = true' >> /usr/local/pgsql/share/extension/earthdistance.control && \
7275
echo 'trusted = true' >> /usr/local/pgsql/share/extension/insert_username.control && \
@@ -360,6 +363,8 @@ COPY compute/patches/pgvector.patch /pgvector.patch
360363
RUN wget https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz -O pgvector.tar.gz && \
361364
echo "867a2c328d4928a5a9d6f052cd3bc78c7d60228a9b914ad32aa3db88e9de27b0 pgvector.tar.gz" | sha256sum --check && \
362365
mkdir pgvector-src && cd pgvector-src && tar xzf ../pgvector.tar.gz --strip-components=1 -C . && \
366+
wget https://github.com/pgvector/pgvector/raw/refs/tags/v0.7.4/sql/vector.sql -O ./sql/vector--0.7.4.sql && \
367+
echo "10218d05dc02299562252a9484775178b14a1d8edb92a2d1672ef488530f7778 ./sql/vector--0.7.4.sql" | sha256sum --check && \
363368
patch -p1 < /pgvector.patch && \
364369
make -j $(getconf _NPROCESSORS_ONLN) OPTFLAGS="" && \
365370
make -j $(getconf _NPROCESSORS_ONLN) OPTFLAGS="" install && \
@@ -1347,9 +1352,6 @@ COPY --from=pg-roaringbitmap-pg-build /pg_roaringbitmap.tar.gz /ext-src
13471352
COPY --from=pg-semver-pg-build /pg_semver.tar.gz /ext-src
13481353
#COPY --from=pg-embedding-pg-build /home/nonroot/pg_embedding-src/ /ext-src
13491354
#COPY --from=wal2json-pg-build /wal2json_2_5.tar.gz /ext-src
1350-
#pg_anon is not supported yet for pg v17 so, don't fail if nothing found
1351-
COPY --from=pg-anon-pg-build /pg_anon.tar.g? /ext-src
1352-
COPY compute/patches/pg_anon.patch /ext-src
13531355
COPY --from=pg-ivm-build /pg_ivm.tar.gz /ext-src
13541356
COPY --from=pg-partman-build /pg_partman.tar.gz /ext-src
13551357
RUN cd /ext-src/ && for f in *.tar.gz; \
@@ -1360,9 +1362,6 @@ RUN cd /ext-src/rum-src && patch -p1 <../rum.patch
13601362
RUN cd /ext-src/pgvector-src && patch -p1 <../pgvector.patch
13611363
RUN cd /ext-src/pg_hint_plan-src && patch -p1 < /ext-src/pg_hint_plan_${PG_VERSION}.patch
13621364
COPY --chmod=755 docker-compose/run-tests.sh /run-tests.sh
1363-
RUN case "${PG_VERSION}" in "v17") \
1364-
echo "postgresql_anonymizer does not yet support PG17" && exit 0;; \
1365-
esac && patch -p1 </ext-src/pg_anon.patch
13661365
RUN patch -p1 </ext-src/pg_cron.patch
13671366
ENV PATH=/usr/local/pgsql/bin:$PATH
13681367
ENV PGHOST=compute

Diff for: compute/patches/pgvector.patch

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
diff --git a/Makefile b/Makefile
2+
index 7a4b88c..56678af 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -3,7 +3,10 @@ EXTVERSION = 0.8.0
6+
7+
MODULE_big = vector
8+
DATA = $(wildcard sql/*--*--*.sql)
9+
-DATA_built = sql/$(EXTENSION)--$(EXTVERSION).sql
10+
+# This change is needed to install different per-version SQL files
11+
+# like pgvector--0.8.0.sql and pgvector--0.7.4.sql
12+
+# The corresponding file is downloaded during the Docker image build process
13+
+DATA_built = sql/$(EXTENSION)--$(EXTVERSION).sql sql/vector--0.7.4.sql
14+
OBJS = src/bitutils.o src/bitvec.o src/halfutils.o src/halfvec.o src/hnsw.o src/hnswbuild.o src/hnswinsert.o src/hnswscan.o src/hnswutils.o src/hnswvacuum.o src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/sparsevec.o src/vector.o
15+
HEADERS = src/halfvec.h src/sparsevec.h src/vector.h
16+
117
diff --git a/src/hnswbuild.c b/src/hnswbuild.c
2-
index dcfb2bd..d5189ee 100644
18+
index b667478..fc1897c 100644
319
--- a/src/hnswbuild.c
420
+++ b/src/hnswbuild.c
5-
@@ -860,9 +860,17 @@ HnswParallelBuildMain(dsm_segment *seg, shm_toc *toc)
21+
@@ -843,9 +843,17 @@ HnswParallelBuildMain(dsm_segment *seg, shm_toc *toc)
622

723
hnswarea = shm_toc_lookup(toc, PARALLEL_KEY_HNSW_AREA, false);
824

@@ -20,7 +36,7 @@ index dcfb2bd..d5189ee 100644
2036
/* Close relations within worker */
2137
index_close(indexRel, indexLockmode);
2238
table_close(heapRel, heapLockmode);
23-
@@ -1117,12 +1125,38 @@ BuildIndex(Relation heap, Relation index, IndexInfo *indexInfo,
39+
@@ -1100,12 +1108,38 @@ BuildIndex(Relation heap, Relation index, IndexInfo *indexInfo,
2440
SeedRandom(42);
2541
#endif
2642

Diff for: compute_tools/src/bin/fast_import.rs

+19-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ struct Args {
5858
pg_bin_dir: Utf8PathBuf,
5959
#[clap(long)]
6060
pg_lib_dir: Utf8PathBuf,
61+
#[clap(long)]
62+
pg_port: Option<u16>, // port to run postgres on, 5432 is default
6163
}
6264

6365
#[serde_with::serde_as]
@@ -74,6 +76,13 @@ enum EncryptionSecret {
7476
KMS { key_id: String },
7577
}
7678

79+
// copied from pageserver_api::config::defaults::DEFAULT_LOCALE to avoid dependency just for a constant
80+
const DEFAULT_LOCALE: &str = if cfg!(target_os = "macos") {
81+
"C"
82+
} else {
83+
"C.UTF-8"
84+
};
85+
7786
#[tokio::main]
7887
pub(crate) async fn main() -> anyhow::Result<()> {
7988
utils::logging::init(
@@ -97,6 +106,10 @@ pub(crate) async fn main() -> anyhow::Result<()> {
97106
let working_directory = args.working_directory;
98107
let pg_bin_dir = args.pg_bin_dir;
99108
let pg_lib_dir = args.pg_lib_dir;
109+
let pg_port = args.pg_port.unwrap_or_else(|| {
110+
info!("pg_port not specified, using default 5432");
111+
5432
112+
});
100113

101114
// Initialize AWS clients only if s3_prefix is specified
102115
let (aws_config, kms_client) = if args.s3_prefix.is_some() {
@@ -180,7 +193,7 @@ pub(crate) async fn main() -> anyhow::Result<()> {
180193
let superuser = "cloud_admin"; // XXX: this shouldn't be hard-coded
181194
postgres_initdb::do_run_initdb(postgres_initdb::RunInitdbArgs {
182195
superuser,
183-
locale: "en_US.UTF-8", // XXX: this shouldn't be hard-coded,
196+
locale: DEFAULT_LOCALE, // XXX: this shouldn't be hard-coded,
184197
pg_version,
185198
initdb_bin: pg_bin_dir.join("initdb").as_ref(),
186199
library_search_path: &pg_lib_dir, // TODO: is this right? Prob works in compute image, not sure about neon_local.
@@ -197,6 +210,7 @@ pub(crate) async fn main() -> anyhow::Result<()> {
197210
let mut postgres_proc = tokio::process::Command::new(pgbin)
198211
.arg("-D")
199212
.arg(&pgdata_dir)
213+
.args(["-p", &format!("{pg_port}")])
200214
.args(["-c", "wal_level=minimal"])
201215
.args(["-c", "shared_buffers=10GB"])
202216
.args(["-c", "max_wal_senders=0"])
@@ -216,6 +230,7 @@ pub(crate) async fn main() -> anyhow::Result<()> {
216230
),
217231
])
218232
.env_clear()
233+
.env("LD_LIBRARY_PATH", &pg_lib_dir)
219234
.stdout(std::process::Stdio::piped())
220235
.stderr(std::process::Stdio::piped())
221236
.spawn()
@@ -232,7 +247,7 @@ pub(crate) async fn main() -> anyhow::Result<()> {
232247

233248
// Create neondb database in the running postgres
234249
let restore_pg_connstring =
235-
format!("host=localhost port=5432 user={superuser} dbname=postgres");
250+
format!("host=localhost port={pg_port} user={superuser} dbname=postgres");
236251

237252
let start_time = std::time::Instant::now();
238253

@@ -314,6 +329,7 @@ pub(crate) async fn main() -> anyhow::Result<()> {
314329
.arg(&source_connection_string)
315330
// how we run it
316331
.env_clear()
332+
.env("LD_LIBRARY_PATH", &pg_lib_dir)
317333
.kill_on_drop(true)
318334
.stdout(std::process::Stdio::piped())
319335
.stderr(std::process::Stdio::piped())
@@ -347,6 +363,7 @@ pub(crate) async fn main() -> anyhow::Result<()> {
347363
.arg(&dumpdir)
348364
// how we run it
349365
.env_clear()
366+
.env("LD_LIBRARY_PATH", &pg_lib_dir)
350367
.kill_on_drop(true)
351368
.stdout(std::process::Stdio::piped())
352369
.stderr(std::process::Stdio::piped())

0 commit comments

Comments
 (0)