Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gen1us2k committed Sep 28, 2023
2 parents 50138c1 + bbb794f commit 1f8e702
Show file tree
Hide file tree
Showing 856 changed files with 16,095 additions and 3,173 deletions.
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
* @percona/pmm-review-be
/build/ @atymchuk @percona/pmm-review-be
/admin/ @percona/pmm-review-be
/agent/agents/postgres/ @JiriCtvrtka @percona/pmm-review-be
/agent/runner/ @artemgavrilov @percona/pmm-review-be
/api/ @BupycHuk @percona/pmm-review-be
/docs/api/ @atymchuk @percona/pmm-review-be
/managed/services/checks/ @idoqo @percona/pmm-review-be
/managed/ @percona/pmm-review-be
/update/ @BupycHuk @talhabinrizwan @percona/pmm-review-be
/api-tests/ @percona/pmm-review-be
**/go.mod @percona/pmm-review-dependency @percona/pmm-review-be
**/Dockerfile @percona/pmm-review-dependency @percona/pmm-review-be
/cli-tests/package.json @percona/pmm-review-dependency @yurkovychv
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
go:
- version: 1.20.x
- version: 1.21.x
may-fail: false
- version: tip
may-fail: true
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV
echo "$HOME/gotip/bin" >> $GITHUB_PATH
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
name: Enable auto-merge
runs-on: ubuntu-20.04
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
10 changes: 5 additions & 5 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to ghcr.io registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to docker.io registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push to registries
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: ./devcontainer.Dockerfile
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: API
uses: readmeio/rdme@v8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Update Docker Hub Readme for perconalab/pmm-server
uses: peter-evans/dockerhub-description@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Enable Go build cache
if: ${{ fromJSON(env.DEVCONTAINER_CACHE_ENABLED) }}
Expand Down Expand Up @@ -107,9 +107,6 @@ jobs:
- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
go version
go env
pwd
env | sort
go env | sort
git status
kubectl version --short --output json
2 changes: 1 addition & 1 deletion .github/workflows/qan-api2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create SBOM for PMM
uses: anchore/sbom-action@v0
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create SBOM for vmproxy
uses: anchore/sbom-action@v0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Docker Up
run: docker compose up -d
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vmproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down
32 changes: 18 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ linters-settings:
max-complexity: 30

depguard:
list-type: blacklist
include-go-root: true
packages:
# use "github.com/pkg/errors" instead
- errors
# use "github.com/golang/protobuf/proto" instead
- github.com/gogo/protobuf/proto
# use only forked parser
- github.com/percona/go-mysql/log/slow
# use "github.com/percona-platform/saas" instead
- github.com/percona-platform/platform
# use "gopkg.in/yaml.v3" instead
- gopkg.in/yaml.v2
rules:
main:
deny:
- pkg: "errors"
desc: use "github.com/pkg/errors" instead
- pkg: "github.com/gogo/protobuf/proto"
desc: use "github.com/golang/protobuf/proto" instead
- pkg: "github.com/percona/go-mysql/log/slow"
desc: only use the forked parser
- pkg: "github.com/percona-platform/platform"
desc: use "github.com/percona-platform/saas" instead
- pkg: "gopkg.in/yaml.v2"
desc: use "gopkg.in/yaml.v3" instead

gci:
sections:
Expand All @@ -29,7 +29,7 @@ linters-settings:

godot:
capital: true
period: false
period: true
scope: toplevel
exclude:
- go-sumtype:decl
Expand Down Expand Up @@ -103,8 +103,12 @@ linters:
- maligned # deprecated
- nlreturn # too annoying
- nosnakecase # deprecated
- rowserrcheck # disabled because of generics
- scopelint # too many false positives
- structcheck # replaced by unused
- varcheck # replaced by unused
- varnamelen # useless
- wastedassign # disabled because of generics
- wrapcheck # we do not use wrapping everywhere
- wsl # too annoying

Expand Down
61 changes: 11 additions & 50 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ header:
- paths:
- "**/*.go"
paths-ignore:
- "**/agent/**"
- "**/admin/**"
- "agent/**"
- "admin/**"
- "**/mock_*"
- "**/*.pb.go"
- "**/*.pb.gw.go"
Expand All @@ -12,59 +12,20 @@ header:
- "**/json/client/**"
- "**/amclient/**"
- "**/ammodels/**"
- "qan-api2/migrations/"
- "qan-api2/migrations/**"
license:
spdx-id: AGPL-3.0
content: |
// Copyright (C) 2019 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
spdx-id: AGPL-3.0-or-later
copyright-owner: Percona LLC
copyright-year: 2023

- paths:
- "./agent/**/*.go"
- "./admin/**/.go"
- "agent/**/*.go"
- "admin/**/*.go"
paths-ignore:
- "**/*_reform.go"
- "**/mock_*"
- "**/json/client/**"
license:
content: |
// Copyright (C) 2019 Percona LLC
//
// Licensed 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.
pattern: |
// Copyright \(C\) 20\d{2} Percona LLC
//
// Licensed 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.
spdx-id: Apache-2.0
copyright-owner: Percona LLC
copyright-year: 2023
2 changes: 1 addition & 1 deletion admin/agentlocal/agentlocal.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Percona LLC
// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions admin/cli/cli.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Percona LLC
// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package cli stores cli configuration and common logic for commands
// Package cli stores cli configuration and common logic for commands.
package cli

import (
Expand Down
4 changes: 2 additions & 2 deletions admin/cli/flags/global.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Percona LLC
// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package flags holds global flags
// Package flags holds global flags.
package flags

import (
Expand Down
4 changes: 2 additions & 2 deletions admin/cmd/bootstrap.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Percona LLC
// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package cmd holds common logic used by commands
// Package cmd holds common logic used by commands.
package cmd

import (
Expand Down
Loading

0 comments on commit 1f8e702

Please sign in to comment.