Skip to content

Commit 99a34d0

Browse files
Merge pull request #1974 from percona/release-8.4.0
RM-1442 PXC-8.4.0
2 parents c6119ce + b758527 commit 99a34d0

File tree

32,288 files changed

+1617412
-1111113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

32,288 files changed

+1617412
-1111113
lines changed

.cirrus.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ script_template: &SCRIPT_TEMPLATE
2626
install_dependencies_script: |
2727
export DEBIAN_FRONTEND=noninteractive
2828
PACKAGES_TO_INSTALL="lz4 unzip ca-certificates git pkg-config dpkg-dev make cmake cmake-curses-gui ccache bison npm"
29-
PACKAGES_LIBS="libgflags-dev libxml-simple-perl libeatmydata1 libfido2-dev libicu-dev libevent-dev libudev-dev libaio-dev libmecab-dev libnuma-dev liblz4-dev libzstd-dev libedit-dev libpam-dev libssl-dev libcurl4-openssl-dev libldap2-dev libkrb5-dev libsasl2-dev libsasl2-modules-gssapi-mit"
29+
PACKAGES_LIBS="libtirpc-dev libgflags-dev libxml-simple-perl libeatmydata1 libfido2-dev libicu-dev libevent-dev libudev-dev libaio-dev libmecab-dev libnuma-dev liblz4-dev libzstd-dev libedit-dev libpam-dev libssl-dev libcurl4-openssl-dev libldap2-dev libkrb5-dev libsasl2-dev libsasl2-modules-gssapi-mit"
3030
PACKAGES_PROTOBUF="protobuf-compiler libprotobuf-dev libprotoc-dev"
3131
apt update
3232
apt -yq --no-install-suggests --no-install-recommends --allow-unauthenticated install $PACKAGES_TO_INSTALL $PACKAGES_LIBS $PACKAGES_PROTOBUF $SELECTED_CXX
@@ -129,7 +129,7 @@ task:
129129
# image: ami-0e2b332e63c56bcb5 # Ubuntu Server 22.04 LTS ARM 64-bit
130130
type: c6gd.4xlarge # 16 vCPUs, 32 GB, 950 GB SSD, 0.6144 USD/H
131131
region: us-east-1
132-
architecture: arm64 # defautls to amd64
132+
architecture: arm64 # defaults to amd64
133133
spot: true
134134
env:
135135
OS_TYPE: ubuntu-22.04-arm64
@@ -156,6 +156,39 @@ task:
156156
<< : *SCRIPT_TEMPLATE
157157

158158

159+
task:
160+
<< : *FILTER_TEMPLATE
161+
# run only on "percona/percona-server" but not on "trunk" as we have nightly cron builds for "trunk" branch
162+
only_if: "$CIRRUS_CRON != '' || $CIRRUS_REPO_FULL_NAME == 'percona/percona-server' && $CIRRUS_BRANCH != 'trunk' && !changesIncludeOnly('doc/*', 'build-ps/*', 'man/*', 'mysql-test/*', 'packaging/*', 'policy/*', 'scripts/*', 'support-files/*')"
163+
aws_credentials: ENCRYPTED[!f57794979d3ed96943cd39073b66a4fffbdc3ee6366b265e68c5aae890961d171bddca50bf169cc07db56c8c68172b84!]
164+
ec2_instance:
165+
# aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-2024061*"
166+
image: ami-0d3d400c0ff21c982 # Ubuntu 24.04 x86-64 with gcc-14
167+
type: c6i.4xlarge # 16 vCPUs, 32 GB, no SSD
168+
region: us-east-1
169+
architecture: amd64 # defaults to amd64
170+
spot: true
171+
env:
172+
OS_TYPE: ubuntu-24.04-x86_64
173+
matrix:
174+
- name: (x86_64) gcc-14 Debug [Ubuntu 24.04 Noble]
175+
env:
176+
SELECTED_CC: gcc-14
177+
SELECTED_CXX: g++-14
178+
BUILD_TYPE: Debug
179+
BUILD_PARAMS_TYPE: normal
180+
- name: (x86_64) gcc-14 RelWithDebInfo [Ubuntu 24.04 Noble]
181+
skip: $CIRRUS_PR != "" # skip PRs
182+
env:
183+
SELECTED_CC: gcc-14
184+
SELECTED_CXX: g++-14
185+
BUILD_TYPE: RelWithDebInfo
186+
BUILD_PARAMS_TYPE: normal
187+
mount_disk_script: |
188+
lsblk
189+
lsblk -f
190+
<< : *SCRIPT_TEMPLATE
191+
159192

160193
task:
161194
<< : *FILTER_TEMPLATE

.clang-format

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# Copyright (c) 2016, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License, version 2.0,
55
# as published by the Free Software Foundation.
66
#
7-
# This program is also distributed with certain software (including
7+
# This program is designed to work with certain software (including
88
# but not limited to OpenSSL) that is licensed under separate terms,
99
# as designated in a particular file or component or in included license
1010
# documentation. The authors of MySQL hereby grant you an additional
1111
# permission to link the program and your derivative works with the
12-
# separately licensed software that they have included with MySQL.
12+
# separately licensed software that they have either included with
13+
# the program or referenced in the documentation.
1314
#
1415
# This program is distributed in the hope that it will be useful,
1516
# but WITHOUT ANY WARRANTY; without even the implied warranty of

.clang-tidy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2024, Oracle and/or its affiliates.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License, version 2.0,
55
# as published by the Free Software Foundation.
66
#
7-
# This program is also distributed with certain software (including
7+
# This program is designed to work with certain software (including
88
# but not limited to OpenSSL) that is licensed under separate terms,
99
# as designated in a particular file or component or in included license
1010
# documentation. The authors of MySQL hereby grant you an additional
1111
# permission to link the program and your derivative works with the
12-
# separately licensed software that they have included with MySQL.
12+
# separately licensed software that they have either included with
13+
# the program or referenced in the documentation.
1314
#
1415
# This program is distributed in the hope that it will be useful,
1516
# but WITHOUT ANY WARRANTY; without even the implied warranty of

.gitconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# Copyright (c) 2018, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2018, 2024, Oracle and/or its affiliates.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License, version 2.0,
55
# as published by the Free Software Foundation.
66
#
7-
# This program is also distributed with certain software (including
7+
# This program is designed to work with certain software (including
88
# but not limited to OpenSSL) that is licensed under separate terms,
99
# as designated in a particular file or component or in included license
1010
# documentation. The authors of MySQL hereby grant you an additional
1111
# permission to link the program and your derivative works with the
12-
# separately licensed software that they have included with MySQL.
12+
# separately licensed software that they have either included with
13+
# the program or referenced in the documentation.
1314
#
1415
# This program is distributed in the hope that it will be useful,
1516
# but WITHOUT ANY WARRANTY; without even the implied warranty of

.github/workflows/clang-tidy.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Workflow with limited permissions that performs the checks and provides analysis results through an artifact
2+
name: Static_analysis
3+
run-name: GitHub actions for clang-tidy checks
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- 5.7
9+
- 8.0
10+
- trunk
11+
- release-*
12+
13+
env:
14+
UBUNTU_CODE_NAME: "jammy"
15+
COMPILER_VERSION: "17"
16+
BOOST_VERSION: "1_77_0"
17+
BOOST_DIR: "/home/runner/my_boost"
18+
19+
jobs:
20+
clang-tidy:
21+
runs-on: ubuntu-22.04
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
fetch-depth: 0
27+
submodules: 'recursive'
28+
29+
- name: Fetch base branch
30+
run: |
31+
git remote add target "https://github.com/${{ github.event.pull_request.base.repo.full_name }}"
32+
git fetch --no-tags --no-recurse-submodules target "${{ github.event.pull_request.base.ref }}"
33+
34+
- name: Install dependencies and clang-tidy
35+
run: |
36+
curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -
37+
echo "deb http://apt.llvm.org/${UBUNTU_CODE_NAME}/ llvm-toolchain-${UBUNTU_CODE_NAME}-${COMPILER_VERSION} main" | sudo tee -a /etc/apt/sources.list > /dev/null
38+
sudo apt-get update
39+
sudo apt-get install -y --allow-unauthenticated --no-install-recommends clang-${COMPILER_VERSION} clang-tidy-${COMPILER_VERSION} libldap2-dev curl libcurl4-openssl-dev bison libudev-dev libkrb5-dev libreadline-dev zlib1g-dev liblz4-dev \
40+
libedit-dev libevent-dev protobuf-compiler libprotobuf-dev libprotoc-dev libfido2-dev libldap2-dev libsasl2-dev libsasl2-modules
41+
42+
- name: Cache boost
43+
id: cache-boost
44+
uses: actions/cache@v3
45+
with:
46+
path: ${{ env.BOOST_DIR }}
47+
key: ${{ runner.os }}-boost-${{ env.BOOST_VERSION }}
48+
49+
- name: Download boost
50+
if: steps.cache-boost.outputs.cache-hit != 'true'
51+
run: |
52+
wget --progress=dot:giga -P ${BOOST_DIR} "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.gz"
53+
tar -xzf "${BOOST_DIR}/boost_${BOOST_VERSION}.tar.gz" -C "${BOOST_DIR}"
54+
55+
- name: Prepare compile_commands.json
56+
run: |
57+
cmake -B ../debug-build -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Debug -DWITH_BOOST=${BOOST_DIR} -DWITH_SSL=system \
58+
-DWITH_AUTHENTICATION_LDAP=ON -DWITH_KEYRING_VAULT=ON -DWITH_ROCKSDB=ON -DCMAKE_C_COMPILER=clang-${COMPILER_VERSION} -DCMAKE_CXX_COMPILER=clang++-${COMPILER_VERSION} \
59+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_SYSTEM_LIBS=ON ${{ github.workspace }}
60+
61+
- name: Create results directory
62+
run: |
63+
mkdir clang-tidy-result
64+
65+
- name: Analyze
66+
# Don't disable push/merge option in the PR even if there are unfixed warnings.
67+
continue-on-error: true
68+
run: |
69+
git diff -U0 "$(git merge-base HEAD "target/${{ github.event.pull_request.base.ref }}")" | clang-tidy-diff-${COMPILER_VERSION}.py -p1 -path ../debug-build -export-fixes clang-tidy-result/fixes.yml
70+
71+
- name: Save PR metadata
72+
run: |
73+
echo "${{ github.event.number }}" > clang-tidy-result/pr-id.txt
74+
echo "${{ github.event.pull_request.head.repo.full_name }}" > clang-tidy-result/pr-head-repo.txt
75+
echo "${{ github.event.pull_request.head.sha }}" > clang-tidy-result/pr-head-sha.txt
76+
77+
- uses: actions/upload-artifact@v4
78+
with:
79+
name: clang-tidy-result
80+
path: clang-tidy-result/
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Secure workflow with access to repository secrets and GitHub token for posting analysis results
2+
name: Post the static analysis results
3+
4+
on:
5+
workflow_run:
6+
workflows: [ Static_analysis ]
7+
types:
8+
- completed
9+
10+
jobs:
11+
clang-tidy-results:
12+
# Trigger the job only if the Static_analysis workflow completed successfully
13+
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
14+
runs-on: ubuntu-22.04
15+
permissions:
16+
pull-requests: write
17+
steps:
18+
- name: Download analysis results
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
run_id: ${{ github.event.workflow_run.id }},
26+
});
27+
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
28+
return artifact.name == "clang-tidy-result"
29+
})[0];
30+
const download = await github.rest.actions.downloadArtifact({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
artifact_id: matchArtifact.id,
34+
archive_format: "zip",
35+
});
36+
const fs = require("fs");
37+
fs.writeFileSync("${{ github.workspace }}/clang-tidy-result.zip", Buffer.from(download.data));
38+
- name: Extract analysis results
39+
run: |
40+
mkdir clang-tidy-result
41+
unzip -j clang-tidy-result.zip -d clang-tidy-result
42+
- name: Set environment variables
43+
uses: actions/github-script@v7
44+
with:
45+
script: |
46+
const assert = require("node:assert").strict;
47+
const fs = require("fs");
48+
function exportVar(varName, fileName, regEx) {
49+
const val = fs.readFileSync("${{ github.workspace }}/clang-tidy-result/" + fileName, {
50+
encoding: "ascii"
51+
}).trimEnd();
52+
assert.ok(regEx.test(val), "Invalid value format for " + varName);
53+
core.exportVariable(varName, val);
54+
}
55+
exportVar("PR_ID", "pr-id.txt", /^[0-9]+$/);
56+
exportVar("PR_HEAD_REPO", "pr-head-repo.txt", /^[-./0-9A-Z_a-z]+$/);
57+
exportVar("PR_HEAD_SHA", "pr-head-sha.txt", /^[0-9A-Fa-f]+$/);
58+
- uses: actions/checkout@v4
59+
with:
60+
repository: ${{ env.PR_HEAD_REPO }}
61+
ref: ${{ env.PR_HEAD_SHA }}
62+
persist-credentials: false
63+
- name: Redownload analysis results
64+
uses: actions/github-script@v7
65+
with:
66+
script: |
67+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
68+
owner: context.repo.owner,
69+
repo: context.repo.repo,
70+
run_id: ${{ github.event.workflow_run.id }},
71+
});
72+
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
73+
return artifact.name == "clang-tidy-result"
74+
})[0];
75+
const download = await github.rest.actions.downloadArtifact({
76+
owner: context.repo.owner,
77+
repo: context.repo.repo,
78+
artifact_id: matchArtifact.id,
79+
archive_format: "zip",
80+
});
81+
const fs = require("fs");
82+
fs.writeFileSync("${{ github.workspace }}/clang-tidy-result.zip", Buffer.from(download.data));
83+
- name: Extract analysis results
84+
run: |
85+
mkdir clang-tidy-result
86+
unzip -j clang-tidy-result.zip -d clang-tidy-result
87+
- name: Run clang-tidy-pr-comments action
88+
uses: platisd/clang-tidy-pr-comments@v1
89+
with:
90+
github_token: ${{ secrets.GITHUB_TOKEN }}
91+
clang_tidy_fixes: clang-tidy-result/fixes.yml
92+
pull_request_id: ${{ env.PR_ID }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ scalability_jobs_*
3232
.cproject
3333
.project
3434
.settings/
35+

0 commit comments

Comments
 (0)