Skip to content

Commit 7654076

Browse files
authored
Merge branch 'main' into v3
2 parents 3cb9f9f + e4d3345 commit 7654076

File tree

8 files changed

+52
-24
lines changed

8 files changed

+52
-24
lines changed

.github/workflows/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- name: Dependabot metadata
1515
id: metadata
16-
uses: dependabot/fetch-metadata@v1
16+
uses: dependabot/fetch-metadata@v2
1717
with:
1818
github-token: "${{ secrets.GITHUB_TOKEN }}"
1919

api-tests/server/advisors_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func TestChangeSecurityChecks(t *testing.T) {
163163
}
164164
})
165165

166-
t.Run("change interval error", func(t *testing.T) {
166+
t.Run("unrecognized interval is ignored", func(t *testing.T) {
167167
t.Cleanup(func() { restoreCheckIntervalDefaults(t) })
168168

169169
resp, err := managementClient.Default.SecurityChecks.ListSecurityChecks(nil)
@@ -185,7 +185,7 @@ func TestChangeSecurityChecks(t *testing.T) {
185185
}
186186

187187
_, err = managementClient.Default.SecurityChecks.ChangeSecurityChecks(params)
188-
pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid value for enum type: \"unknown_interval\"")
188+
require.NoError(t, err)
189189

190190
resp, err = managementClient.Default.SecurityChecks.ListSecurityChecks(nil)
191191
require.NoError(t, err)

build/scripts/install_tarball

+39-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
set -eu
44

5+
# Usage instruction for the install_tarball script
6+
usage () {
7+
cat <<EOF
8+
Usage: $0 [OPTIONS]
9+
The following options may be given :
10+
-u Update PMM-Agent
11+
-help) usage ;;
12+
Example:
13+
For help command - $0 -help
14+
To install PMM tarball - $0
15+
To update the installed PMM tarball - $0 -u
16+
EOF
17+
exit 1
18+
}
19+
20+
UPDATE=0
21+
for arg in "$@"
22+
do
23+
case "$arg" in
24+
"-u") UPDATE=1 ;;
25+
"-help") usage ;;
26+
*) echo "Invalid option:$arg"; usage;;
27+
esac
28+
done
29+
530
CURRENT_DIR="$(pwd)"
631
WORKING_DIR="$(dirname "${0}")"
732
cd "${WORKING_DIR}" || exit 2
@@ -17,7 +42,15 @@ else
1742
INSTALL_COMMAND="install -o ${PMM_USER} -g ${PMM_GROUP}"
1843
fi
1944

20-
echo "Installing into ${PMM_DIR}..."
45+
# Check if PMM_DIR has the right permission to install files into it
46+
mkdir -p "${PMM_DIR}" || true
47+
if [ -w ${PMM_DIR} ]; then
48+
echo "Installing into ${PMM_DIR}...";
49+
else
50+
echo -e "Cannot write to ${PMM_DIR}. \nPlease make sure the user $(id -un) has permissions to write to this directory\n\n"
51+
usage;
52+
exit 1;
53+
fi
2154

2255
${INSTALL_COMMAND} -m 0755 -d "${PMM_DIR}"
2356
${INSTALL_COMMAND} -m 0755 -d "${PMM_DIR}"/bin
@@ -65,19 +98,14 @@ for FILE in example.prom queries-mysqld.yml example-queries-postgres.yml; do
6598
done
6699
done
67100

68-
update=0
69-
while getopts :u flag
70-
do
71-
case "${flag}" in
72-
u) update=1;;
73-
*) echo "Invalid option: -$flag" ;;
74-
esac
75-
done
76-
77-
if [ "${update}" = "1" ]; then
101+
if [ "${UPDATE}" = "1" ]; then
78102
echo "Config file was not removed!"
79103
else
80104
${INSTALL_COMMAND} -m 0660 /dev/null "${PMM_DIR}"/config/pmm-agent.yaml
81105
fi
82106

107+
if [ $? -eq 0 ]; then
108+
echo "Successfully installed PMM Client to ${PMM_DIR}"
109+
fi
110+
83111
cd "${CURRENT_DIR}" || true

cli-tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/luxon": "^3.4.0",
1717
"dotenv": "^16.4.0",
1818
"luxon": "^3.4.4",
19-
"playwright": "^1.33.0",
19+
"playwright": "^1.41.2",
2020
"promise-retry": "^2.0.1",
2121
"shelljs": "^0.8.5",
2222
"typescript": "^5.4.2"

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ replace github.com/ClickHouse/clickhouse-go/151 => github.com/ClickHouse/clickho
1818
require (
1919
github.com/AlekSi/pointer v1.2.0
2020
github.com/ClickHouse/clickhouse-go/151 v0.0.0-00010101000000-000000000000
21-
github.com/ClickHouse/clickhouse-go/v2 v2.21.1
21+
github.com/ClickHouse/clickhouse-go/v2 v2.22.2
2222
github.com/DATA-DOG/go-sqlmock v1.5.0
2323
github.com/alecthomas/kong v0.9.0
2424
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
@@ -79,7 +79,7 @@ require (
7979
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80
8080
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80
8181
google.golang.org/grpc v1.62.0
82-
google.golang.org/protobuf v1.32.0
82+
google.golang.org/protobuf v1.33.0
8383
gopkg.in/alecthomas/kingpin.v2 v2.2.6
8484
gopkg.in/reform.v1 v1.5.1
8585
gopkg.in/yaml.v3 v3.0.1

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ github.com/ClickHouse/clickhouse-go v1.5.1 h1:I8zVFZTz80crCs0FFEBJooIxsPcV0xfthz
5454
github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
5555
github.com/ClickHouse/clickhouse-go v1.5.4 h1:cKjXeYLNWVJIx2J1K6H2CqyRmfwVJVY1OV1coaaFcI0=
5656
github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
57-
github.com/ClickHouse/clickhouse-go/v2 v2.21.1 h1:x8wZEMOHDh4K8kLQBtGMeIIguejiaj8/bUiF2VzG6n4=
58-
github.com/ClickHouse/clickhouse-go/v2 v2.21.1/go.mod h1:hTWNkV9mkQwiQ/df0rbN17VXF05UTResY4krnjbzVZA=
57+
github.com/ClickHouse/clickhouse-go/v2 v2.22.2 h1:T1BljsIjj+3aQog80jKMTeF4EqAUG4P6TVcCvmakYAc=
58+
github.com/ClickHouse/clickhouse-go/v2 v2.22.2/go.mod h1:tBhdF3f3RdP7sS59+oBAtTyhWpy0024ZxDMhgxra0QE=
5959
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
6060
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
6161
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
@@ -968,8 +968,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
968968
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
969969
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
970970
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
971-
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
972-
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
971+
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
972+
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
973973
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
974974
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
975975
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

tools/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ require (
6969
github.com/distribution/reference v0.5.0 // indirect
7070
github.com/docker/cli v24.0.7+incompatible // indirect
7171
github.com/docker/distribution v2.8.3+incompatible // indirect
72-
github.com/docker/docker v25.0.0+incompatible // indirect
72+
github.com/docker/docker v25.0.5+incompatible // indirect
7373
github.com/docker/docker-credential-helpers v0.8.1 // indirect
7474
github.com/docker/go-connections v0.5.0 // indirect
7575
github.com/docker/go-units v0.5.0 // indirect

tools/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1x
169169
github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
170170
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
171171
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
172-
github.com/docker/docker v25.0.0+incompatible h1:g9b6wZTblhMgzOT2tspESstfw6ySZ9kdm94BLDKaZac=
173-
github.com/docker/docker v25.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
172+
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
173+
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
174174
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
175175
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
176176
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=

0 commit comments

Comments
 (0)