Skip to content

Commit 7fd27ba

Browse files
authored
Merge branch 'main' into hcdweui
2 parents 09de8eb + 112667c commit 7fd27ba

11 files changed

Lines changed: 297 additions & 6 deletions

.github/workflows/coverity.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ name: Apache Cloudberry Coverity Scan
4040

4141
on:
4242
schedule:
43-
- cron: "0 0 * * *"
43+
- cron: "0 0 * * 1"
4444
workflow_dispatch:
4545

4646
permissions:
@@ -62,7 +62,8 @@ jobs:
6262
uses: actions/checkout@v4
6363
with:
6464
fetch-depth: 1
65-
65+
submodules: true
66+
6667
- name: Environment Initialization
6768
run: |
6869
if ! su - gpadmin -c "/tmp/init_system.sh"; then
@@ -72,15 +73,16 @@ jobs:
7273
7374
- name: Download Coverity build tool
7475
run: |
76+
set -euox pipefail
7577
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=apache%2Fcloudberry" -O coverity_tool.tar.gz
7678
mkdir -p coverity_tool
7779
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
7880
chown -R gpadmin:gpadmin coverity_tool
7981
8082
- name: Build with Coverity build tool
8183
run: |
84+
set -euox pipefail
8285
WORKSPACE="${GITHUB_WORKSPACE}"
83-
sudo rm -rf /usr/local/cloudberry-db
8486
sudo chmod a+w /usr/local
8587
mkdir -p /usr/local/cloudberry-db/lib
8688
sudo cp /usr/local/xerces-c/lib/libxerces-c.so \
@@ -90,7 +92,6 @@ jobs:
9092
su - gpadmin -c "cd $WORKSPACE"
9193
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
9294
export PATH=$WORKSPACE/coverity_tool/bin:$PATH
93-
git submodule update --init
9495
./configure --prefix=/usr/local/cloudberry-db \
9596
--disable-external-fts \
9697
--enable-gpcloud \

.github/workflows/sonarqube.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# --------------------------------------------------------------------
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed
5+
# with this work for additional information regarding copyright
6+
# ownership. The ASF licenses this file to You under the Apache
7+
# License, Version 2.0 (the "License"); you may not use this file
8+
# except in compliance with the License. You may obtain a copy of the
9+
# License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16+
# implied. See the License for the specific language governing
17+
# permissions and limitations under the License.
18+
#
19+
# --------------------------------------------------------------------
20+
# GitHub Actions Workflow: Apache Cloudberry SonarQube Pipeline
21+
# --------------------------------------------------------------------
22+
# Description:
23+
#
24+
# This workflow performs scheduled SonarQube analysis for Cloudberry.
25+
#
26+
# Workflow Overview:
27+
# 1. **Check Skip**:
28+
# - workflow run currently is limited to "apache" GitHub organization
29+
#
30+
# 2. **scan Job**:
31+
# - performs scan and upload result to https://sonarcloud.io/project/overview?id=apache_cloudberry
32+
# Triggers:
33+
# - Weekly schedule
34+
# - optional manual dispatch.
35+
#
36+
# Notes:
37+
# - SONARCLOUD_TOKEN secret is provided by the ASF Infra team
38+
# --------------------------------------------------------------------
39+
name: Apache Cloudberry SonarQube Cloud Analysis
40+
41+
on:
42+
schedule:
43+
- cron: "0 0 * * 1"
44+
workflow_dispatch:
45+
46+
permissions:
47+
contents: read
48+
49+
jobs:
50+
sonarqube-analysis:
51+
runs-on: ubuntu-22.04
52+
if: ${{ github.repository_owner == 'apache' }}
53+
54+
container:
55+
image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
56+
options: >-
57+
--user root
58+
-h cdw
59+
env:
60+
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
61+
62+
steps:
63+
- name: Checkout Apache Cloudberry
64+
uses: actions/checkout@v4
65+
with:
66+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
67+
submodules: true
68+
69+
- name: Environment Initialization
70+
run: |
71+
if ! su - gpadmin -c "/tmp/init_system.sh"; then
72+
echo "::error::Container initialization failed"
73+
exit 1
74+
fi
75+
76+
- name: Install Build Wrapper
77+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
78+
79+
- name: Run Build Wrapper
80+
run: |
81+
set -euox pipefail
82+
sudo chmod a+w /usr/local
83+
mkdir -p /usr/local/cloudberry-db/lib
84+
sudo cp /usr/local/xerces-c/lib/libxerces-c.so \
85+
/usr/local/xerces-c/lib/libxerces-c-3.3.so \
86+
/usr/local/cloudberry-db/lib
87+
sudo chown -R gpadmin:gpadmin /usr/local/cloudberry-db
88+
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
89+
./configure --prefix=/usr/local/cloudberry-db \
90+
--disable-external-fts \
91+
--enable-gpcloud \
92+
--enable-ic-proxy \
93+
--enable-orafce \
94+
--enable-orca \
95+
--enable-pax \
96+
--enable-pxf \
97+
--enable-tap-tests \
98+
--with-gssapi \
99+
--with-ldap \
100+
--with-libxml \
101+
--with-lz4 \
102+
--with-openssl \
103+
--with-pam \
104+
--with-perl \
105+
--with-pgport=5432 \
106+
--with-python \
107+
--with-pythonsrc-ext \
108+
--with-ssl=openssl \
109+
--with-uuid=e2fs \
110+
--with-includes=/usr/local/xerces-c/include \
111+
--with-libraries=/usr/local/cloudberry-db/lib
112+
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j$(nproc)
113+
114+
- name: SonarQube Scan
115+
uses: SonarSource/sonarqube-scan-action@v5
116+
env:
117+
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
118+
with:
119+
args: >
120+
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"

LICENSE

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ The PostgreSQL software includes:
213213
src/bin/pg_controldata/pg_controldata.c
214214
copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001
215215

216+
gpMgmt/bin/pythonSrc/ext/behave-1.2.6.tar.gz
217+
see licenses/LICENSE-bsd2-behave.txt
218+
219+
gpMgmt/bin/pythonSrc/ext/mock-1.0.1.tar.gz
220+
see licenses/LICENSE-bsd2-mock.txt
221+
216222
----------------------------
217223
BSD-4-Clause (University of California-Specific)
218224

@@ -239,6 +245,21 @@ The PostgreSQL software includes:
239245
src/backend/libpq/sha2.h
240246
see licenses/LICENSE-bsd3-sha2.txt
241247

248+
gpMgmt/bin/pythonSrc/ext/psutil-5.7.0.tar.gz
249+
see licenses/LICENSE-bsd3-psutil.txt
250+
251+
----------------------------
252+
MIT LICENSE
253+
254+
gpMgmt/bin/pythonSrc/ext/PyYAML-5.3.1.tar.gz
255+
see licenses/LICENSE-pyyaml.txt
256+
257+
gpMgmt/bin/pythonSrc/ext/setuptools-36.6.0.tar.gz
258+
see licenses/LICENSE-setuptools.txt
259+
260+
gpMgmt/bin/pythonSrc/ext/parse-1.8.2.tar.gz
261+
see licenses/LICENSE-parse.txt
262+
242263
----------------------------
243264
Internet Systems Consortium/Internet Software Consortium (ISC) LICENSE
244265

@@ -335,4 +356,4 @@ This product includes code from pg_cron under PostgreSQL license:
335356
/src/backend/task/job_metadata.c
336357
/src/backend/task/pg_cron.c
337358

338-
see licenses/LICENSE-citusdata.txt
359+
see licenses/LICENSE-citusdata.txt

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
<img alt="Coverity Scan Build Status"
2424
src="https://scan.coverity.com/projects/31473/badge.svg"/>
2525
</a>
26-
26+
<a href="https://sonarcloud.io/summary/new_code?id=apache_cloudberry">
27+
<img alt="SonarQube Cloud" src="https://sonarcloud.io/images/project_badges/sonarcloud-highlight.svg" width="100px">
28+
</a>
2729
---------
2830

2931
## Introduction

licenses/LICENSE-bsd2-behave.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2012-2014 Benno Rice, Richard Jones and others, except where noted.
2+
Copyright (c) 2014-2023 Jens Engel and others, except where noted.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions
7+
are met:
8+
9+
1. Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
2. Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

licenses/LICENSE-bsd2-mock.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2003-2013, Michael Foord & the mock team
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are
6+
met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

licenses/LICENSE-bsd3-psutil.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2009, Jay Loden, Dave Daeschler, Giampaolo Rodola
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the psutil authors nor the names of its contributors
17+
may be used to endorse or promote products derived from this software without
18+
specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

licenses/LICENSE-parse.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2012-2019 Richard Jones <richard@python.org>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

licenses/LICENSE-pyyaml.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2017-2021 Ingy döt Net
2+
Copyright (c) 2006-2016 Kirill Simonov
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of
5+
this software and associated documentation files (the "Software"), to deal in
6+
the Software without restriction, including without limitation the rights to
7+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8+
of the Software, and to permit persons to whom the Software is furnished to do
9+
so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.

licenses/LICENSE-setuptools.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Permission is hereby granted, free of charge, to any person obtaining a copy
2+
of this software and associated documentation files (the "Software"), to
3+
deal in the Software without restriction, including without limitation the
4+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
5+
sell copies of the Software, and to permit persons to whom the Software is
6+
furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in
9+
all copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
17+
IN THE SOFTWARE.

0 commit comments

Comments
 (0)