Skip to content

Commit

Permalink
Merge branch 'main' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk authored Apr 1, 2024
2 parents 3cb9f9f + e4d3345 commit 7654076
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
4 changes: 2 additions & 2 deletions api-tests/server/advisors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func TestChangeSecurityChecks(t *testing.T) {
}
})

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

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

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

resp, err = managementClient.Default.SecurityChecks.ListSecurityChecks(nil)
require.NoError(t, err)
Expand Down
50 changes: 39 additions & 11 deletions build/scripts/install_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

set -eu

# Usage instruction for the install_tarball script
usage () {
cat <<EOF
Usage: $0 [OPTIONS]
The following options may be given :
-u Update PMM-Agent
-help) usage ;;
Example:
For help command - $0 -help
To install PMM tarball - $0
To update the installed PMM tarball - $0 -u
EOF
exit 1
}

UPDATE=0
for arg in "$@"
do
case "$arg" in
"-u") UPDATE=1 ;;
"-help") usage ;;
*) echo "Invalid option:$arg"; usage;;
esac
done

CURRENT_DIR="$(pwd)"
WORKING_DIR="$(dirname "${0}")"
cd "${WORKING_DIR}" || exit 2
Expand All @@ -17,7 +42,15 @@ else
INSTALL_COMMAND="install -o ${PMM_USER} -g ${PMM_GROUP}"
fi

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

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

update=0
while getopts :u flag
do
case "${flag}" in
u) update=1;;
*) echo "Invalid option: -$flag" ;;
esac
done

if [ "${update}" = "1" ]; then
if [ "${UPDATE}" = "1" ]; then
echo "Config file was not removed!"
else
${INSTALL_COMMAND} -m 0660 /dev/null "${PMM_DIR}"/config/pmm-agent.yaml
fi

if [ $? -eq 0 ]; then
echo "Successfully installed PMM Client to ${PMM_DIR}"
fi

cd "${CURRENT_DIR}" || true
2 changes: 1 addition & 1 deletion cli-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/luxon": "^3.4.0",
"dotenv": "^16.4.0",
"luxon": "^3.4.4",
"playwright": "^1.33.0",
"playwright": "^1.41.2",
"promise-retry": "^2.0.1",
"shelljs": "^0.8.5",
"typescript": "^5.4.2"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ replace github.com/ClickHouse/clickhouse-go/151 => github.com/ClickHouse/clickho
require (
github.com/AlekSi/pointer v1.2.0
github.com/ClickHouse/clickhouse-go/151 v0.0.0-00010101000000-000000000000
github.com/ClickHouse/clickhouse-go/v2 v2.21.1
github.com/ClickHouse/clickhouse-go/v2 v2.22.2
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/alecthomas/kong v0.9.0
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
Expand Down Expand Up @@ -79,7 +79,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.32.0
google.golang.org/protobuf v1.33.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/reform.v1 v1.5.1
gopkg.in/yaml.v3 v3.0.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ github.com/ClickHouse/clickhouse-go v1.5.1 h1:I8zVFZTz80crCs0FFEBJooIxsPcV0xfthz
github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/ClickHouse/clickhouse-go v1.5.4 h1:cKjXeYLNWVJIx2J1K6H2CqyRmfwVJVY1OV1coaaFcI0=
github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/ClickHouse/clickhouse-go/v2 v2.21.1 h1:x8wZEMOHDh4K8kLQBtGMeIIguejiaj8/bUiF2VzG6n4=
github.com/ClickHouse/clickhouse-go/v2 v2.21.1/go.mod h1:hTWNkV9mkQwiQ/df0rbN17VXF05UTResY4krnjbzVZA=
github.com/ClickHouse/clickhouse-go/v2 v2.22.2 h1:T1BljsIjj+3aQog80jKMTeF4EqAUG4P6TVcCvmakYAc=
github.com/ClickHouse/clickhouse-go/v2 v2.22.2/go.mod h1:tBhdF3f3RdP7sS59+oBAtTyhWpy0024ZxDMhgxra0QE=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
Expand Down Expand Up @@ -968,8 +968,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ require (
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/cli v24.0.7+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v25.0.0+incompatible // indirect
github.com/docker/docker v25.0.5+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.1 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1x
github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v25.0.0+incompatible h1:g9b6wZTblhMgzOT2tspESstfw6ySZ9kdm94BLDKaZac=
github.com/docker/docker v25.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
Expand Down

0 comments on commit 7654076

Please sign in to comment.