diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 00000000..8668eb1d --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,77 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +github: + description: Backup Utility for Apache Cloudberry (Incubating) + homepage: https://cloudberry.apache.org + labels: + - mpp + - big-data + - data-warehouse + - data-analysis + - olap + - distributed-database + - database + - postgres + - postgresql + - greenplum + - cloudberry + - ai + - gpbackup + features: + # Enable wiki for documentation + wiki: false + # Enable issues management + issues: true + # Enable projects for project management boards + projects: false + enabled_merge_buttons: + # enable squash button: + squash: true + # disable merge button: + merge: false + # enable rebase button: + rebase: true + protected_branches: + main: + required_status_checks: + # strict means "Require branches to be up to date before merging". + strict: true + # contexts are the names of checks that must pass. + contexts: + - gpbackup_go_build_and_test + required_pull_request_reviews: + dismiss_stale_reviews: false + required_approving_review_count: 1 + # squash or rebase must be allowed in the repo for this setting to be set to true. + required_linear_history: true + + required_signatures: false + + # requires all conversations to be resolved before merging is possible + required_conversation_resolution: true + del_branch_on_merge: true + dependabot_alerts: true + dependabot_updates: false + protected_tags: + - "v*.*.*" + - "[0-9]*.*" +notifications: + commits: commits@cloudberry.apache.org + issues: commits@cloudberry.apache.org + pullrequests: commits@cloudberry.apache.org + pullrequests_bot_dependabot: private@cloudberry.apache.org diff --git a/.github/workflows/build_and_unit_test.yml b/.github/workflows/build_and_unit_test.yml index 74728601..44bdf6cc 100644 --- a/.github/workflows/build_and_unit_test.yml +++ b/.github/workflows/build_and_unit_test.yml @@ -12,10 +12,10 @@ jobs: build_and_unit_test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - path: go/pkg/mod/github.com/cloudberrydb/gpbackup + path: go/src/github.com/apache/cloudberry-gpbackup - name: Set up Go uses: actions/setup-go@v2 @@ -29,15 +29,15 @@ jobs: - name: Dependencies run: | - cd ${GOPATH}/pkg/mod/github.com/cloudberrydb/gpbackup + cd ${GOPATH}/src/github.com/apache/cloudberry-gpbackup make depend - name: Build run: | - cd ${GOPATH}/pkg/mod/github.com/cloudberrydb/gpbackup + cd ${GOPATH}/src/github.com/apache/cloudberry-gpbackup make build - name: Unit Test run: | - cd ${GOPATH}/pkg/mod/github.com/cloudberrydb/gpbackup + cd ${GOPATH}/src/github.com/apache/cloudberry-gpbackup make test diff --git a/README.md b/README.md index 09264545..a4248ad1 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,15 @@ -# gpbackup for CloudberryDB +# Backup Utility for Apache Cloudberry (Incubating) [![Slack](https://img.shields.io/badge/Join_Slack-6a32c9)](https://communityinviter.com/apps/cloudberrydb/welcome) [![Twitter Follow](https://img.shields.io/twitter/follow/cloudberrydb)](https://twitter.com/cloudberrydb) -[![Website](https://img.shields.io/badge/Visit%20Website-eebc46)](https://cloudberrydb.org) -[![GitHub Discussions](https://img.shields.io/github/discussions/cloudberrydb/cloudberrydb)](https://github.com/orgs/cloudberrydb/discussions) -![GitHub License](https://img.shields.io/github/license/cloudberrydb/gpbackup) +[![Website](https://img.shields.io/badge/Visit%20Website-eebc46)](https://cloudberry.apache.org) --- `gpbackup` and `gprestore` are Go utilities for performing Greenplum database backups, which are originally developed by the Greenplum Database team. This -repo is a fork of gpbackup, dedicated to supporting CloduberryDB 1.0+. You -will feel no change using gpbackup in CloudberryDB as well as in Greenplum. +repo is a fork of gpbackup, dedicated to supporting Cloduberry 1.0+. You +will feel no change using gpbackup in Cloudberry as well as in Greenplum. ## Pre-Requisites @@ -25,10 +23,10 @@ variable](https://go.dev/doc/install) before starting the following steps. 1. Downloading the latest version: ```bash -go install github.com/cloudberrydb/gpbackup@latest +go install github.com/apache/cloudberry-gpbackup@latest ``` -This will place the code in `$GOPATH/pkg/mod/github.com/cloudberrydb/gpbackup`. +This will place the code in `$GOPATH/pkg/mod/github.com/apache/cloudberry-gpbackup`. 2. Building and installing binaries @@ -41,7 +39,7 @@ make build The `build` target will put the `gpbackup` and `gprestore` binaries in `$HOME/go/bin`. This will also attempt to copy `gpbackup_helper` to the -CloudberryDB segments (retrieving hostnames from `gp_segment_configuration`). +Cloudberry segments (retrieving hostnames from `gp_segment_configuration`). Pay attention to the output as it will indicate whether this operation was successful. @@ -67,11 +65,11 @@ Run `--help` with either command for a complete list of options. ### Test setup -Required for Cloudberry Database 1.0+, several tests require the -`dummy_seclabel` Cloudberry Database contrib module. This module exists only -to support regression testing of the SECURITY LABEL statement. It is not -intended to be used in production. Use the following commands to install the -module. +Required for Cloudberry 1.0+, several tests require the +`dummy_seclabel` Cloudberry contrib module. This module exists only to +support regression testing of the SECURITY LABEL statement. It is not +intended to be used in production. Use the following commands to +install the module. ```bash pushd $(find ~/workspace/cbdb -name dummy_seclabel) @@ -84,13 +82,12 @@ popd ### Test execution -**NOTE**: The integration and end_to_end tests require a running Cloudberry -Database instance. +**NOTE**: The integration and end_to_end tests require a running Cloudberry instance. * To run all tests except end-to-end (linters, unit, and integration), use `make test`. * To run only unit tests, use `make unit`. -* To run only integration tests (requires a running CloudberryDB instance), use `make integration`. -* To run end to end tests (requires a running CloudberryDB instance), use `make end_to_end`. +* To run only integration tests (requires a running Cloudberry instance), use `make integration`. +* To run end to end tests (requires a running Cloudberry instance), use `make end_to_end`. We provide the following targets to help developers ensure their code fits Go standard formatting guidelines: @@ -163,4 +160,4 @@ the [LICENSE](./LICENSE). ## Acknowledgment Thanks to all the Greenplum Backup contributors, more details in its [GitHub -page](https://github.com/greenplum-db/gpbackup). \ No newline at end of file +page](https://github.com/greenplum-db/gpbackup-archive). diff --git a/go.mod b/go.mod index 628f1ddf..121dc17b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cloudberrydb/gpbackup +module github.com/apache/cloudberry-gpbackup go 1.21.4 @@ -25,7 +25,6 @@ require ( ) require ( - github.com/fatih/color v1.16.0 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -38,7 +37,7 @@ require ( github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgtype v1.9.1 // indirect github.com/jackc/pgx/v4 v4.14.1 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/rivo/uniseg v0.2.0 // indirect golang.org/x/crypto v0.16.0 // indirect @@ -46,4 +45,4 @@ require ( golang.org/x/net v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect -) \ No newline at end of file +) diff --git a/go.sum b/go.sum index 4110e2db..8bab667b 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cloudberrydb/gp-common-go-libs v1.0.11 h1:cDf0crpABkdEGazY0swWDeZHyC1ZTzTecVy32KFBSdw= github.com/cloudberrydb/gp-common-go-libs v1.0.11/go.mod h1:kLvzkaGHtBT2zJrXPrEZInpu6tY9G9GvU7TKgRQJTSM= +github.com/cloudberrydb/gpbackup v1.0.2 h1:rsdnFVsB7sghR2QgtXLMIRvAH2EnxbyHy7arOExLkPw= +github.com/cloudberrydb/gpbackup v1.0.2/go.mod h1:VwditEj+iYFcNROJ7+xsZjXdEvfnHzIEYUt/Wn+5Ong= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -120,7 +122,6 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= @@ -231,8 +232,8 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -281,4 +282,4 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= \ No newline at end of file +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=