Skip to content

Commit 6cb3e77

Browse files
authored
Fix some tests in new CI (#174)
* Display all .diffs files in CI * Add disk clean in test CI * Remove disk clean * Set open file limit (ulimit -n 65536) * Add cgroups enable on cluster * Fix cgroups enable * Enable gp-shrink test * Fix timestamptz test * Add disk clean * Mount runner-host dirs to container * Fix disk clean * Remove unused if's in workflow * Fix gp-shrink test
1 parent 9bb6320 commit 6cb3e77

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

.github/workflows/build-gpdb.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,8 @@ jobs:
721721
--privileged
722722
--user root
723723
--cgroupns=private
724+
volumes:
725+
- /:/host_volume
724726

725727
steps:
726728
- name: Use timestamp from previous job
@@ -743,8 +745,23 @@ jobs:
743745
exit 1
744746
fi
745747
748+
- name: Free disk space
749+
run: |
750+
set -ex pipefail
751+
752+
# Check disk usage
753+
df -h
754+
755+
# Remove some host directories
756+
rm -rf \
757+
/host_volume/usr/share/dotnet /host_volume/usr/local/lib/android /host_volume/opt/ghc \
758+
/host_volume/usr/local/share/powershell /host_volume/usr/share/swift /host_volume/usr/local/.ghcup \
759+
/host_volume/usr/lib/jvm || true
760+
761+
# Check disk usage
762+
df -h
763+
746764
- name: Environment Initialization
747-
if: needs.check-skip.outputs.should_skip != 'true'
748765
env:
749766
LOGS_DIR: build-logs
750767
run: |
@@ -754,6 +771,7 @@ jobs:
754771
exit 1
755772
fi
756773
774+
apt update -y
757775
apt install -y tzdata
758776
pip2 install pyyaml
759777
@@ -778,7 +796,6 @@ jobs:
778796
echo "SRC_DIR=${GITHUB_WORKSPACE}" | tee -a "$GITHUB_ENV"
779797
780798
- name: Setup cgroups
781-
if: needs.check-skip.outputs.should_skip != 'true'
782799
shell: bash
783800
run: |
784801
set -ux pipefail
@@ -973,6 +990,18 @@ jobs:
973990
exit 1
974991
fi
975992
993+
# ENABLE CGROUPS ON CLUSTER
994+
if [ "${{ matrix.enable_cgroups }}" = "true" ]; then
995+
if ! su - gpadmin -c "source /opt/greenplum-db-6/greenplum_path.sh && \
996+
source ${SRC_DIR}/../gpdb/gpAux/gpdemo/gpdemo-env.sh && \
997+
gpconfig -c gp_resource_manager -v 'group' && \
998+
gpstop -a -i && \
999+
gpstart -a"; then
1000+
echo "::error::cgroups enable failed"
1001+
exit 1
1002+
fi
1003+
fi
1004+
9761005
} 2>&1 | tee -a build-logs/details/create-gpdb-demo-cluster.log
9771006
9781007
- name: "Run Tests: ${{ matrix.test }}"
@@ -1192,10 +1221,15 @@ jobs:
11921221
shell: bash
11931222
run: |
11941223
# Search for regression.diffs recursively
1195-
found_file=$(find . -type f -name "regression.diffs" | head -n 1)
1196-
if [[ -n "$found_file" ]]; then
1197-
echo "Found regression.diffs at: $found_file"
1198-
cat "$found_file"
1224+
found_files=$(find . -type f -name "regression.diffs")
1225+
if [[ -n "$found_files" ]]; then
1226+
for found_file in $found_files
1227+
do
1228+
echo "-----------------------------------------------------"
1229+
echo "Found regression.diffs at: $found_file"
1230+
echo "-----------------------------------------------------"
1231+
cat "$found_file"
1232+
done
11991233
else
12001234
echo "No regression.diffs file found in the hierarchy."
12011235
fi

src/test/isolation2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ installcheck-resgroup: install
7676
./pg_isolation2_regress $(EXTRA_REGRESS_OPTS) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_resgroup --psqldir='$(PSQLDIR)' --inputdir=$(srcdir) --dbname=isolation2resgrouptest --schedule=$(srcdir)/isolation2_resgroup_schedule
7777

7878
installcheck-expandshrink: install
79-
$(pg_isolation2_regress_installcheck) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --dbname=isolation2expandshrinktest --schedule=$(srcdir)/isolation2_expandshrink_schedule
79+
./pg_isolation2_regress $(EXTRA_REGRESS_OPTS) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --dbname=isolation2expandshrinktest --schedule=$(srcdir)/isolation2_expandshrink_schedule
8080

8181
installcheck-parallel-retrieve-cursor: install
8282
./pg_isolation2_regress $(EXTRA_REGRESS_OPTS) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_parallel_retrieve_cursor --psqldir='$(PSQLDIR)' --inputdir=$(srcdir) --dbname=isolation2parallelretrcursor --load-extension=gp_inject_fault --schedule=$(srcdir)/parallel_retrieve_cursor_schedule

src/test/isolation2/sql/gpexpand_gpshrink.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ drop table test;
138138

139139
!\retcode gpshrink -c;
140140

141-
!\retcode rm -r /tmp/datadirs/;
141+
!\retcode rm -r /tmp/datadirs/;

src/test/regress/expected/timestamptz.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@ SELECT make_timestamptz(2014, 12, 10, 0, 0, 0, 'Europe/Prague') AT TIME ZONE 'UT
20892089
SELECT make_timestamptz(1846, 12, 10, 0, 0, 0, 'Asia/Manila') AT TIME ZONE 'UTC';
20902090
timezone
20912091
--------------------------
2092-
Wed Dec 09 15:56:00 1846
2092+
Wed Dec 09 15:56:08 1846
20932093
(1 row)
20942094

20952095
SELECT make_timestamptz(1881, 12, 10, 0, 0, 0, 'Europe/Paris') AT TIME ZONE 'UTC';

0 commit comments

Comments
 (0)