Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to run upgrade test #21

Open
wants to merge 6 commits into
base: gpdb
Choose a base branch
from
Open

Add the ability to run upgrade test #21

wants to merge 6 commits into from

Conversation

red1452
Copy link

@red1452 red1452 commented Jun 15, 2023

Upgrade test runs after regression test. It requires to use tar-archive with previous versions of diskquota, which was generated from last release. This archive is generated at diskquota_artifacts and named diskquota-<VERSION>-rhel7_x86_64.tar.gz Path to this archive is set in command to run Docker: <PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>. At this archive all *.so files must be at lib/postgresql path:

evgeniy@evgeniy-pc:~/gpdb/diskquota_bin$ tar -tvf diskquota-2.2.1-rhel7_x86_64.tar.gz 
-rwxr-xr-x gpadmin/gpadmin  46 2023-10-03 13:59 install_gpdb_component
-rw-r--r-- gpadmin/gpadmin 202 2023-10-05 17:02 diskquota-build-info
drwxrwxr-x gpadmin/gpadmin   0 2023-10-05 17:02 lib/
drwxrwxr-x gpadmin/gpadmin   0 2023-10-05 17:02 lib/postgresql/
-rwxr-xr-x gpadmin/gpadmin 281632 2023-10-03 13:55 lib/postgresql/diskquota.so
-rwxr-xr-x gpadmin/gpadmin 737008 2023-10-05 16:49 lib/postgresql/diskquota-2.1.so
-rwxr-xr-x gpadmin/gpadmin 550080 2023-10-03 13:53 lib/postgresql/diskquota-2.0.so
-rwxr-xr-x gpadmin/gpadmin 755664 2023-10-05 17:02 lib/postgresql/diskquota-2.2.so

Before run tests it is needed to run build step:

docker run --rm -it -e DISKQUOTA_OS=rhel7 \
       -v /tmp/diskquota_artifacts:/home/gpadmin/diskquota_artifacts \
       -v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
       -v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
       -v <PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>:/home/gpadmin/last_released_diskquota_bin/diskquota-<VERSION>-rhel7_x86_64.tar.gz \
       hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh build

Command to run all tests in Docker is not changed:

docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' \
       -v /tmp/diskquota_artifacts:/home/gpadmin/bin_diskquota \
       -v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
       -v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
       hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh test

After releasing new version of diskquota it should to get new archive from diskquota_artifacts and use it at tests for next pull requests.

red1452 added a commit that referenced this pull request Jun 15, 2023
Run script concourse/scripts/upgrade_test_diskquota.sh in Docker
to run upgrade test of diskquota.
Before starting upgrade test new script build version 1.0.3 (from tag
1.0.3_arenadata2).

Check of minor in version of diskquota was removed from diskquota
worker process, because we use symlinks from ealier versions (since 2.0)
diskquota to the latest version (commit 472eb06).
@Stolb27 Stolb27 requested review from RekGRpth and Stolb27 June 19, 2023 08:56
src/diskquota.c Outdated Show resolved Hide resolved
@RekGRpth RekGRpth mentioned this pull request Jul 26, 2023
red1452 added a commit that referenced this pull request Oct 3, 2023
Run script concourse/scripts/upgrade_test_diskquota.sh in Docker
to run upgrade test of diskquota.
Before starting upgrade test new script build version 1.0.3 (from tag
1.0.3_arenadata2).

Check of minor in version of diskquota was removed from diskquota
worker process, because we use symlinks from ealier versions (since 2.0)
diskquota to the latest version (commit 472eb06).
@red1452 red1452 changed the title Add script to run upgrade test in Docker container Added the ability to run upgrade test Oct 3, 2023
@red1452 red1452 changed the title Added the ability to run upgrade test Add the ability to run upgrade test Oct 3, 2023
red1452 added a commit that referenced this pull request Oct 3, 2023
Upgrade test runs after regression test. It is need to generate tar-archive with previous
versions of diskquota. Path to archive is set in command to run Docker:
"<PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>".

Before run tests it is needed to run build step:
```
docker run --rm -it -e DISKQUOTA_OS=rhel7 \
       -v /tmp/diskquota_artifacts:/home/gpadmin/diskquota_artifacts \
       -v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
       -v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
       hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh build
```

Full command to run all tests in Docker:
```
docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' \
       -v /tmp/diskquota_artifacts:/home/gpadmin/bin_diskquota \
       -v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
       -v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
       -v <PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>:/home/gpadmin/diskquota_old_versions.tar \
       hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh test
```
If previous versions of diskquota were added from DISKQUOTA_LAST_RELEASE_PATH
do not need to create symlinks from ealier versions (since 2.0)
diskquota to the latest version which added at commit 472eb06

New check disable creating symlinks if diskquota was build with -DDISKQUOTA_LAST_RELEASE_PATH
and enable creating symlinks if there is not -DDISKQUOTA_LAST_RELEASE_PATH
Information about how to run upgrade tests for diskquota was added
to arenadata/README.md.
red1452 added a commit that referenced this pull request Oct 6, 2023
After commit 97f1f9b all DDL files
were moved to directory "control/ddl". At upgrade test there is check,
which finds diff at DDL files from last release version. Path, where
DDL files are found, was not changed, and this check did not work.
After commit 97f1f9b all DDL files
were moved to directory "control/ddl". At upgrade test there is check,
which finds diff at DDL files from last release version. Path, where
DDL files are found, was not changed, and this check did not work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants