mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-06 11:02:50 -05:00
### Does this PR have any customer impact? ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description In oss, we noticed frequently sql test result difference introduced by newer package minor versions (postgres, pgvector, postgis, etc). To make oss CI integration stable and to make test result consistent in oss and pgmongo, we should specify fixed versions for packages in oss, and align with pgmongo. Will depend on manual package version update after verifying the compatibility and meanwhile update test results. ---- #### AI description (iteration 1) #### PR Classification Code cleanup and enhancement. #### PR Summary This pull request declares and uses fixed versions of various packages to ensure consistency and reliability in the build environment. - Updated `/oss/.devcontainer/Dockerfile` to declare and use fixed versions for multiple dependencies including PostgreSQL, Citus, libbson, PG_CRON, PG_VECTOR, Intel Decimal Math Library, PCRE2, and PostGIS. - Modified `/.devcontainer/Dockerfile` to align with the fixed versioning approach and added necessary environment variables. - Added `GetPostgresSourceRef` function in `oss/scripts/utils.sh` to map PostgreSQL versions to specific source references. - Updated `oss/scripts/install_setup_intel_decimal_math_lib.sh` and `oss/scripts/install_setup_pcre2.sh` to accept version parameters. - Moved several scripts from `/scripts` to `/oss/scripts` for better organization. Related work items: #3571853
49 lines
1.4 KiB
Bash
Executable File
49 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# fail if trying to reference a variable that is not set.
|
|
set -u
|
|
# exit immediately if a command exits with a non-zero status
|
|
set -e
|
|
|
|
source="${BASH_SOURCE[0]}"
|
|
while [[ -h $source ]]; do
|
|
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
|
source="$(readlink "$source")"
|
|
|
|
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
|
# symlink file was located
|
|
[[ $source != /* ]] && source="$scriptroot/$source"
|
|
done
|
|
scriptDir="$( cd -P "$( dirname "$source" )" && pwd )"
|
|
. $scriptDir/utils.sh
|
|
. $scriptDir/setup_versions.sh
|
|
POSTGRESQL_REF=$(GetPostgresSourceRef $PGVERSION)
|
|
|
|
pushd $INSTALL_DEPENDENCIES_ROOT
|
|
|
|
rm -rf postgres-repo-for-system-rows
|
|
mkdir postgres-repo-for-system-rows
|
|
cd postgres-repo-for-system-rows
|
|
|
|
git init
|
|
git remote add origin https://github.com/postgres/postgres
|
|
|
|
# checkout to the commit specified in the cgmanifest.json
|
|
git fetch --depth 1 origin "$POSTGRESQL_REF"
|
|
git checkout FETCH_HEAD
|
|
|
|
pgBinDir=$(GetPostgresPath $PGVERSION)
|
|
PATH=$pgBinDir:$PATH;
|
|
|
|
echo "building and installing tsm_system_rows extension with pg path $pgBinDir ..."
|
|
|
|
cd contrib/tsm_system_rows
|
|
if [ "${DESTINSTALLDIR:-""}" == "" ]; then
|
|
sudo PATH=$PATH -E make USE_PGXS=1 clean
|
|
sudo PATH=$PATH -E make USE_PGXS=1 install
|
|
else
|
|
make DESTDIR=$DESTINSTALLDIR USE_PGXS=1 install
|
|
fi
|
|
popd
|
|
|
|
rm -rf $INSTALL_DEPENDENCIES_ROOT/postgres-repo-for-system-rows |