Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync v3 with v3 api breaking changes #2841

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
68cae33
Bump google.golang.org/grpc from 1.59.0 to 1.60.1 (#2712)
dependabot[bot] Dec 25, 2023
5a1e416
Bump github.com/ClickHouse/clickhouse-go/v2 from 2.15.0 to 2.17.0 (#2…
dependabot[bot] Dec 25, 2023
daad869
Bump github.com/reviewdog/reviewdog from 0.15.0 to 0.16.0 in /tools (…
dependabot[bot] Dec 25, 2023
27b1eb2
Bump k8s.io/client-go from 0.28.0 to 0.29.0 (#2726)
dependabot[bot] Dec 26, 2023
6153c20
Bump k8s.io/cli-runtime from 0.28.0 to 0.29.0 (#2727)
dependabot[bot] Dec 26, 2023
24d1e50
Bump k8s.io/apiextensions-apiserver from 0.26.2 to 0.29.0 (#2729)
dependabot[bot] Jan 8, 2024
da3267e
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 (#2731)
dependabot[bot] Jan 8, 2024
5b1eb53
Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0 (#2730)
dependabot[bot] Jan 8, 2024
a5f8964
PMM-9407 Add queries.yaml to debian package to postgres medium-resolu…
surbhat1595 Jan 8, 2024
9a62d90
PMM-7 Fix logout issue. (#2743)
BupycHuk Jan 8, 2024
0da709d
PMM-9825 Use username instead of userid for PGSM 2.0. (#2718)
BupycHuk Jan 8, 2024
27a2fd8
Bump github.com/charmbracelet/bubbletea from 0.24.1 to 0.25.0 (#2694)
dependabot[bot] Jan 8, 2024
a7156e3
Bump github.com/charmbracelet/bubbles from 0.16.1 to 0.17.1 (#2697)
dependabot[bot] Jan 8, 2024
5677e92
Bump eslint-plugin-playwright from 0.20.0 to 0.21.0 in /cli-tests (#2…
dependabot[bot] Jan 9, 2024
e1a82bd
Bump luxon and @types/luxon in /cli-tests (#2740)
dependabot[bot] Jan 9, 2024
f91e261
PMM-7 Cleanup codeowners (#2753)
artemgavrilov Jan 9, 2024
f4cb58c
Bump github.com/go-delve/delve from 1.21.0 to 1.22.0 in /tools (#2734)
dependabot[bot] Jan 9, 2024
c049207
Bump github.com/go-git/go-git/v5 from 5.8.0 to 5.11.0 in /tools (#2732)
dependabot[bot] Jan 9, 2024
85bdcf5
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 in /tools (#2744)
dependabot[bot] Jan 9, 2024
a5dbc88
Bump github.com/golang-migrate/migrate/v4 from 4.16.1 to 4.17.0 (#2752)
dependabot[bot] Jan 10, 2024
ec5e88a
Bump golang.org/x/sys from 0.15.0 to 0.16.0 (#2748)
dependabot[bot] Jan 10, 2024
6f262e4
Bump github.com/go-openapi/strfmt from 0.21.7 to 0.22.0 (#2750)
dependabot[bot] Jan 10, 2024
0522645
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 (#2749)
dependabot[bot] Jan 10, 2024
1b0a7ef
Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.18.0 to 2.19.0 …
dependabot[bot] Jan 10, 2024
76ff2ae
Bump github.com/go-co-op/gocron from 1.36.0 to 1.37.0 (#2760)
dependabot[bot] Jan 12, 2024
ba9e478
Bump golang.org/x/sync from 0.5.0 to 0.6.0 (#2757)
dependabot[bot] Jan 12, 2024
128c20c
Bump github.com/docker/go-connections from 0.4.0 to 0.5.0 (#2759)
dependabot[bot] Jan 12, 2024
a59e850
Bump golang.org/x/tools from 0.16.0 to 0.17.0 (#2761)
dependabot[bot] Jan 12, 2024
9d4ee4b
PMM-12815: downgrade mongoDB driver version (#2755)
idoqo Jan 14, 2024
40b3365
PMM-12712 Shards collector. (#2701)
JiriCtvrtka Jan 15, 2024
4f66340
Bump golang.org/x/tools from 0.16.0 to 0.17.0 in /tools (#2762)
dependabot[bot] Jan 15, 2024
ce0fbe8
made changes for enableing tagliatelle (#2745)
vishwas-sharma2480 Jan 15, 2024
16a81b9
Bump github.com/prometheus/common from 0.45.0 to 0.46.0 (#2763)
dependabot[bot] Jan 15, 2024
6a8dc1b
Bump k8s.io/kubectl from 0.28.0 to 0.29.0 (#2758)
dependabot[bot] Jan 16, 2024
4aa0e4c
PMM-12510: Replace getDiagnosticData for connection tests (#2754)
idoqo Jan 16, 2024
4fcbc88
PMM-12290 Fix. (#2756)
JiriCtvrtka Jan 17, 2024
52f0301
Bump actions/cache from 3 to 4 (#2774)
dependabot[bot] Jan 18, 2024
0f6fc6a
Bump github.com/Azure/azure-sdk-for-go/sdk/azidentity (#2775)
dependabot[bot] Jan 18, 2024
63c1e0f
Bump github.com/brianvoe/gofakeit/v6 from 6.26.0 to 6.27.0 (#2767)
dependabot[bot] Jan 18, 2024
52ce0d7
PMM-12738-fix-certificate-conf (#2704)
BupycHuk Jan 18, 2024
07fde19
Bump eslint-plugin-playwright from 0.21.0 to 0.22.1 in /cli-tests (#2…
dependabot[bot] Jan 20, 2024
68cdb49
PMM-12807 fix dsn generation (#2784)
BupycHuk Jan 22, 2024
cdef208
Bump github.com/aws/aws-sdk-go from 1.49.6 to 1.50.1 (#2788)
dependabot[bot] Jan 23, 2024
abe5010
Bump github.com/brianvoe/gofakeit/v6 from 6.27.0 to 6.28.0 (#2783)
dependabot[bot] Jan 23, 2024
8fdd67b
Bump @typescript-eslint/parser from 6.14.0 to 6.19.1 in /cli-tests (#…
dependabot[bot] Jan 23, 2024
a2c44ef
Bump @typescript-eslint/eslint-plugin in /cli-tests (#2786)
dependabot[bot] Jan 24, 2024
f92850b
Bump dotenv from 16.3.1 to 16.4.0 in /cli-tests (#2792)
dependabot[bot] Jan 24, 2024
6ed0460
Bump github.com/go-openapi/runtime from 0.26.0 to 0.27.0 (#2791)
dependabot[bot] Jan 24, 2024
3d19be2
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 (#2789)
dependabot[bot] Jan 25, 2024
2bfad7b
Bump github.com/google/uuid from 1.5.0 to 1.6.0 (#2790)
dependabot[bot] Jan 25, 2024
8aaedd6
Bump github.com/reviewdog/reviewdog from 0.16.0 to 0.17.0 in /tools (…
dependabot[bot] Jan 25, 2024
a8b3811
PMM-12846 Telemetry: data for the client node version (#2772)
rnovikovP Jan 25, 2024
4d0ad7e
Update descriptors
Jan 25, 2024
614981e
revert mongo driver (#2797)
idoqo Jan 26, 2024
a6ec20e
PMM-12871 [telemetry] time to first added service (#2798)
rnovikovP Jan 29, 2024
3137141
Bump peter-evans/dockerhub-description from 3 to 4 (#2795)
dependabot[bot] Jan 29, 2024
f869c80
Bump github.com/bufbuild/buf from 1.28.0 to 1.29.0 in /tools (#2794)
dependabot[bot] Jan 29, 2024
9f5f67d
Bump @typescript-eslint/eslint-plugin in /cli-tests (#2802)
dependabot[bot] Jan 30, 2024
a094828
Bump @typescript-eslint/parser from 6.19.1 to 6.20.0 in /cli-tests (#…
dependabot[bot] Jan 30, 2024
9078a82
Bump mvdan.cc/gofumpt from 0.5.0 to 0.6.0 in /tools (#2799)
dependabot[bot] Jan 31, 2024
9036a7f
Bump github.com/charmbracelet/bubbles from 0.17.1 to 0.18.0 (#2807)
dependabot[bot] Feb 2, 2024
664e558
Bump github.com/ClickHouse/clickhouse-go/v2 from 2.17.0 to 2.18.0 (#2…
dependabot[bot] Feb 5, 2024
b25e149
Bump @typescript-eslint/parser from 6.20.0 to 6.21.0 in /cli-tests (#…
dependabot[bot] Feb 6, 2024
f0176ed
PMM-7 remove .whitesource config (#2813)
ademidoff Feb 6, 2024
b3e935e
PMM-12806 VictoriaMetrics to give preference to environment vars (#2793)
ademidoff Feb 6, 2024
71aa6f8
Bump @typescript-eslint/eslint-plugin in /cli-tests (#2811)
dependabot[bot] Feb 7, 2024
9310b83
PMM-12641 clean up build scripts (#2728)
ademidoff Feb 7, 2024
64ff314
Bump golang.org/x/sys from 0.16.0 to 0.17.0 (#2816)
dependabot[bot] Feb 8, 2024
88a6f18
Enable revive (#2773)
vishwas-sharma2480 Feb 12, 2024
90a22b1
Bump eslint-plugin-playwright from 0.22.1 to 1.0.1 in /cli-tests (#2818)
dependabot[bot] Feb 12, 2024
58e8c44
Bump golang.org/x/tools from 0.17.0 to 0.18.0 in /tools (#2819)
dependabot[bot] Feb 13, 2024
e9aee30
PMM-7 Lint fix. (#2717)
JiriCtvrtka Feb 14, 2024
88e2720
PMM-12852: prefix PMM public URLs with scheme before parsing (#2803)
idoqo Feb 15, 2024
c81ec98
Bump go.mongodb.org/mongo-driver from 1.12.0 to 1.14.0 (#2825)
dependabot[bot] Feb 15, 2024
45750b4
Bump golang.org/x/tools from 0.17.0 to 0.18.0 (#2820)
dependabot[bot] Feb 15, 2024
2709dd1
Bump @typescript-eslint/parser from 6.21.0 to 7.0.1 in /cli-tests (#2…
dependabot[bot] Feb 16, 2024
8f60cb4
Bump eslint-plugin-playwright from 1.0.1 to 1.1.0 in /cli-tests (#2830)
dependabot[bot] Feb 16, 2024
537da80
Bump github.com/prometheus/common from 0.46.0 to 0.47.0 (#2829)
dependabot[bot] Feb 16, 2024
9356d2f
Bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.1 in /cli-te…
dependabot[bot] Feb 19, 2024
805419a
PMM-12348 Restart clickhouse after adding flag. (#2804)
BupycHuk Feb 20, 2024
65513d9
Merge remote-tracking branch 'origin/main' into v3
BupycHuk Feb 20, 2024
5e59ce3
PMM-7 go mod tidy
BupycHuk Feb 20, 2024
73b8b5d
PMM-7 fix tests
BupycHuk Feb 20, 2024
928eba2
PMM-12785 fix warning message from VM (#2824)
BupycHuk Feb 20, 2024
29e7cde
Merge remote-tracking branch 'origin/main' into v3
BupycHuk Feb 20, 2024
34fdae6
Merge branch 'v3' into v3-api-breaking-changes
idoqo Feb 25, 2024
0895314
fix build
idoqo Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
* @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
/managed/services/checks/ @idoqo @percona/pmm-review-be
/update/ @BupycHuk @talhabinrizwan @percona/pmm-review-be
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: File a bug report
labels: ["bug", "triage"]
assignees:
- BupycHuk
- artemgavrilov
body:
- type: markdown
attributes:
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: Suggest an idea for this project
labels: ["feature", "triage"]
assignees:
- BupycHuk
- artemgavrilov
body:
- type: markdown
attributes:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
cache: false

- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -48,7 +48,7 @@ jobs:
${{ runner.os }}-go-build-

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
cache: false

- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -112,7 +112,7 @@ jobs:
${{ runner.os }}-go-build-

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
cache: false

- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -82,7 +82,7 @@ jobs:
${{ runner.os }}-go-build-

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ jobs:
lfs: true

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-go-${{ matrix.go.version }}-modules-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.os }}-go-${{ matrix.go.version }}-modules-
- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ matrix.os }}-go-${{ matrix.go.version }}-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dockerhub-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
- uses: actions/checkout@v4

- name: Update Docker Hub Readme for perconalab/pmm-server
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: perconalab/pmm-server
readme-filepath: ./build/docker/server/README.md

- name: Update Docker Hub Readme for percona/pmm-server
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cache: false

- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -36,7 +36,7 @@ jobs:
${{ runner.os }}-go-build-

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Enable Go build cache
if: ${{ fromJSON(env.DEVCONTAINER_CACHE_ENABLED) }}
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Enable Go modules cache
if: ${{ fromJSON(env.DEVCONTAINER_CACHE_ENABLED) }}
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qan-api2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
cache: false

- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -49,7 +49,7 @@ jobs:
${{ runner.os }}-go-build-

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vmproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
cache: false

- name: Enable Go build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
Expand All @@ -49,7 +49,7 @@ jobs:
${{ runner.os }}-go-build-

- name: Enable Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ compose.yml
*.sw[o,p]

.env
.netrc

cli-tests/node_modules/
cli-tests/playwright-report/
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ linters:

# TODO: carefully review all the rules below and either fix the code
# or leave disabled and provide a reason why
- tagliatelle
- revive
#- tagliatelle
#- revive
- paralleltest
- gocognit
- tagalign
Expand Down
20 changes: 0 additions & 20 deletions .whitesource

This file was deleted.

10 changes: 6 additions & 4 deletions admin/agentlocal/agentlocal.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ func SetTransport(ctx context.Context, debug bool, port uint32) {
client.Default.SetTransport(transport)
}

// NetworkInfo represents information about the network.
type NetworkInfo bool

const (
RequestNetworkInfo NetworkInfo = true
DoNotRequestNetworkInfo NetworkInfo = false
Localhost = "127.0.0.1"
DefaultPMMAgentListenPort = 7777
RequestNetworkInfo NetworkInfo = true //nolint:revive
DoNotRequestNetworkInfo NetworkInfo = false //nolint:revive
Localhost = "127.0.0.1" //nolint:revive
DefaultPMMAgentListenPort = 7777 //nolint:revive
)

// ErrNotSetUp is returned by GetStatus when pmm-agent is running, but not set up.
Expand Down Expand Up @@ -81,6 +82,7 @@ type Status struct {
ConnectionUptime float32 `json:"connection_uptime"`
}

// AgentStatus represents the status of the agent.
type AgentStatus struct {
AgentID string `json:"agent_id"`
AgentType string `json:"agent_type"`
Expand Down
2 changes: 2 additions & 0 deletions admin/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (c *PMMAdminCommands) Run(ctx *kong.Context, globals *flags.GlobalFlags) er
return run(ctx, globals)
}

// GetGlobalFlags returns the global flags for PMMAdminCommands.
func (c *PMMAdminCommands) GetGlobalFlags() *flags.GlobalFlags {
return &c.GlobalFlags
}
Expand All @@ -81,6 +82,7 @@ type PMMCommands struct {
Completion commands.CompletionCommand `cmd:"" help:"Outputs shell code for initialising tab completions"`
}

// GetGlobalFlags returns the global flags for PMMAdminCommands.
func (c *PMMCommands) GetGlobalFlags() *flags.GlobalFlags {
return &c.GlobalFlags
}
Expand Down
2 changes: 1 addition & 1 deletion admin/cmd/pmm-admin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// 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.

// Package main.
package main

import (
Expand Down
2 changes: 1 addition & 1 deletion admin/cmd/pmm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// 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.

// Package main.
package main

import (
Expand Down
4 changes: 4 additions & 0 deletions admin/commands/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,19 @@ func ReadFromSource(src string) (*Credentials, error) {
return &creds, nil
}

// ErrorResponse defines the interface for error responses.
type ErrorResponse interface {
error
Code() int
}

// Error represents an error with additional information.
type Error struct {
Code int `json:"code"`
Error string `json:"error"`
}

// GetError converts an ErrorResponse to an Error.
func GetError(err ErrorResponse) Error {
v := reflect.ValueOf(err)
p := v.Elem().FieldByName("Payload")
Expand All @@ -131,6 +134,7 @@ func GetError(err ErrorResponse) Error {
}
}

// ParseTemplate parses the input text into a template.Template.
func ParseTemplate(text string) *template.Template {
t := template.New("").Option("missingkey=error")
return template.Must(t.Parse(strings.TrimSpace(text)))
Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_external_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type AddAgentExternalExporterCommand struct {
PushMetrics bool `help:"Enables push metrics model flow, it will be sent to the server by an agent"`
}

// RunCmd executes the AddAgentExternalExporterCommand and returns the result.
func (cmd *AddAgentExternalExporterCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_mongodb_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type AddAgentMongodbExporterCommand struct {
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
}

// RunCmd executes the AddAgentMongodbExporterCommand and returns the result.
func (cmd *AddAgentMongodbExporterCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_mysqld_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type AddAgentMysqldExporterCommand struct {
LogLevel string `enum:"debug,info,warn,error" default:"warn" help:"Service logging level. One of: [debug, info, warn, error]"`
}

// RunCmd executes the AddAgentMysqldExporterCommand and returns the result.
func (cmd *AddAgentMysqldExporterCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_node_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type AddAgentNodeExporterCommand struct {
LogLevel string `enum:"debug,info,warn,error" default:"warn" help:"Service logging level. One of: [debug, info, warn, error]"`
}

// RunCmd runs the command for AddAgentNodeExporterCommand.
func (cmd *AddAgentNodeExporterCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
params := &agents.AddAgentParams{
Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_pmm_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type AddPMMAgentCommand struct {
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
}

// RunCmd executes the AddPMMAgentCommand and returns the result.
func (cmd *AddPMMAgentCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
params := &agents.AddAgentParams{
Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_postgres_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type AddAgentPostgresExporterCommand struct {
AutoDiscoveryLimit int32 `default:"0" placeholder:"NUMBER" help:"Auto-discovery will be disabled if there are more than that number of databases (default: server-defined, -1: always disabled)"`
}

// RunCmd executes the AddAgentPostgresExporterCommand and returns the result.
func (cmd *AddAgentPostgresExporterCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
1 change: 1 addition & 0 deletions admin/commands/inventory/add_agent_proxysql_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type AddAgentProxysqlExporterCommand struct {
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
}

// RunCmd executes the AddAgentProxysqlExporterCommand and returns the result.
func (cmd *AddAgentProxysqlExporterCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
params := &agents.AddAgentParams{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type AddAgentQANMongoDBProfilerAgentCommand struct {
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
}

// RunCmd executes the AddAgentQANMongoDBProfilerAgentCommand and returns the result.
func (cmd *AddAgentQANMongoDBProfilerAgentCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type AddAgentQANMySQLPerfSchemaAgentCommand struct {
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
}

// RunCmd runs the command for AddAgentQANMySQLPerfSchemaAgentCommand.
func (cmd *AddAgentQANMySQLPerfSchemaAgentCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type AddAgentQANMySQLSlowlogAgentCommand struct {
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
}

// RunCmd executes the AddAgentQANMySQLSlowlogAgentCommand and returns the result.
func (cmd *AddAgentQANMySQLSlowlogAgentCommand) RunCmd() (commands.Result, error) {
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)

Expand Down
Loading
Loading