forked from greenplum-db/gpbackup-archive
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.29.1-conflicts' into 1.29.1-sync
- Loading branch information
Showing
14 changed files
with
396 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM hub.adsw.io/library/gpdb6_regress:latest | ||
|
||
COPY . /home/gpadmin/go/src/github.com/greenplum-db/gpbackup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## How to run tests | ||
|
||
```bash | ||
docker build -t gpbackup:test -f arenadata/Dockerfile . | ||
docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' gpbackup:test bash -c "ssh-keygen -A && /usr/sbin/sshd && bash /home/gpadmin/go/src/github.com/greenplum-db/gpbackup/arenadata/run_gpbackup_tests.bash" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package arenadata | ||
|
||
import ( | ||
"regexp" | ||
"strconv" | ||
|
||
"github.com/greenplum-db/gp-common-go-libs/gplog" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
var ( | ||
adPattern = regexp.MustCompile(`_arenadata(\d+)`) | ||
) | ||
|
||
func EnsureAdVersionCompatibility(backupVersion string, restoreVersion string) { | ||
var ( | ||
adBackup, adRestore int | ||
err error | ||
) | ||
if strVersion := adPattern.FindAllStringSubmatch(backupVersion, -1); len(strVersion) > 0 { | ||
adBackup, err = strconv.Atoi(strVersion[0][1]) | ||
gplog.FatalOnError(err) | ||
} else { | ||
gplog.Fatal(errors.Errorf("Invalid arenadata version format for gpbackup: %s", backupVersion), "") | ||
} | ||
if strVersion := adPattern.FindAllStringSubmatch(restoreVersion, -1); len(strVersion) > 0 { | ||
adRestore, err = strconv.Atoi(strVersion[0][1]) | ||
gplog.FatalOnError(err) | ||
} else { | ||
gplog.Fatal(errors.Errorf("Invalid arenadata version format for gprestore: %s", restoreVersion), "") | ||
} | ||
if adRestore < adBackup { | ||
gplog.Fatal(errors.Errorf("gprestore arenadata%d cannot restore a backup taken with gpbackup arenadata%d; please use gprestore arenadata%d or later.", | ||
adRestore, adBackup, adBackup), "") | ||
} | ||
} | ||
|
||
// fullVersion: gpbackup version + '_' + arenadata release + ('+' + gpbackup build) | ||
// example: 1.20.4_arenadata2+dev.1.g768b7e0 -> 1.20.4+dev.1.g768b7e0 | ||
func GetOriginalVersion(fullVersion string) string { | ||
return adPattern.ReplaceAllString(fullVersion, "") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash -l | ||
|
||
set -eox pipefail | ||
|
||
source gpdb_src/concourse/scripts/common.bash | ||
install_and_configure_gpdb | ||
make -C gpdb_src/src/test/regress/ | ||
make -C gpdb_src/contrib/dummy_seclabel/ install | ||
gpdb_src/concourse/scripts/setup_gpadmin_user.bash | ||
make_cluster | ||
|
||
wget https://golang.org/dl/go1.20.5.linux-amd64.tar.gz -O - | tar -C /opt -xz; | ||
|
||
su - gpadmin -c " | ||
source /usr/local/greenplum-db-devel/greenplum_path.sh; | ||
source ~/gpdb_src/gpAux/gpdemo/gpdemo-env.sh; | ||
gpconfig -c shared_preload_libraries -v dummy_seclabel; | ||
gpstop -ar; | ||
PATH=$PATH:/opt/go/bin:~/go/bin GOPATH=~/go make depend build install test end_to_end -C /home/gpadmin/go/src/github.com/greenplum-db/gpbackup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.