Skip to content

Commit 4a1aeff

Browse files
authored
Support FoundationDB for consensus and timestamp oracle (#33819)
Implements a consensus and timestamp oracle backend to talk to FoundationDB. --------- Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent 06cfd9e commit 4a1aeff

File tree

89 files changed

+2534
-209
lines changed

Some content is hidden

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

89 files changed

+2534
-209
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ node_modules
2525
/test/feature-benchmark/tmp/*.td
2626
/test/zippy/tmp/*.td
2727
/test/**/tmp_*.toml
28+
/test/**/fdb_*.cluster
2829
junit_*.xml
2930
parallel-workload-queries.log
3031
perf.data*

Cargo.lock

Lines changed: 120 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ members = [
4141
"src/expr-parser",
4242
"src/expr-test-util",
4343
"src/fivetran-destination",
44+
"src/foundationdb",
4445
"src/frontegg-auth",
4546
"src/frontegg-client",
4647
"src/frontegg-mock",
@@ -165,6 +166,7 @@ default-members = [
165166
"src/expr-derive-impl",
166167
"src/expr-parser",
167168
"src/expr-test-util",
169+
"src/foundationdb",
168170
"src/frontegg-auth",
169171
"src/frontegg-client",
170172
"src/frontegg-mock",

bin/ci-builder

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ case "$cmd" in
290290
--env BUILDKITE_PULL_REQUEST
291291
--env DOCKERHUB_USERNAME
292292
--env DOCKERHUB_ACCESS_TOKEN
293+
# For configuring the metadata store
294+
--env EXTERNAL_METADATA_STORE
293295
)
294296

295297
if [[ $detach_container == "true" ]]; then

ci/builder/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ RUN arch_zizmor=$(echo "$ARCH_GCC" | sed -e "s/amd64/x86_64/") \
355355
&& tar xvf zizmor.tar.gz \
356356
&& mv zizmor /usr/local/bin
357357

358+
RUN arch_fdb=$(echo "$ARCH_GCC" | sed -e "s/x86_64/amd64/") \
359+
&& curl -fsSL https://github.com/apple/foundationdb/releases/download/7.3.71/foundationdb-clients_7.3.71-1_$arch_fdb.deb > foundationdb-clients.deb \
360+
&& if [ $ARCH_GCC = x64_64 ]; then echo '695193b8c6f8af9ec083221611b5f2925ef7a5e3c5e3c1d0af65d0dfbe99d13d foundationdb-clients.deb' | sha256sum --check; fi \
361+
&& if [ $ARCH_GCC = aarch64 ]; then echo 'db1bbb72d57685a1c212c6456e6f0dfd1266c5c10c4adbc98d23a5d91bdbaff7 foundationdb-clients.deb' | sha256sum --check; fi \
362+
&& dpkg -i foundationdb-clients.deb
363+
358364
# Hardcode some known SSH hosts, or else SSH will ask whether the host is
359365
# trustworthy on the first connection.
360366
COPY ssh_known_hosts /etc/ssh/ssh_known_hosts

ci/nightly/pipeline.template.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,20 @@ steps:
409409
composition: testdrive
410410
args: [--default-size=8, --azurite, --slow]
411411

412+
- id: testdrive-fdb
413+
label: "Testdrive (FoundationDB)"
414+
depends_on: build-aarch64
415+
timeout_in_minutes: 40
416+
inputs: [test/testdrive]
417+
parallelism: 20
418+
plugins:
419+
- ./ci/plugins/mzcompose:
420+
composition: testdrive
421+
env:
422+
- EXTERNAL_METADATA_STORE: foundationdb
423+
agents:
424+
queue: hetzner-aarch64-8cpu-16gb
425+
412426
- id: testdrive-in-cloudtest
413427
label: "Full Testdrive in Cloudtest (K8s)"
414428
depends_on: build-aarch64

ci/plugins/mzcompose/hooks/command

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ if read_list BUILDKITE_PLUGIN_MZCOMPOSE_ARGS; then
3535
done
3636
fi
3737

38+
# Export environment variables passed via the env parameter
39+
# Buildkite creates vars like BUILDKITE_PLUGIN_MZCOMPOSE_ENV_0_VARNAME=value
40+
# We need to strip the prefix and the index number (0_, 1_, etc.)
41+
while IFS='=' read -r name value; do
42+
# Strip the BUILDKITE_PLUGIN_MZCOMPOSE_ENV_ prefix
43+
env_name="${name#BUILDKITE_PLUGIN_MZCOMPOSE_ENV_}"
44+
# Strip the index number and underscore (e.g., "0_VARNAME" -> "VARNAME")
45+
env_name="${env_name#*_}"
46+
export "$env_name=$value"
47+
done < <(env | grep "^BUILDKITE_PLUGIN_MZCOMPOSE_ENV_" || true)
48+
3849
STEP_START_TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
3950

4051
# Clean up cores here so that just killed processes' core files are ignored

ci/plugins/mzcompose/plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ configuration:
1515
properties:
1616
args:
1717
type: array
18+
env:
19+
type: object
1820
run:
1921
type: string
2022
composition:

0 commit comments

Comments
 (0)