diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 077b1b6987..60d4920a33 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,6 @@ * @percona/pmm-review-be +/docs/ @percona/pmm-docs +/ui/ @percona/pmm-review-fe /agent/agents/postgres/ @JiriCtvrtka @percona/pmm-review-be /api/ @BupycHuk @percona/pmm-review-be /managed/services/checks/ @idoqo @percona/pmm-review-be diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index bd5ec32d58..6174390dc0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -9,26 +9,31 @@ on: - "docs/api/**" workflow_dispatch: - inputs: - version: - description: "API Version on readme.io" - required: true - default: "v1.0" # v0.0 stands for the dev version jobs: sync: name: Sync runs-on: ubuntu-22.04 + steps: - name: Check out code uses: actions/checkout@v4 - - name: API - uses: readmeio/rdme@v8 - with: - rdme: openapi ./api/swagger/swagger.json --id=626badcabbc59c02acc1a53f --key=${{ secrets.README_TOKEN }} + - name: Detect PMM version and API ID + run: | + # For reference: + # PMM 2: VERSION=v2, ID=626badcabbc59c02acc1a53f + # PMM 3: VERSION=v3, ID=622892a957a7410330bc6184 + export VERSION=$(cat api/swagger/swagger.json | jq -r '.info.version') + export ID=$(cat api/swagger/swagger.json | jq -r '."x-readme-id"') + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "ID=$ID" >> $GITHUB_ENV + + - name: Provision rdme + run: npm install -g rdme + + - name: Sync API spec + run: rdme openapi ./api/swagger/swagger.json --id=${{ env.ID }} --key=${{ secrets.README_TOKEN }} - - name: Markdown docs - uses: readmeio/rdme@v8 - with: - rdme: docs docs/api --version=${{ github.event.inputs.version || 'v1.0' }} --key=${{ secrets.README_TOKEN }} + - name: Sync Markdown docs + run: rdme docs docs/api --version=${{ env.VERSION }} --key=${{ secrets.README_TOKEN }} diff --git a/admin/commands/management/management.go b/admin/commands/management/management.go index 6d3921e9f5..e8e88e2f63 100644 --- a/admin/commands/management/management.go +++ b/admin/commands/management/management.go @@ -15,9 +15,7 @@ // Package management provides management commands. package management -import ( - "github.com/percona/pmm/api/inventory/v1/types" -) +import "github.com/percona/pmm/api/inventory/v1/types" var ( allNodeTypes = map[string]string{ diff --git a/agent/runner/runner_test.go b/agent/runner/runner_test.go index 28809b9130..57c42c7e94 100644 --- a/agent/runner/runner_test.go +++ b/agent/runner/runner_test.go @@ -156,36 +156,36 @@ func TestPerDBInstanceLimit(t *testing.T) { db2j2 := testJob{id: "test-5", timeout: time.Second, dsn: "postgresql://db2"} db2j3 := testJob{id: "test-6", timeout: time.Second, dsn: "postgresql://db2"} - require.NoError(t, cr.StartJob(db1j1)) - require.NoError(t, cr.StartJob(db2j1)) + require.NoError(t, cr.StartJob(db1j1), "start job db1j1 failed") + require.NoError(t, cr.StartJob(db2j1), "start job db2j1 failed") // Let jobs to start time.Sleep(200 * time.Millisecond) - require.NoError(t, cr.StartJob(db1j2)) - require.NoError(t, cr.StartJob(db2j2)) - require.NoError(t, cr.StartJob(db1j3)) - require.NoError(t, cr.StartJob(db2j3)) + require.NoError(t, cr.StartJob(db1j2), "start job db1j2 failed") + require.NoError(t, cr.StartJob(db2j2), "start job db2j2 failed") + require.NoError(t, cr.StartJob(db1j3), "start job db1j3 failed") + require.NoError(t, cr.StartJob(db2j3), "start job db2j3 failed") // Let rest jobs to reach semaphores time.Sleep(300 * time.Millisecond) - assert.True(t, cr.IsRunning(db1j1.ID())) - assert.True(t, cr.IsRunning(db2j1.ID())) - assert.False(t, cr.IsRunning(db1j2.ID())) - assert.False(t, cr.IsRunning(db2j2.ID())) - assert.False(t, cr.IsRunning(db1j3.ID())) - assert.False(t, cr.IsRunning(db2j3.ID())) + assert.True(t, cr.IsRunning(db1j1.ID()), "db1j1 is not running") + assert.True(t, cr.IsRunning(db2j1.ID()), "db2j1 is not running") + assert.False(t, cr.IsRunning(db1j2.ID()), "db1j2 is running") + assert.False(t, cr.IsRunning(db2j2.ID()), "db2j2 is running") + assert.False(t, cr.IsRunning(db1j3.ID()), "db1j3 is running") + assert.False(t, cr.IsRunning(db2j3.ID()), "db2j3 is running") // Over time all jobs are terminated - time.Sleep(2 * time.Second) - - assert.False(t, cr.IsRunning(db1j1.ID())) - assert.False(t, cr.IsRunning(db2j1.ID())) - assert.False(t, cr.IsRunning(db1j2.ID())) - assert.False(t, cr.IsRunning(db2j2.ID())) - assert.False(t, cr.IsRunning(db1j3.ID())) - assert.False(t, cr.IsRunning(db2j3.ID())) + time.Sleep(3 * time.Second) + + assert.False(t, cr.IsRunning(db1j1.ID()), "db1j1 is running") + assert.False(t, cr.IsRunning(db2j1.ID()), "db2j1 is running") + assert.False(t, cr.IsRunning(db1j2.ID()), "db1j2 is running") + assert.False(t, cr.IsRunning(db2j2.ID()), "db2j2 is running") + assert.False(t, cr.IsRunning(db1j3.ID()), "db1j3 is running") + assert.False(t, cr.IsRunning(db2j3.ID()), "db2j3 is running") } func TestDefaultPerDBInstanceLimit(t *testing.T) { diff --git a/api-tests/helpers.go b/api-tests/helpers.go index 45e8b52c14..8fdf93b077 100644 --- a/api-tests/helpers.go +++ b/api-tests/helpers.go @@ -56,10 +56,10 @@ func TestString(t TestingT, name string) string { t.Helper() // Without proper seed parallel tests can generate same "random" number. - n, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32)) + rnd, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32)) require.NoError(t, err) - return strings.ReplaceAll(fmt.Sprintf("pmm-api-tests-%s-%s-%s-%d", Hostname, t.Name(), name, n), "/", "-") + return strings.ReplaceAll(fmt.Sprintf("api-test-%s-%s-%d", t.Name(), name, rnd), "/", "-") } // AssertAPIErrorf check that actual API error equals expected. diff --git a/api-tests/management/annotation_test.go b/api-tests/management/annotation_test.go index 524d187152..8fa0f170ab 100644 --- a/api-tests/management/annotation_test.go +++ b/api-tests/management/annotation_test.go @@ -16,6 +16,8 @@ package management import ( + "fmt" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -55,7 +57,7 @@ func TestAddAnnotation(t *testing.T) { pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddAnnotationRequest.Text: value length must be at least 1 runes") }) - t.Run("Non-existing service", func(t *testing.T) { + t.Run("Non-existent service", func(t *testing.T) { params := &mservice.AddAnnotationParams{ Body: mservice.AddAnnotationBody{ Text: "Some text", @@ -67,7 +69,7 @@ func TestAddAnnotation(t *testing.T) { pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, `Service with name "no-service" not found.`) }) - t.Run("Non-existing node", func(t *testing.T) { + t.Run("Non-existent node", func(t *testing.T) { params := &mservice.AddAnnotationParams{ Body: mservice.AddAnnotationBody{ Text: "Some text", @@ -79,6 +81,33 @@ func TestAddAnnotation(t *testing.T) { pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, `Node with name "no-node" not found.`) }) + t.Run("Tag length exceeded", func(t *testing.T) { + nodeName := pmmapitests.TestString(t, strings.Repeat("long-annotation-node-name-", 10)) + paramsNode := &nodes.AddNodeParams{ + Body: nodes.AddNodeBody{ + Generic: &nodes.AddNodeParamsBodyGeneric{ + NodeName: nodeName, + Address: "10.0.0.1", + }, + }, + Context: pmmapitests.Context, + } + resNode, err := inventoryClient.Default.NodesService.AddNode(paramsNode) + assert.NoError(t, err) + genericNodeID := resNode.Payload.Generic.NodeID + defer pmmapitests.RemoveNodes(t, genericNodeID) + + params := &mservice.AddAnnotationParams{ + Body: mservice.AddAnnotationBody{ + Text: "Some text", + NodeName: nodeName, + }, + Context: pmmapitests.Context, + } + _, err = client.Default.ManagementService.AddAnnotation(params) + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, fmt.Sprintf("tag length cannot exceed 100 characters, tag: %s", nodeName)) + }) + t.Run("Existing service", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "annotation-node") paramsNode := &nodes.AddNodeParams{ @@ -95,7 +124,7 @@ func TestAddAnnotation(t *testing.T) { genericNodeID := resNode.Payload.Generic.NodeID defer pmmapitests.RemoveNodes(t, genericNodeID) - serviceName := pmmapitests.TestString(t, "annotation-service") + serviceName := "annotation-service" paramsService := &services.AddServiceParams{ Body: services.AddServiceBody{ Mysql: &services.AddServiceParamsBodyMysql{ @@ -126,7 +155,7 @@ func TestAddAnnotation(t *testing.T) { }) t.Run("Existing node", func(t *testing.T) { - nodeName := pmmapitests.TestString(t, "annotation-node") + nodeName := "annotation-node" params := &nodes.AddNodeParams{ Body: nodes.AddNodeBody{ Generic: &nodes.AddNodeParamsBodyGeneric{ diff --git a/api-tests/management/nodes_test.go b/api-tests/management/nodes_test.go index 3c1e732e23..19e610afbc 100644 --- a/api-tests/management/nodes_test.go +++ b/api-tests/management/nodes_test.go @@ -59,7 +59,7 @@ func TestNodeRegister(t *testing.T) { }) t.Run("Reregister with same node name (no re-register - should fail)", func(t *testing.T) { - nodeName := pmmapitests.TestString(t, "node-name-for-all-fields") + nodeName := pmmapitests.TestString(t, "node-all") nodeID, pmmAgentID := RegisterGenericNode(t, mservice.RegisterNodeBody{ NodeName: nodeName, NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), @@ -85,7 +85,7 @@ func TestNodeRegister(t *testing.T) { }) t.Run("Reregister with same node name (re-register)", func(t *testing.T) { - nodeName := pmmapitests.TestString(t, "node-name-for-all-fields") + nodeName := pmmapitests.TestString(t, "node-all") nodeID, pmmAgentID := RegisterGenericNode(t, mservice.RegisterNodeBody{ NodeName: nodeName, NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), @@ -116,7 +116,7 @@ func TestNodeRegister(t *testing.T) { }) t.Run("Reregister with different node name (no re-register - should fail)", func(t *testing.T) { - nodeName := pmmapitests.TestString(t, "node-name-for-all-fields") + nodeName := pmmapitests.TestString(t, "node-all") nodeID, pmmAgentID := RegisterGenericNode(t, mservice.RegisterNodeBody{ NodeName: nodeName, NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), @@ -142,7 +142,7 @@ func TestNodeRegister(t *testing.T) { }) t.Run("Reregister with different node name (re-register)", func(t *testing.T) { - nodeName := pmmapitests.TestString(t, "node-name-for-all-fields") + nodeName := pmmapitests.TestString(t, "node-all") nodeID, pmmAgentID := RegisterGenericNode(t, mservice.RegisterNodeBody{ NodeName: nodeName, NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), diff --git a/api-tests/server/auth_test.go b/api-tests/server/auth_test.go index 0430f11d1e..a51d60b3dd 100644 --- a/api-tests/server/auth_test.go +++ b/api-tests/server/auth_test.go @@ -24,7 +24,6 @@ import ( "net/http/httputil" "net/url" "strconv" - "strings" "testing" "time" @@ -98,96 +97,6 @@ func TestAuth(t *testing.T) { }) } -func TestSetup(t *testing.T) { - t.Parallel() - // make a BaseURL without authentication - baseURL, err := url.Parse(pmmapitests.BaseURL.String()) - require.NoError(t, err) - baseURL.User = nil - - // make client that does not follow redirects - client := &http.Client{ - CheckRedirect: func(req *http.Request, via []*http.Request) error { - return http.ErrUseLastResponse - }, - } - - t.Run("WebPage", func(t *testing.T) { - t.Parallel() - - uri := baseURL.ResolveReference(&url.URL{ - Path: "/setup", - }) - t.Logf("URI: %s", uri) - req, err := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil) - require.NoError(t, err) - req.Header.Set("X-Test-Must-Setup", "1") - - resp, b := doRequest(t, client, req) //nolint:bodyclose - - assert.Equal(t, 200, resp.StatusCode, "response:\n%s", b) - assert.True(t, strings.HasPrefix(string(b), ``), string(b)) - }) - - t.Run("Redirect", func(t *testing.T) { - t.Parallel() - paths := map[string]int{ - "graph": 303, - "graph/": 303, - "prometheus": 303, - "prometheus/": 303, - "swagger": 200, - "swagger/": 301, - - "v1/server/readyz": 200, - "v1/server/AWSInstance": 400, // It must accept a parameter - "v1/server/version": 401, // Grafana authentication required - } - for path, code := range paths { - path, code := path, code - t.Run(fmt.Sprintf("%s=%d", path, code), func(t *testing.T) { - t.Parallel() - - uri := baseURL.ResolveReference(&url.URL{ - Path: path, - }) - t.Logf("URI: %s", uri) - req, err := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil) - require.NoError(t, err) - req.Header.Set("X-Test-Must-Setup", "1") - - resp, b := doRequest(t, client, req) //nolint:bodyclose - - assert.Equal(t, code, resp.StatusCode, "response:\n%s", b) - if code == 303 { - assert.Equal(t, "/setup", resp.Header.Get("Location")) - } - }) - } - }) - - t.Run("API", func(t *testing.T) { - t.Parallel() - - q := make(url.Values) - q.Set("instance_id", "123") - uri := baseURL.ResolveReference(&url.URL{ - Path: "v1/server/AWSInstance", - RawQuery: q.Encode(), - }) - t.Logf("URI: %s", uri) - require.NoError(t, err) - req, err := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil) - require.NoError(t, err) - req.Header.Set("X-Test-Must-Setup", "1") - - resp, b := doRequest(t, client, req) //nolint:bodyclose - - assert.Equal(t, 200, resp.StatusCode, "response:\n%s", b) - assert.Equal(t, "{}", string(b), "response:\n%s", b) - }) -} - func TestSwagger(t *testing.T) { t.Parallel() for _, path := range []string{ diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go b/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go index d3f538c383..8f10784f9d 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go @@ -299,6 +299,7 @@ func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, ma // UnaryRPC :call AccessControlServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccessControlServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccessControlServiceServer) error { mux.Handle("POST", pattern_AccessControlService_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -474,21 +475,21 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime // RegisterAccessControlServiceHandlerFromEndpoint is same as RegisterAccessControlServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAccessControlServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -506,7 +507,7 @@ func RegisterAccessControlServiceHandler(ctx context.Context, mux *runtime.Serve // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccessControlServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccessControlServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AccessControlServiceClient" to call the correct interceptors. +// "AccessControlServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccessControlServiceClient) error { mux.Handle("POST", pattern_AccessControlService_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go index e435863930..d35749a17e 100644 --- a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: accesscontrol/v1beta1/accesscontrol.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AccessControlService_CreateRole_FullMethodName = "/accesscontrol.v1beta1.AccessControlService/CreateRole" @@ -32,6 +32,8 @@ const ( // AccessControlServiceClient is the client API for AccessControlService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service Role provides public methods for managing Roles. type AccessControlServiceClient interface { // CreateRole creates a new role. CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) @@ -58,8 +60,9 @@ func NewAccessControlServiceClient(cc grpc.ClientConnInterface) AccessControlSer } func (c *accessControlServiceClient) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRoleResponse) - err := c.cc.Invoke(ctx, AccessControlService_CreateRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_CreateRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -67,8 +70,9 @@ func (c *accessControlServiceClient) CreateRole(ctx context.Context, in *CreateR } func (c *accessControlServiceClient) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateRoleResponse) - err := c.cc.Invoke(ctx, AccessControlService_UpdateRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_UpdateRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +80,9 @@ func (c *accessControlServiceClient) UpdateRole(ctx context.Context, in *UpdateR } func (c *accessControlServiceClient) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*DeleteRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteRoleResponse) - err := c.cc.Invoke(ctx, AccessControlService_DeleteRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_DeleteRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -85,8 +90,9 @@ func (c *accessControlServiceClient) DeleteRole(ctx context.Context, in *DeleteR } func (c *accessControlServiceClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRoleResponse) - err := c.cc.Invoke(ctx, AccessControlService_GetRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_GetRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -94,8 +100,9 @@ func (c *accessControlServiceClient) GetRole(ctx context.Context, in *GetRoleReq } func (c *accessControlServiceClient) ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRolesResponse) - err := c.cc.Invoke(ctx, AccessControlService_ListRoles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_ListRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,8 +110,9 @@ func (c *accessControlServiceClient) ListRoles(ctx context.Context, in *ListRole } func (c *accessControlServiceClient) AssignRoles(ctx context.Context, in *AssignRolesRequest, opts ...grpc.CallOption) (*AssignRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AssignRolesResponse) - err := c.cc.Invoke(ctx, AccessControlService_AssignRoles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_AssignRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -112,8 +120,9 @@ func (c *accessControlServiceClient) AssignRoles(ctx context.Context, in *Assign } func (c *accessControlServiceClient) SetDefaultRole(ctx context.Context, in *SetDefaultRoleRequest, opts ...grpc.CallOption) (*SetDefaultRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetDefaultRoleResponse) - err := c.cc.Invoke(ctx, AccessControlService_SetDefaultRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AccessControlService_SetDefaultRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -122,7 +131,9 @@ func (c *accessControlServiceClient) SetDefaultRole(ctx context.Context, in *Set // AccessControlServiceServer is the server API for AccessControlService service. // All implementations must embed UnimplementedAccessControlServiceServer -// for forward compatibility +// for forward compatibility. +// +// Service Role provides public methods for managing Roles. type AccessControlServiceServer interface { // CreateRole creates a new role. CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) @@ -141,7 +152,11 @@ type AccessControlServiceServer interface { mustEmbedUnimplementedAccessControlServiceServer() } -// UnimplementedAccessControlServiceServer must be embedded to have forward compatible implementations. +// UnimplementedAccessControlServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedAccessControlServiceServer struct{} func (UnimplementedAccessControlServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) { @@ -172,6 +187,7 @@ func (UnimplementedAccessControlServiceServer) SetDefaultRole(context.Context, * return nil, status.Errorf(codes.Unimplemented, "method SetDefaultRole not implemented") } func (UnimplementedAccessControlServiceServer) mustEmbedUnimplementedAccessControlServiceServer() {} +func (UnimplementedAccessControlServiceServer) testEmbeddedByValue() {} // UnsafeAccessControlServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccessControlServiceServer will @@ -181,6 +197,13 @@ type UnsafeAccessControlServiceServer interface { } func RegisterAccessControlServiceServer(s grpc.ServiceRegistrar, srv AccessControlServiceServer) { + // If the following call pancis, it indicates UnimplementedAccessControlServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AccessControlService_ServiceDesc, srv) } diff --git a/api/actions/v1/actions.pb.gw.go b/api/actions/v1/actions.pb.gw.go index f4686126fe..c84fd58bf9 100644 --- a/api/actions/v1/actions.pb.gw.go +++ b/api/actions/v1/actions.pb.gw.go @@ -159,6 +159,7 @@ func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler // UnaryRPC :call ActionsServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterActionsServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ActionsServiceServer) error { mux.Handle("GET", pattern_ActionsService_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -262,21 +263,21 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterActionsServiceHandlerFromEndpoint is same as RegisterActionsServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterActionsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -294,7 +295,7 @@ func RegisterActionsServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ActionsServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ActionsServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ActionsServiceClient" to call the correct interceptors. +// "ActionsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ActionsServiceClient) error { mux.Handle("GET", pattern_ActionsService_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/actions/v1/actions_grpc.pb.go b/api/actions/v1/actions_grpc.pb.go index 2b3d0eee41..e540a425a3 100644 --- a/api/actions/v1/actions_grpc.pb.go +++ b/api/actions/v1/actions_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: actions/v1/actions.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ActionsService_GetAction_FullMethodName = "/actions.v1.ActionsService/GetAction" @@ -29,6 +29,8 @@ const ( // ActionsServiceClient is the client API for ActionsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Actions service provides public Management API methods for Actions. type ActionsServiceClient interface { // GetAction gets result of a given Action. GetAction(ctx context.Context, in *GetActionRequest, opts ...grpc.CallOption) (*GetActionResponse, error) @@ -49,8 +51,9 @@ func NewActionsServiceClient(cc grpc.ClientConnInterface) ActionsServiceClient { } func (c *actionsServiceClient) GetAction(ctx context.Context, in *GetActionRequest, opts ...grpc.CallOption) (*GetActionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetActionResponse) - err := c.cc.Invoke(ctx, ActionsService_GetAction_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ActionsService_GetAction_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -58,8 +61,9 @@ func (c *actionsServiceClient) GetAction(ctx context.Context, in *GetActionReque } func (c *actionsServiceClient) StartServiceAction(ctx context.Context, in *StartServiceActionRequest, opts ...grpc.CallOption) (*StartServiceActionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartServiceActionResponse) - err := c.cc.Invoke(ctx, ActionsService_StartServiceAction_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ActionsService_StartServiceAction_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -67,8 +71,9 @@ func (c *actionsServiceClient) StartServiceAction(ctx context.Context, in *Start } func (c *actionsServiceClient) StartPTSummaryAction(ctx context.Context, in *StartPTSummaryActionRequest, opts ...grpc.CallOption) (*StartPTSummaryActionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartPTSummaryActionResponse) - err := c.cc.Invoke(ctx, ActionsService_StartPTSummaryAction_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ActionsService_StartPTSummaryAction_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +81,9 @@ func (c *actionsServiceClient) StartPTSummaryAction(ctx context.Context, in *Sta } func (c *actionsServiceClient) CancelAction(ctx context.Context, in *CancelActionRequest, opts ...grpc.CallOption) (*CancelActionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CancelActionResponse) - err := c.cc.Invoke(ctx, ActionsService_CancelAction_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ActionsService_CancelAction_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -86,7 +92,9 @@ func (c *actionsServiceClient) CancelAction(ctx context.Context, in *CancelActio // ActionsServiceServer is the server API for ActionsService service. // All implementations must embed UnimplementedActionsServiceServer -// for forward compatibility +// for forward compatibility. +// +// Actions service provides public Management API methods for Actions. type ActionsServiceServer interface { // GetAction gets result of a given Action. GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) @@ -99,7 +107,11 @@ type ActionsServiceServer interface { mustEmbedUnimplementedActionsServiceServer() } -// UnimplementedActionsServiceServer must be embedded to have forward compatible implementations. +// UnimplementedActionsServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedActionsServiceServer struct{} func (UnimplementedActionsServiceServer) GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) { @@ -118,6 +130,7 @@ func (UnimplementedActionsServiceServer) CancelAction(context.Context, *CancelAc return nil, status.Errorf(codes.Unimplemented, "method CancelAction not implemented") } func (UnimplementedActionsServiceServer) mustEmbedUnimplementedActionsServiceServer() {} +func (UnimplementedActionsServiceServer) testEmbeddedByValue() {} // UnsafeActionsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ActionsServiceServer will @@ -127,6 +140,13 @@ type UnsafeActionsServiceServer interface { } func RegisterActionsServiceServer(s grpc.ServiceRegistrar, srv ActionsServiceServer) { + // If the following call pancis, it indicates UnimplementedActionsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ActionsService_ServiceDesc, srv) } diff --git a/api/advisors/v1/advisors.pb.gw.go b/api/advisors/v1/advisors.pb.gw.go index 307902b63f..bff3437706 100644 --- a/api/advisors/v1/advisors.pb.gw.go +++ b/api/advisors/v1/advisors.pb.gw.go @@ -165,6 +165,7 @@ func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, mar // UnaryRPC :call AdvisorServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAdvisorServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdvisorServiceServer) error { mux.Handle("GET", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -316,21 +317,21 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterAdvisorServiceHandlerFromEndpoint is same as RegisterAdvisorServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAdvisorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -348,7 +349,7 @@ func RegisterAdvisorServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdvisorServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdvisorServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AdvisorServiceClient" to call the correct interceptors. +// "AdvisorServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdvisorServiceClient) error { mux.Handle("GET", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/advisors/v1/advisors_grpc.pb.go b/api/advisors/v1/advisors_grpc.pb.go index b7dc69c453..ad91ee616f 100644 --- a/api/advisors/v1/advisors_grpc.pb.go +++ b/api/advisors/v1/advisors_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: advisors/v1/advisors.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AdvisorService_ListFailedServices_FullMethodName = "/advisors.v1.AdvisorService/ListFailedServices" @@ -31,6 +31,8 @@ const ( // AdvisorServiceClient is the client API for AdvisorService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// AdvisorService service provides public Management API methods for Advisor Service. type AdvisorServiceClient interface { // ListFailedServices returns a list of services with failed checks. ListFailedServices(ctx context.Context, in *ListFailedServicesRequest, opts ...grpc.CallOption) (*ListFailedServicesResponse, error) @@ -55,8 +57,9 @@ func NewAdvisorServiceClient(cc grpc.ClientConnInterface) AdvisorServiceClient { } func (c *advisorServiceClient) ListFailedServices(ctx context.Context, in *ListFailedServicesRequest, opts ...grpc.CallOption) (*ListFailedServicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListFailedServicesResponse) - err := c.cc.Invoke(ctx, AdvisorService_ListFailedServices_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_ListFailedServices_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +67,9 @@ func (c *advisorServiceClient) ListFailedServices(ctx context.Context, in *ListF } func (c *advisorServiceClient) GetFailedChecks(ctx context.Context, in *GetFailedChecksRequest, opts ...grpc.CallOption) (*GetFailedChecksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFailedChecksResponse) - err := c.cc.Invoke(ctx, AdvisorService_GetFailedChecks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_GetFailedChecks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -73,8 +77,9 @@ func (c *advisorServiceClient) GetFailedChecks(ctx context.Context, in *GetFaile } func (c *advisorServiceClient) StartAdvisorChecks(ctx context.Context, in *StartAdvisorChecksRequest, opts ...grpc.CallOption) (*StartAdvisorChecksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartAdvisorChecksResponse) - err := c.cc.Invoke(ctx, AdvisorService_StartAdvisorChecks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_StartAdvisorChecks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -82,8 +87,9 @@ func (c *advisorServiceClient) StartAdvisorChecks(ctx context.Context, in *Start } func (c *advisorServiceClient) ListAdvisorChecks(ctx context.Context, in *ListAdvisorChecksRequest, opts ...grpc.CallOption) (*ListAdvisorChecksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAdvisorChecksResponse) - err := c.cc.Invoke(ctx, AdvisorService_ListAdvisorChecks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_ListAdvisorChecks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -91,8 +97,9 @@ func (c *advisorServiceClient) ListAdvisorChecks(ctx context.Context, in *ListAd } func (c *advisorServiceClient) ListAdvisors(ctx context.Context, in *ListAdvisorsRequest, opts ...grpc.CallOption) (*ListAdvisorsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAdvisorsResponse) - err := c.cc.Invoke(ctx, AdvisorService_ListAdvisors_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_ListAdvisors_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -100,8 +107,9 @@ func (c *advisorServiceClient) ListAdvisors(ctx context.Context, in *ListAdvisor } func (c *advisorServiceClient) ChangeAdvisorChecks(ctx context.Context, in *ChangeAdvisorChecksRequest, opts ...grpc.CallOption) (*ChangeAdvisorChecksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangeAdvisorChecksResponse) - err := c.cc.Invoke(ctx, AdvisorService_ChangeAdvisorChecks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_ChangeAdvisorChecks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -110,7 +118,9 @@ func (c *advisorServiceClient) ChangeAdvisorChecks(ctx context.Context, in *Chan // AdvisorServiceServer is the server API for AdvisorService service. // All implementations must embed UnimplementedAdvisorServiceServer -// for forward compatibility +// for forward compatibility. +// +// AdvisorService service provides public Management API methods for Advisor Service. type AdvisorServiceServer interface { // ListFailedServices returns a list of services with failed checks. ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) @@ -127,7 +137,11 @@ type AdvisorServiceServer interface { mustEmbedUnimplementedAdvisorServiceServer() } -// UnimplementedAdvisorServiceServer must be embedded to have forward compatible implementations. +// UnimplementedAdvisorServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedAdvisorServiceServer struct{} func (UnimplementedAdvisorServiceServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { @@ -154,6 +168,7 @@ func (UnimplementedAdvisorServiceServer) ChangeAdvisorChecks(context.Context, *C return nil, status.Errorf(codes.Unimplemented, "method ChangeAdvisorChecks not implemented") } func (UnimplementedAdvisorServiceServer) mustEmbedUnimplementedAdvisorServiceServer() {} +func (UnimplementedAdvisorServiceServer) testEmbeddedByValue() {} // UnsafeAdvisorServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdvisorServiceServer will @@ -163,6 +178,13 @@ type UnsafeAdvisorServiceServer interface { } func RegisterAdvisorServiceServer(s grpc.ServiceRegistrar, srv AdvisorServiceServer) { + // If the following call pancis, it indicates UnimplementedAdvisorServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AdvisorService_ServiceDesc, srv) } diff --git a/api/agent/v1/agent_grpc.pb.go b/api/agent/v1/agent_grpc.pb.go index e158895928..7b0cdc51b8 100644 --- a/api/agent/v1/agent_grpc.pb.go +++ b/api/agent/v1/agent_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: agent/v1/agent.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AgentService_Connect_FullMethodName = "/agent.v1.AgentService/Connect" @@ -26,9 +26,11 @@ const ( // AgentServiceClient is the client API for AgentService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Agent service provides private methods for pmm-agent <-> pmm-managed interactions. type AgentServiceClient interface { // Connect establishes two-way communication channel between pmm-agent and pmm-managed. - Connect(ctx context.Context, opts ...grpc.CallOption) (AgentService_ConnectClient, error) + Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AgentMessage, ServerMessage], error) } type agentServiceClient struct { @@ -39,53 +41,42 @@ func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient { return &agentServiceClient{cc} } -func (c *agentServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (AgentService_ConnectClient, error) { - stream, err := c.cc.NewStream(ctx, &AgentService_ServiceDesc.Streams[0], AgentService_Connect_FullMethodName, opts...) +func (c *agentServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AgentMessage, ServerMessage], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &AgentService_ServiceDesc.Streams[0], AgentService_Connect_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &agentServiceConnectClient{stream} + x := &grpc.GenericClientStream[AgentMessage, ServerMessage]{ClientStream: stream} return x, nil } -type AgentService_ConnectClient interface { - Send(*AgentMessage) error - Recv() (*ServerMessage, error) - grpc.ClientStream -} - -type agentServiceConnectClient struct { - grpc.ClientStream -} - -func (x *agentServiceConnectClient) Send(m *AgentMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *agentServiceConnectClient) Recv() (*ServerMessage, error) { - m := new(ServerMessage) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type AgentService_ConnectClient = grpc.BidiStreamingClient[AgentMessage, ServerMessage] // AgentServiceServer is the server API for AgentService service. // All implementations must embed UnimplementedAgentServiceServer -// for forward compatibility +// for forward compatibility. +// +// Agent service provides private methods for pmm-agent <-> pmm-managed interactions. type AgentServiceServer interface { // Connect establishes two-way communication channel between pmm-agent and pmm-managed. - Connect(AgentService_ConnectServer) error + Connect(grpc.BidiStreamingServer[AgentMessage, ServerMessage]) error mustEmbedUnimplementedAgentServiceServer() } -// UnimplementedAgentServiceServer must be embedded to have forward compatible implementations. +// UnimplementedAgentServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedAgentServiceServer struct{} -func (UnimplementedAgentServiceServer) Connect(AgentService_ConnectServer) error { +func (UnimplementedAgentServiceServer) Connect(grpc.BidiStreamingServer[AgentMessage, ServerMessage]) error { return status.Errorf(codes.Unimplemented, "method Connect not implemented") } func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {} +func (UnimplementedAgentServiceServer) testEmbeddedByValue() {} // UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AgentServiceServer will @@ -95,34 +86,22 @@ type UnsafeAgentServiceServer interface { } func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) { + // If the following call pancis, it indicates UnimplementedAgentServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AgentService_ServiceDesc, srv) } func _AgentService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AgentServiceServer).Connect(&agentServiceConnectServer{stream}) -} - -type AgentService_ConnectServer interface { - Send(*ServerMessage) error - Recv() (*AgentMessage, error) - grpc.ServerStream -} - -type agentServiceConnectServer struct { - grpc.ServerStream + return srv.(AgentServiceServer).Connect(&grpc.GenericServerStream[AgentMessage, ServerMessage]{ServerStream: stream}) } -func (x *agentServiceConnectServer) Send(m *ServerMessage) error { - return x.ServerStream.SendMsg(m) -} - -func (x *agentServiceConnectServer) Recv() (*AgentMessage, error) { - m := new(AgentMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type AgentService_ConnectServer = grpc.BidiStreamingServer[AgentMessage, ServerMessage] // AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/api/agentlocal/v1/agentlocal.pb.gw.go b/api/agentlocal/v1/agentlocal.pb.gw.go index 239fa5cf35..f8795a8ff4 100644 --- a/api/agentlocal/v1/agentlocal.pb.gw.go +++ b/api/agentlocal/v1/agentlocal.pb.gw.go @@ -117,6 +117,7 @@ func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler run // UnaryRPC :call AgentLocalServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentLocalServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServiceServer) error { mux.Handle("POST", pattern_AgentLocalService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -196,21 +197,21 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se // RegisterAgentLocalServiceHandlerFromEndpoint is same as RegisterAgentLocalServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAgentLocalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -228,7 +229,7 @@ func RegisterAgentLocalServiceHandler(ctx context.Context, mux *runtime.ServeMux // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentLocalServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentLocalServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AgentLocalServiceClient" to call the correct interceptors. +// "AgentLocalServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalServiceClient) error { mux.Handle("POST", pattern_AgentLocalService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/agentlocal/v1/agentlocal_grpc.pb.go b/api/agentlocal/v1/agentlocal_grpc.pb.go index d1c259c0d4..caaffdd9ea 100644 --- a/api/agentlocal/v1/agentlocal_grpc.pb.go +++ b/api/agentlocal/v1/agentlocal_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: agentlocal/v1/agentlocal.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AgentLocalService_Status_FullMethodName = "/agentlocal.v1.AgentLocalService/Status" @@ -27,6 +27,8 @@ const ( // AgentLocalServiceClient is the client API for AgentLocalService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// AgentLocal service provides public methods for checking pmm-agent status locally. type AgentLocalServiceClient interface { // Status returns current pmm-agent status. Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) @@ -43,8 +45,9 @@ func NewAgentLocalServiceClient(cc grpc.ClientConnInterface) AgentLocalServiceCl } func (c *agentLocalServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) - err := c.cc.Invoke(ctx, AgentLocalService_Status_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentLocalService_Status_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -52,8 +55,9 @@ func (c *agentLocalServiceClient) Status(ctx context.Context, in *StatusRequest, } func (c *agentLocalServiceClient) Reload(ctx context.Context, in *ReloadRequest, opts ...grpc.CallOption) (*ReloadResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReloadResponse) - err := c.cc.Invoke(ctx, AgentLocalService_Reload_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentLocalService_Reload_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -62,7 +66,9 @@ func (c *agentLocalServiceClient) Reload(ctx context.Context, in *ReloadRequest, // AgentLocalServiceServer is the server API for AgentLocalService service. // All implementations must embed UnimplementedAgentLocalServiceServer -// for forward compatibility +// for forward compatibility. +// +// AgentLocal service provides public methods for checking pmm-agent status locally. type AgentLocalServiceServer interface { // Status returns current pmm-agent status. Status(context.Context, *StatusRequest) (*StatusResponse, error) @@ -71,7 +77,11 @@ type AgentLocalServiceServer interface { mustEmbedUnimplementedAgentLocalServiceServer() } -// UnimplementedAgentLocalServiceServer must be embedded to have forward compatible implementations. +// UnimplementedAgentLocalServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedAgentLocalServiceServer struct{} func (UnimplementedAgentLocalServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { @@ -82,6 +92,7 @@ func (UnimplementedAgentLocalServiceServer) Reload(context.Context, *ReloadReque return nil, status.Errorf(codes.Unimplemented, "method Reload not implemented") } func (UnimplementedAgentLocalServiceServer) mustEmbedUnimplementedAgentLocalServiceServer() {} +func (UnimplementedAgentLocalServiceServer) testEmbeddedByValue() {} // UnsafeAgentLocalServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AgentLocalServiceServer will @@ -91,6 +102,13 @@ type UnsafeAgentLocalServiceServer interface { } func RegisterAgentLocalServiceServer(s grpc.ServiceRegistrar, srv AgentLocalServiceServer) { + // If the following call pancis, it indicates UnimplementedAgentLocalServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AgentLocalService_ServiceDesc, srv) } diff --git a/api/alerting/v1/alerting.pb.gw.go b/api/alerting/v1/alerting.pb.gw.go index d903e2492a..8edb3ca048 100644 --- a/api/alerting/v1/alerting.pb.gw.go +++ b/api/alerting/v1/alerting.pb.gw.go @@ -225,6 +225,7 @@ func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler r // UnaryRPC :call AlertingServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAlertingServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertingServiceServer) error { mux.Handle("GET", pattern_AlertingService_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -352,21 +353,21 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterAlertingServiceHandlerFromEndpoint is same as RegisterAlertingServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAlertingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -384,7 +385,7 @@ func RegisterAlertingServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AlertingServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AlertingServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AlertingServiceClient" to call the correct interceptors. +// "AlertingServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertingServiceClient) error { mux.Handle("GET", pattern_AlertingService_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/alerting/v1/alerting_grpc.pb.go b/api/alerting/v1/alerting_grpc.pb.go index c97b3cb036..94c17b63db 100644 --- a/api/alerting/v1/alerting_grpc.pb.go +++ b/api/alerting/v1/alerting_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: alerting/v1/alerting.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AlertingService_ListTemplates_FullMethodName = "/alerting.v1.AlertingService/ListTemplates" @@ -30,6 +30,8 @@ const ( // AlertingServiceClient is the client API for AlertingService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Alerting service lets to manage alerting templates and create alerting rules from them. type AlertingServiceClient interface { // ListTemplates returns a list of all collected alert rule templates. ListTemplates(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) @@ -52,8 +54,9 @@ func NewAlertingServiceClient(cc grpc.ClientConnInterface) AlertingServiceClient } func (c *alertingServiceClient) ListTemplates(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTemplatesResponse) - err := c.cc.Invoke(ctx, AlertingService_ListTemplates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AlertingService_ListTemplates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +64,9 @@ func (c *alertingServiceClient) ListTemplates(ctx context.Context, in *ListTempl } func (c *alertingServiceClient) CreateTemplate(ctx context.Context, in *CreateTemplateRequest, opts ...grpc.CallOption) (*CreateTemplateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateTemplateResponse) - err := c.cc.Invoke(ctx, AlertingService_CreateTemplate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AlertingService_CreateTemplate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +74,9 @@ func (c *alertingServiceClient) CreateTemplate(ctx context.Context, in *CreateTe } func (c *alertingServiceClient) UpdateTemplate(ctx context.Context, in *UpdateTemplateRequest, opts ...grpc.CallOption) (*UpdateTemplateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateTemplateResponse) - err := c.cc.Invoke(ctx, AlertingService_UpdateTemplate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AlertingService_UpdateTemplate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +84,9 @@ func (c *alertingServiceClient) UpdateTemplate(ctx context.Context, in *UpdateTe } func (c *alertingServiceClient) DeleteTemplate(ctx context.Context, in *DeleteTemplateRequest, opts ...grpc.CallOption) (*DeleteTemplateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteTemplateResponse) - err := c.cc.Invoke(ctx, AlertingService_DeleteTemplate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AlertingService_DeleteTemplate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +94,9 @@ func (c *alertingServiceClient) DeleteTemplate(ctx context.Context, in *DeleteTe } func (c *alertingServiceClient) CreateRule(ctx context.Context, in *CreateRuleRequest, opts ...grpc.CallOption) (*CreateRuleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRuleResponse) - err := c.cc.Invoke(ctx, AlertingService_CreateRule_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AlertingService_CreateRule_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -98,7 +105,9 @@ func (c *alertingServiceClient) CreateRule(ctx context.Context, in *CreateRuleRe // AlertingServiceServer is the server API for AlertingService service. // All implementations must embed UnimplementedAlertingServiceServer -// for forward compatibility +// for forward compatibility. +// +// Alerting service lets to manage alerting templates and create alerting rules from them. type AlertingServiceServer interface { // ListTemplates returns a list of all collected alert rule templates. ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) @@ -113,7 +122,11 @@ type AlertingServiceServer interface { mustEmbedUnimplementedAlertingServiceServer() } -// UnimplementedAlertingServiceServer must be embedded to have forward compatible implementations. +// UnimplementedAlertingServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedAlertingServiceServer struct{} func (UnimplementedAlertingServiceServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { @@ -136,6 +149,7 @@ func (UnimplementedAlertingServiceServer) CreateRule(context.Context, *CreateRul return nil, status.Errorf(codes.Unimplemented, "method CreateRule not implemented") } func (UnimplementedAlertingServiceServer) mustEmbedUnimplementedAlertingServiceServer() {} +func (UnimplementedAlertingServiceServer) testEmbeddedByValue() {} // UnsafeAlertingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AlertingServiceServer will @@ -145,6 +159,13 @@ type UnsafeAlertingServiceServer interface { } func RegisterAlertingServiceServer(s grpc.ServiceRegistrar, srv AlertingServiceServer) { + // If the following call pancis, it indicates UnimplementedAlertingServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AlertingService_ServiceDesc, srv) } diff --git a/api/backup/v1/backup.pb.gw.go b/api/backup/v1/backup.pb.gw.go index fdcc2580bb..65d84b9c88 100644 --- a/api/backup/v1/backup.pb.gw.go +++ b/api/backup/v1/backup.pb.gw.go @@ -423,6 +423,7 @@ func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marsh // UnaryRPC :call BackupServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBackupServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BackupServiceServer) error { mux.Handle("POST", pattern_BackupService_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -670,21 +671,21 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterBackupServiceHandlerFromEndpoint is same as RegisterBackupServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterBackupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -702,7 +703,7 @@ func RegisterBackupServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BackupServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BackupServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "BackupServiceClient" to call the correct interceptors. +// "BackupServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BackupServiceClient) error { mux.Handle("POST", pattern_BackupService_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/backup/v1/backup_grpc.pb.go b/api/backup/v1/backup_grpc.pb.go index bc049bcfbf..42c2f58561 100644 --- a/api/backup/v1/backup_grpc.pb.go +++ b/api/backup/v1/backup_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: backup/v1/backup.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( BackupService_StartBackup_FullMethodName = "/backup.v1.BackupService/StartBackup" @@ -35,6 +35,8 @@ const ( // BackupServiceClient is the client API for BackupService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Backups service handles backup operations to DB. type BackupServiceClient interface { // StartBackup request backup specified service to location. StartBackup(ctx context.Context, in *StartBackupRequest, opts ...grpc.CallOption) (*StartBackupResponse, error) @@ -67,8 +69,9 @@ func NewBackupServiceClient(cc grpc.ClientConnInterface) BackupServiceClient { } func (c *backupServiceClient) StartBackup(ctx context.Context, in *StartBackupRequest, opts ...grpc.CallOption) (*StartBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartBackupResponse) - err := c.cc.Invoke(ctx, BackupService_StartBackup_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_StartBackup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +79,9 @@ func (c *backupServiceClient) StartBackup(ctx context.Context, in *StartBackupRe } func (c *backupServiceClient) ListArtifactCompatibleServices(ctx context.Context, in *ListArtifactCompatibleServicesRequest, opts ...grpc.CallOption) (*ListArtifactCompatibleServicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListArtifactCompatibleServicesResponse) - err := c.cc.Invoke(ctx, BackupService_ListArtifactCompatibleServices_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_ListArtifactCompatibleServices_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -85,8 +89,9 @@ func (c *backupServiceClient) ListArtifactCompatibleServices(ctx context.Context } func (c *backupServiceClient) ScheduleBackup(ctx context.Context, in *ScheduleBackupRequest, opts ...grpc.CallOption) (*ScheduleBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ScheduleBackupResponse) - err := c.cc.Invoke(ctx, BackupService_ScheduleBackup_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_ScheduleBackup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -94,8 +99,9 @@ func (c *backupServiceClient) ScheduleBackup(ctx context.Context, in *ScheduleBa } func (c *backupServiceClient) ListScheduledBackups(ctx context.Context, in *ListScheduledBackupsRequest, opts ...grpc.CallOption) (*ListScheduledBackupsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListScheduledBackupsResponse) - err := c.cc.Invoke(ctx, BackupService_ListScheduledBackups_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_ListScheduledBackups_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,8 +109,9 @@ func (c *backupServiceClient) ListScheduledBackups(ctx context.Context, in *List } func (c *backupServiceClient) ChangeScheduledBackup(ctx context.Context, in *ChangeScheduledBackupRequest, opts ...grpc.CallOption) (*ChangeScheduledBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangeScheduledBackupResponse) - err := c.cc.Invoke(ctx, BackupService_ChangeScheduledBackup_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_ChangeScheduledBackup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -112,8 +119,9 @@ func (c *backupServiceClient) ChangeScheduledBackup(ctx context.Context, in *Cha } func (c *backupServiceClient) RemoveScheduledBackup(ctx context.Context, in *RemoveScheduledBackupRequest, opts ...grpc.CallOption) (*RemoveScheduledBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveScheduledBackupResponse) - err := c.cc.Invoke(ctx, BackupService_RemoveScheduledBackup_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_RemoveScheduledBackup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -121,8 +129,9 @@ func (c *backupServiceClient) RemoveScheduledBackup(ctx context.Context, in *Rem } func (c *backupServiceClient) GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLogsResponse) - err := c.cc.Invoke(ctx, BackupService_GetLogs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_GetLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -130,8 +139,9 @@ func (c *backupServiceClient) GetLogs(ctx context.Context, in *GetLogsRequest, o } func (c *backupServiceClient) ListArtifacts(ctx context.Context, in *ListArtifactsRequest, opts ...grpc.CallOption) (*ListArtifactsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListArtifactsResponse) - err := c.cc.Invoke(ctx, BackupService_ListArtifacts_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_ListArtifacts_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -139,8 +149,9 @@ func (c *backupServiceClient) ListArtifacts(ctx context.Context, in *ListArtifac } func (c *backupServiceClient) DeleteArtifact(ctx context.Context, in *DeleteArtifactRequest, opts ...grpc.CallOption) (*DeleteArtifactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteArtifactResponse) - err := c.cc.Invoke(ctx, BackupService_DeleteArtifact_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_DeleteArtifact_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -148,8 +159,9 @@ func (c *backupServiceClient) DeleteArtifact(ctx context.Context, in *DeleteArti } func (c *backupServiceClient) ListPitrTimeranges(ctx context.Context, in *ListPitrTimerangesRequest, opts ...grpc.CallOption) (*ListPitrTimerangesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPitrTimerangesResponse) - err := c.cc.Invoke(ctx, BackupService_ListPitrTimeranges_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BackupService_ListPitrTimeranges_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -158,7 +170,9 @@ func (c *backupServiceClient) ListPitrTimeranges(ctx context.Context, in *ListPi // BackupServiceServer is the server API for BackupService service. // All implementations must embed UnimplementedBackupServiceServer -// for forward compatibility +// for forward compatibility. +// +// Backups service handles backup operations to DB. type BackupServiceServer interface { // StartBackup request backup specified service to location. StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) @@ -183,7 +197,11 @@ type BackupServiceServer interface { mustEmbedUnimplementedBackupServiceServer() } -// UnimplementedBackupServiceServer must be embedded to have forward compatible implementations. +// UnimplementedBackupServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedBackupServiceServer struct{} func (UnimplementedBackupServiceServer) StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) { @@ -226,6 +244,7 @@ func (UnimplementedBackupServiceServer) ListPitrTimeranges(context.Context, *Lis return nil, status.Errorf(codes.Unimplemented, "method ListPitrTimeranges not implemented") } func (UnimplementedBackupServiceServer) mustEmbedUnimplementedBackupServiceServer() {} +func (UnimplementedBackupServiceServer) testEmbeddedByValue() {} // UnsafeBackupServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BackupServiceServer will @@ -235,6 +254,13 @@ type UnsafeBackupServiceServer interface { } func RegisterBackupServiceServer(s grpc.ServiceRegistrar, srv BackupServiceServer) { + // If the following call pancis, it indicates UnimplementedBackupServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&BackupService_ServiceDesc, srv) } diff --git a/api/backup/v1/locations.pb.gw.go b/api/backup/v1/locations.pb.gw.go index 7cd6a0fc38..63fe8d8483 100644 --- a/api/backup/v1/locations.pb.gw.go +++ b/api/backup/v1/locations.pb.gw.go @@ -225,6 +225,7 @@ func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, ma // UnaryRPC :call LocationsServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLocationsServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocationsServiceServer) error { mux.Handle("GET", pattern_LocationsService_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -352,21 +353,21 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser // RegisterLocationsServiceHandlerFromEndpoint is same as RegisterLocationsServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterLocationsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -384,7 +385,7 @@ func RegisterLocationsServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LocationsServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LocationsServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "LocationsServiceClient" to call the correct interceptors. +// "LocationsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocationsServiceClient) error { mux.Handle("GET", pattern_LocationsService_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/backup/v1/locations_grpc.pb.go b/api/backup/v1/locations_grpc.pb.go index b124f6c4a7..748f7a20ad 100644 --- a/api/backup/v1/locations_grpc.pb.go +++ b/api/backup/v1/locations_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: backup/v1/locations.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( LocationsService_ListLocations_FullMethodName = "/backup.v1.LocationsService/ListLocations" @@ -30,6 +30,8 @@ const ( // LocationsServiceClient is the client API for LocationsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Locations service provides access to Backup Locations. type LocationsServiceClient interface { // ListLocations returns a list of all backup locations. ListLocations(ctx context.Context, in *ListLocationsRequest, opts ...grpc.CallOption) (*ListLocationsResponse, error) @@ -52,8 +54,9 @@ func NewLocationsServiceClient(cc grpc.ClientConnInterface) LocationsServiceClie } func (c *locationsServiceClient) ListLocations(ctx context.Context, in *ListLocationsRequest, opts ...grpc.CallOption) (*ListLocationsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListLocationsResponse) - err := c.cc.Invoke(ctx, LocationsService_ListLocations_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, LocationsService_ListLocations_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +64,9 @@ func (c *locationsServiceClient) ListLocations(ctx context.Context, in *ListLoca } func (c *locationsServiceClient) AddLocation(ctx context.Context, in *AddLocationRequest, opts ...grpc.CallOption) (*AddLocationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddLocationResponse) - err := c.cc.Invoke(ctx, LocationsService_AddLocation_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, LocationsService_AddLocation_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +74,9 @@ func (c *locationsServiceClient) AddLocation(ctx context.Context, in *AddLocatio } func (c *locationsServiceClient) ChangeLocation(ctx context.Context, in *ChangeLocationRequest, opts ...grpc.CallOption) (*ChangeLocationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangeLocationResponse) - err := c.cc.Invoke(ctx, LocationsService_ChangeLocation_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, LocationsService_ChangeLocation_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +84,9 @@ func (c *locationsServiceClient) ChangeLocation(ctx context.Context, in *ChangeL } func (c *locationsServiceClient) RemoveLocation(ctx context.Context, in *RemoveLocationRequest, opts ...grpc.CallOption) (*RemoveLocationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveLocationResponse) - err := c.cc.Invoke(ctx, LocationsService_RemoveLocation_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, LocationsService_RemoveLocation_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +94,9 @@ func (c *locationsServiceClient) RemoveLocation(ctx context.Context, in *RemoveL } func (c *locationsServiceClient) TestLocationConfig(ctx context.Context, in *TestLocationConfigRequest, opts ...grpc.CallOption) (*TestLocationConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TestLocationConfigResponse) - err := c.cc.Invoke(ctx, LocationsService_TestLocationConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, LocationsService_TestLocationConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -98,7 +105,9 @@ func (c *locationsServiceClient) TestLocationConfig(ctx context.Context, in *Tes // LocationsServiceServer is the server API for LocationsService service. // All implementations must embed UnimplementedLocationsServiceServer -// for forward compatibility +// for forward compatibility. +// +// Locations service provides access to Backup Locations. type LocationsServiceServer interface { // ListLocations returns a list of all backup locations. ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) @@ -113,7 +122,11 @@ type LocationsServiceServer interface { mustEmbedUnimplementedLocationsServiceServer() } -// UnimplementedLocationsServiceServer must be embedded to have forward compatible implementations. +// UnimplementedLocationsServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedLocationsServiceServer struct{} func (UnimplementedLocationsServiceServer) ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) { @@ -136,6 +149,7 @@ func (UnimplementedLocationsServiceServer) TestLocationConfig(context.Context, * return nil, status.Errorf(codes.Unimplemented, "method TestLocationConfig not implemented") } func (UnimplementedLocationsServiceServer) mustEmbedUnimplementedLocationsServiceServer() {} +func (UnimplementedLocationsServiceServer) testEmbeddedByValue() {} // UnsafeLocationsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LocationsServiceServer will @@ -145,6 +159,13 @@ type UnsafeLocationsServiceServer interface { } func RegisterLocationsServiceServer(s grpc.ServiceRegistrar, srv LocationsServiceServer) { + // If the following call pancis, it indicates UnimplementedLocationsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&LocationsService_ServiceDesc, srv) } diff --git a/api/backup/v1/restores.pb.gw.go b/api/backup/v1/restores.pb.gw.go index 7a00f0acbc..a23df5f9d3 100644 --- a/api/backup/v1/restores.pb.gw.go +++ b/api/backup/v1/restores.pb.gw.go @@ -143,6 +143,7 @@ func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler // UnaryRPC :call RestoreServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRestoreServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestoreServiceServer) error { mux.Handle("GET", pattern_RestoreService_ListRestores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -222,21 +223,21 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterRestoreServiceHandlerFromEndpoint is same as RegisterRestoreServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRestoreServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -254,7 +255,7 @@ func RegisterRestoreServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RestoreServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RestoreServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RestoreServiceClient" to call the correct interceptors. +// "RestoreServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestoreServiceClient) error { mux.Handle("GET", pattern_RestoreService_ListRestores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/backup/v1/restores_grpc.pb.go b/api/backup/v1/restores_grpc.pb.go index 8a6139fae9..e1371c479f 100644 --- a/api/backup/v1/restores_grpc.pb.go +++ b/api/backup/v1/restores_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: backup/v1/restores.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( RestoreService_ListRestores_FullMethodName = "/backup.v1.RestoreService/ListRestores" @@ -28,6 +28,8 @@ const ( // RestoreServiceClient is the client API for RestoreService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// RestoreService provides public methods for managing backup restore history. type RestoreServiceClient interface { // ListRestores returns a list of all backup restore history items. ListRestores(ctx context.Context, in *ListRestoresRequest, opts ...grpc.CallOption) (*ListRestoresResponse, error) @@ -46,8 +48,9 @@ func NewRestoreServiceClient(cc grpc.ClientConnInterface) RestoreServiceClient { } func (c *restoreServiceClient) ListRestores(ctx context.Context, in *ListRestoresRequest, opts ...grpc.CallOption) (*ListRestoresResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRestoresResponse) - err := c.cc.Invoke(ctx, RestoreService_ListRestores_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RestoreService_ListRestores_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,8 +58,9 @@ func (c *restoreServiceClient) ListRestores(ctx context.Context, in *ListRestore } func (c *restoreServiceClient) GetLogs(ctx context.Context, in *RestoreServiceGetLogsRequest, opts ...grpc.CallOption) (*RestoreServiceGetLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RestoreServiceGetLogsResponse) - err := c.cc.Invoke(ctx, RestoreService_GetLogs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RestoreService_GetLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +68,9 @@ func (c *restoreServiceClient) GetLogs(ctx context.Context, in *RestoreServiceGe } func (c *restoreServiceClient) RestoreBackup(ctx context.Context, in *RestoreBackupRequest, opts ...grpc.CallOption) (*RestoreBackupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RestoreBackupResponse) - err := c.cc.Invoke(ctx, RestoreService_RestoreBackup_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RestoreService_RestoreBackup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -74,7 +79,9 @@ func (c *restoreServiceClient) RestoreBackup(ctx context.Context, in *RestoreBac // RestoreServiceServer is the server API for RestoreService service. // All implementations must embed UnimplementedRestoreServiceServer -// for forward compatibility +// for forward compatibility. +// +// RestoreService provides public methods for managing backup restore history. type RestoreServiceServer interface { // ListRestores returns a list of all backup restore history items. ListRestores(context.Context, *ListRestoresRequest) (*ListRestoresResponse, error) @@ -85,7 +92,11 @@ type RestoreServiceServer interface { mustEmbedUnimplementedRestoreServiceServer() } -// UnimplementedRestoreServiceServer must be embedded to have forward compatible implementations. +// UnimplementedRestoreServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedRestoreServiceServer struct{} func (UnimplementedRestoreServiceServer) ListRestores(context.Context, *ListRestoresRequest) (*ListRestoresResponse, error) { @@ -100,6 +111,7 @@ func (UnimplementedRestoreServiceServer) RestoreBackup(context.Context, *Restore return nil, status.Errorf(codes.Unimplemented, "method RestoreBackup not implemented") } func (UnimplementedRestoreServiceServer) mustEmbedUnimplementedRestoreServiceServer() {} +func (UnimplementedRestoreServiceServer) testEmbeddedByValue() {} // UnsafeRestoreServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RestoreServiceServer will @@ -109,6 +121,13 @@ type UnsafeRestoreServiceServer interface { } func RegisterRestoreServiceServer(s grpc.ServiceRegistrar, srv RestoreServiceServer) { + // If the following call pancis, it indicates UnimplementedRestoreServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&RestoreService_ServiceDesc, srv) } diff --git a/api/dump/v1beta1/dump.pb.gw.go b/api/dump/v1beta1/dump.pb.gw.go index a66d983ec8..3ffa7d594e 100644 --- a/api/dump/v1beta1/dump.pb.gw.go +++ b/api/dump/v1beta1/dump.pb.gw.go @@ -191,6 +191,7 @@ func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runti // UnaryRPC :call DumpServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDumpServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DumpServiceServer) error { mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -318,21 +319,21 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterDumpServiceHandlerFromEndpoint is same as RegisterDumpServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterDumpServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -350,7 +351,7 @@ func RegisterDumpServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DumpServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DumpServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DumpServiceClient" to call the correct interceptors. +// "DumpServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DumpServiceClient) error { mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/dump/v1beta1/dump.proto b/api/dump/v1beta1/dump.proto index 952ab4c80c..02ec519bb5 100644 --- a/api/dump/v1beta1/dump.proto +++ b/api/dump/v1beta1/dump.proto @@ -43,7 +43,7 @@ message ListDumpsResponse { message DeleteDumpRequest { repeated string dump_ids = 1 [(validate.rules).repeated = { - min_items: 1, + min_items: 1 unique: true }]; } @@ -76,7 +76,7 @@ message SFTPParameters { message UploadDumpRequest { repeated string dump_ids = 1 [(validate.rules).repeated = { - min_items: 1, + min_items: 1 unique: true }]; diff --git a/api/dump/v1beta1/dump_grpc.pb.go b/api/dump/v1beta1/dump_grpc.pb.go index 1c71adef53..5b859aafc6 100644 --- a/api/dump/v1beta1/dump_grpc.pb.go +++ b/api/dump/v1beta1/dump_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: dump/v1beta1/dump.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( DumpService_StartDump_FullMethodName = "/dump.v1beta1.DumpService/StartDump" @@ -52,8 +52,9 @@ func NewDumpServiceClient(cc grpc.ClientConnInterface) DumpServiceClient { } func (c *dumpServiceClient) StartDump(ctx context.Context, in *StartDumpRequest, opts ...grpc.CallOption) (*StartDumpResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartDumpResponse) - err := c.cc.Invoke(ctx, DumpService_StartDump_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_StartDump_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +62,9 @@ func (c *dumpServiceClient) StartDump(ctx context.Context, in *StartDumpRequest, } func (c *dumpServiceClient) ListDumps(ctx context.Context, in *ListDumpsRequest, opts ...grpc.CallOption) (*ListDumpsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListDumpsResponse) - err := c.cc.Invoke(ctx, DumpService_ListDumps_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_ListDumps_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +72,9 @@ func (c *dumpServiceClient) ListDumps(ctx context.Context, in *ListDumpsRequest, } func (c *dumpServiceClient) DeleteDump(ctx context.Context, in *DeleteDumpRequest, opts ...grpc.CallOption) (*DeleteDumpResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteDumpResponse) - err := c.cc.Invoke(ctx, DumpService_DeleteDump_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_DeleteDump_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +82,9 @@ func (c *dumpServiceClient) DeleteDump(ctx context.Context, in *DeleteDumpReques } func (c *dumpServiceClient) GetDumpLogs(ctx context.Context, in *GetDumpLogsRequest, opts ...grpc.CallOption) (*GetDumpLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetDumpLogsResponse) - err := c.cc.Invoke(ctx, DumpService_GetDumpLogs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_GetDumpLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +92,9 @@ func (c *dumpServiceClient) GetDumpLogs(ctx context.Context, in *GetDumpLogsRequ } func (c *dumpServiceClient) UploadDump(ctx context.Context, in *UploadDumpRequest, opts ...grpc.CallOption) (*UploadDumpResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UploadDumpResponse) - err := c.cc.Invoke(ctx, DumpService_UploadDump_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_UploadDump_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -98,7 +103,7 @@ func (c *dumpServiceClient) UploadDump(ctx context.Context, in *UploadDumpReques // DumpServiceServer is the server API for DumpService service. // All implementations must embed UnimplementedDumpServiceServer -// for forward compatibility +// for forward compatibility. type DumpServiceServer interface { // StartDump request creates pmm dump. StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) @@ -113,7 +118,11 @@ type DumpServiceServer interface { mustEmbedUnimplementedDumpServiceServer() } -// UnimplementedDumpServiceServer must be embedded to have forward compatible implementations. +// UnimplementedDumpServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedDumpServiceServer struct{} func (UnimplementedDumpServiceServer) StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) { @@ -136,6 +145,7 @@ func (UnimplementedDumpServiceServer) UploadDump(context.Context, *UploadDumpReq return nil, status.Errorf(codes.Unimplemented, "method UploadDump not implemented") } func (UnimplementedDumpServiceServer) mustEmbedUnimplementedDumpServiceServer() {} +func (UnimplementedDumpServiceServer) testEmbeddedByValue() {} // UnsafeDumpServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DumpServiceServer will @@ -145,6 +155,13 @@ type UnsafeDumpServiceServer interface { } func RegisterDumpServiceServer(s grpc.ServiceRegistrar, srv DumpServiceServer) { + // If the following call pancis, it indicates UnimplementedDumpServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&DumpService_ServiceDesc, srv) } diff --git a/api/inventory/v1/agents.pb.gw.go b/api/inventory/v1/agents.pb.gw.go index 82ee5af49e..ea823e5f0f 100644 --- a/api/inventory/v1/agents.pb.gw.go +++ b/api/inventory/v1/agents.pb.gw.go @@ -333,6 +333,7 @@ func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler ru // UnaryRPC :call AgentsServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentsServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentsServiceServer) error { mux.Handle("GET", pattern_AgentsService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -484,21 +485,21 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterAgentsServiceHandlerFromEndpoint is same as RegisterAgentsServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAgentsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -516,7 +517,7 @@ func RegisterAgentsServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentsServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentsServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AgentsServiceClient" to call the correct interceptors. +// "AgentsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentsServiceClient) error { mux.Handle("GET", pattern_AgentsService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/inventory/v1/agents.proto b/api/inventory/v1/agents.proto index c99b289e52..6205e1ebeb 100644 --- a/api/inventory/v1/agents.proto +++ b/api/inventory/v1/agents.proto @@ -1295,7 +1295,7 @@ message AddExternalExporterParams { string metrics_path = 7; // Listen port for scraping metrics. uint32 listen_port = 8 [(validate.rules).uint32 = { - gt: 0, + gt: 0 lt: 65536 }]; // Custom user-assigned labels. diff --git a/api/inventory/v1/agents_grpc.pb.go b/api/inventory/v1/agents_grpc.pb.go index 9304812029..5b26504a01 100644 --- a/api/inventory/v1/agents_grpc.pb.go +++ b/api/inventory/v1/agents_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: inventory/v1/agents.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AgentsService_ListAgents_FullMethodName = "/inventory.v1.AgentsService/ListAgents" @@ -31,6 +31,8 @@ const ( // AgentsServiceClient is the client API for AgentsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Agents service provides public methods for managing Agents. type AgentsServiceClient interface { // ListAgents returns a list of all Agents. ListAgents(ctx context.Context, in *ListAgentsRequest, opts ...grpc.CallOption) (*ListAgentsResponse, error) @@ -55,8 +57,9 @@ func NewAgentsServiceClient(cc grpc.ClientConnInterface) AgentsServiceClient { } func (c *agentsServiceClient) ListAgents(ctx context.Context, in *ListAgentsRequest, opts ...grpc.CallOption) (*ListAgentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAgentsResponse) - err := c.cc.Invoke(ctx, AgentsService_ListAgents_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentsService_ListAgents_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +67,9 @@ func (c *agentsServiceClient) ListAgents(ctx context.Context, in *ListAgentsRequ } func (c *agentsServiceClient) GetAgent(ctx context.Context, in *GetAgentRequest, opts ...grpc.CallOption) (*GetAgentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAgentResponse) - err := c.cc.Invoke(ctx, AgentsService_GetAgent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentsService_GetAgent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -73,8 +77,9 @@ func (c *agentsServiceClient) GetAgent(ctx context.Context, in *GetAgentRequest, } func (c *agentsServiceClient) GetAgentLogs(ctx context.Context, in *GetAgentLogsRequest, opts ...grpc.CallOption) (*GetAgentLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAgentLogsResponse) - err := c.cc.Invoke(ctx, AgentsService_GetAgentLogs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentsService_GetAgentLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -82,8 +87,9 @@ func (c *agentsServiceClient) GetAgentLogs(ctx context.Context, in *GetAgentLogs } func (c *agentsServiceClient) AddAgent(ctx context.Context, in *AddAgentRequest, opts ...grpc.CallOption) (*AddAgentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddAgentResponse) - err := c.cc.Invoke(ctx, AgentsService_AddAgent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentsService_AddAgent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -91,8 +97,9 @@ func (c *agentsServiceClient) AddAgent(ctx context.Context, in *AddAgentRequest, } func (c *agentsServiceClient) ChangeAgent(ctx context.Context, in *ChangeAgentRequest, opts ...grpc.CallOption) (*ChangeAgentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangeAgentResponse) - err := c.cc.Invoke(ctx, AgentsService_ChangeAgent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentsService_ChangeAgent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -100,8 +107,9 @@ func (c *agentsServiceClient) ChangeAgent(ctx context.Context, in *ChangeAgentRe } func (c *agentsServiceClient) RemoveAgent(ctx context.Context, in *RemoveAgentRequest, opts ...grpc.CallOption) (*RemoveAgentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveAgentResponse) - err := c.cc.Invoke(ctx, AgentsService_RemoveAgent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AgentsService_RemoveAgent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -110,7 +118,9 @@ func (c *agentsServiceClient) RemoveAgent(ctx context.Context, in *RemoveAgentRe // AgentsServiceServer is the server API for AgentsService service. // All implementations must embed UnimplementedAgentsServiceServer -// for forward compatibility +// for forward compatibility. +// +// Agents service provides public methods for managing Agents. type AgentsServiceServer interface { // ListAgents returns a list of all Agents. ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) @@ -127,7 +137,11 @@ type AgentsServiceServer interface { mustEmbedUnimplementedAgentsServiceServer() } -// UnimplementedAgentsServiceServer must be embedded to have forward compatible implementations. +// UnimplementedAgentsServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedAgentsServiceServer struct{} func (UnimplementedAgentsServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { @@ -154,6 +168,7 @@ func (UnimplementedAgentsServiceServer) RemoveAgent(context.Context, *RemoveAgen return nil, status.Errorf(codes.Unimplemented, "method RemoveAgent not implemented") } func (UnimplementedAgentsServiceServer) mustEmbedUnimplementedAgentsServiceServer() {} +func (UnimplementedAgentsServiceServer) testEmbeddedByValue() {} // UnsafeAgentsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AgentsServiceServer will @@ -163,6 +178,13 @@ type UnsafeAgentsServiceServer interface { } func RegisterAgentsServiceServer(s grpc.ServiceRegistrar, srv AgentsServiceServer) { + // If the following call pancis, it indicates UnimplementedAgentsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AgentsService_ServiceDesc, srv) } diff --git a/api/inventory/v1/nodes.pb.gw.go b/api/inventory/v1/nodes.pb.gw.go index 2c7ec866a9..b6ee5b6c38 100644 --- a/api/inventory/v1/nodes.pb.gw.go +++ b/api/inventory/v1/nodes.pb.gw.go @@ -209,6 +209,7 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt // UnaryRPC :call NodesServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNodesServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodesServiceServer) error { mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -312,21 +313,21 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterNodesServiceHandlerFromEndpoint is same as RegisterNodesServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterNodesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -344,7 +345,7 @@ func RegisterNodesServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NodesServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NodesServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "NodesServiceClient" to call the correct interceptors. +// "NodesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodesServiceClient) error { mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/inventory/v1/nodes_grpc.pb.go b/api/inventory/v1/nodes_grpc.pb.go index d594a294b8..86f5ff2104 100644 --- a/api/inventory/v1/nodes_grpc.pb.go +++ b/api/inventory/v1/nodes_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: inventory/v1/nodes.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( NodesService_ListNodes_FullMethodName = "/inventory.v1.NodesService/ListNodes" @@ -29,6 +29,8 @@ const ( // NodesServiceClient is the client API for NodesService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Nodes service provides public methods for managing Nodes. type NodesServiceClient interface { // ListNodes returns a list of all Nodes. ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) @@ -49,8 +51,9 @@ func NewNodesServiceClient(cc grpc.ClientConnInterface) NodesServiceClient { } func (c *nodesServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListNodesResponse) - err := c.cc.Invoke(ctx, NodesService_ListNodes_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, NodesService_ListNodes_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -58,8 +61,9 @@ func (c *nodesServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest } func (c *nodesServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetNodeResponse) - err := c.cc.Invoke(ctx, NodesService_GetNode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, NodesService_GetNode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -67,8 +71,9 @@ func (c *nodesServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, op } func (c *nodesServiceClient) AddNode(ctx context.Context, in *AddNodeRequest, opts ...grpc.CallOption) (*AddNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddNodeResponse) - err := c.cc.Invoke(ctx, NodesService_AddNode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, NodesService_AddNode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +81,9 @@ func (c *nodesServiceClient) AddNode(ctx context.Context, in *AddNodeRequest, op } func (c *nodesServiceClient) RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveNodeResponse) - err := c.cc.Invoke(ctx, NodesService_RemoveNode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, NodesService_RemoveNode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -86,7 +92,9 @@ func (c *nodesServiceClient) RemoveNode(ctx context.Context, in *RemoveNodeReque // NodesServiceServer is the server API for NodesService service. // All implementations must embed UnimplementedNodesServiceServer -// for forward compatibility +// for forward compatibility. +// +// Nodes service provides public methods for managing Nodes. type NodesServiceServer interface { // ListNodes returns a list of all Nodes. ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) @@ -99,7 +107,11 @@ type NodesServiceServer interface { mustEmbedUnimplementedNodesServiceServer() } -// UnimplementedNodesServiceServer must be embedded to have forward compatible implementations. +// UnimplementedNodesServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedNodesServiceServer struct{} func (UnimplementedNodesServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { @@ -118,6 +130,7 @@ func (UnimplementedNodesServiceServer) RemoveNode(context.Context, *RemoveNodeRe return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented") } func (UnimplementedNodesServiceServer) mustEmbedUnimplementedNodesServiceServer() {} +func (UnimplementedNodesServiceServer) testEmbeddedByValue() {} // UnsafeNodesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NodesServiceServer will @@ -127,6 +140,13 @@ type UnsafeNodesServiceServer interface { } func RegisterNodesServiceServer(s grpc.ServiceRegistrar, srv NodesServiceServer) { + // If the following call pancis, it indicates UnimplementedNodesServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&NodesService_ServiceDesc, srv) } diff --git a/api/inventory/v1/services.pb.gw.go b/api/inventory/v1/services.pb.gw.go index d875ba461b..77a826da39 100644 --- a/api/inventory/v1/services.pb.gw.go +++ b/api/inventory/v1/services.pb.gw.go @@ -291,6 +291,7 @@ func local_request_ServicesService_ChangeService_0(ctx context.Context, marshale // UnaryRPC :call ServicesServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServicesServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServicesServiceServer) error { mux.Handle("GET", pattern_ServicesService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -442,21 +443,21 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterServicesServiceHandlerFromEndpoint is same as RegisterServicesServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterServicesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -474,7 +475,7 @@ func RegisterServicesServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServicesServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServicesServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ServicesServiceClient" to call the correct interceptors. +// "ServicesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServicesServiceClient) error { mux.Handle("GET", pattern_ServicesService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/inventory/v1/services_grpc.pb.go b/api/inventory/v1/services_grpc.pb.go index 26c5d244ad..55a382a871 100644 --- a/api/inventory/v1/services_grpc.pb.go +++ b/api/inventory/v1/services_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: inventory/v1/services.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ServicesService_ListServices_FullMethodName = "/inventory.v1.ServicesService/ListServices" @@ -31,6 +31,8 @@ const ( // ServicesServiceClient is the client API for ServicesService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Services service provides public methods for managing Services. type ServicesServiceClient interface { // ListServices returns a list of Services filtered by type. ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) @@ -55,8 +57,9 @@ func NewServicesServiceClient(cc grpc.ClientConnInterface) ServicesServiceClient } func (c *servicesServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListServicesResponse) - err := c.cc.Invoke(ctx, ServicesService_ListServices_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServicesService_ListServices_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +67,9 @@ func (c *servicesServiceClient) ListServices(ctx context.Context, in *ListServic } func (c *servicesServiceClient) ListActiveServiceTypes(ctx context.Context, in *ListActiveServiceTypesRequest, opts ...grpc.CallOption) (*ListActiveServiceTypesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListActiveServiceTypesResponse) - err := c.cc.Invoke(ctx, ServicesService_ListActiveServiceTypes_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServicesService_ListActiveServiceTypes_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -73,8 +77,9 @@ func (c *servicesServiceClient) ListActiveServiceTypes(ctx context.Context, in * } func (c *servicesServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetServiceResponse) - err := c.cc.Invoke(ctx, ServicesService_GetService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServicesService_GetService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -82,8 +87,9 @@ func (c *servicesServiceClient) GetService(ctx context.Context, in *GetServiceRe } func (c *servicesServiceClient) AddService(ctx context.Context, in *AddServiceRequest, opts ...grpc.CallOption) (*AddServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddServiceResponse) - err := c.cc.Invoke(ctx, ServicesService_AddService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServicesService_AddService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -91,8 +97,9 @@ func (c *servicesServiceClient) AddService(ctx context.Context, in *AddServiceRe } func (c *servicesServiceClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveServiceResponse) - err := c.cc.Invoke(ctx, ServicesService_RemoveService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServicesService_RemoveService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -100,8 +107,9 @@ func (c *servicesServiceClient) RemoveService(ctx context.Context, in *RemoveSer } func (c *servicesServiceClient) ChangeService(ctx context.Context, in *ChangeServiceRequest, opts ...grpc.CallOption) (*ChangeServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangeServiceResponse) - err := c.cc.Invoke(ctx, ServicesService_ChangeService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServicesService_ChangeService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -110,7 +118,9 @@ func (c *servicesServiceClient) ChangeService(ctx context.Context, in *ChangeSer // ServicesServiceServer is the server API for ServicesService service. // All implementations must embed UnimplementedServicesServiceServer -// for forward compatibility +// for forward compatibility. +// +// Services service provides public methods for managing Services. type ServicesServiceServer interface { // ListServices returns a list of Services filtered by type. ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) @@ -127,7 +137,11 @@ type ServicesServiceServer interface { mustEmbedUnimplementedServicesServiceServer() } -// UnimplementedServicesServiceServer must be embedded to have forward compatible implementations. +// UnimplementedServicesServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedServicesServiceServer struct{} func (UnimplementedServicesServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { @@ -154,6 +168,7 @@ func (UnimplementedServicesServiceServer) ChangeService(context.Context, *Change return nil, status.Errorf(codes.Unimplemented, "method ChangeService not implemented") } func (UnimplementedServicesServiceServer) mustEmbedUnimplementedServicesServiceServer() {} +func (UnimplementedServicesServiceServer) testEmbeddedByValue() {} // UnsafeServicesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ServicesServiceServer will @@ -163,6 +178,13 @@ type UnsafeServicesServiceServer interface { } func RegisterServicesServiceServer(s grpc.ServiceRegistrar, srv ServicesServiceServer) { + // If the following call pancis, it indicates UnimplementedServicesServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ServicesService_ServiceDesc, srv) } diff --git a/api/management/v1/external.proto b/api/management/v1/external.proto index ffd29e9ebb..c3da24c050 100644 --- a/api/management/v1/external.proto +++ b/api/management/v1/external.proto @@ -37,7 +37,7 @@ message AddExternalServiceParams { string metrics_path = 9; // Listen port for scraping metrics. uint32 listen_port = 10 [(validate.rules).uint32 = { - gt: 0, + gt: 0 lt: 65536 }]; // Node identifier on which an external service is been running. diff --git a/api/management/v1/haproxy.proto b/api/management/v1/haproxy.proto index d2495303a0..4d4720d71e 100644 --- a/api/management/v1/haproxy.proto +++ b/api/management/v1/haproxy.proto @@ -36,7 +36,7 @@ message AddHAProxyServiceParams { string metrics_path = 9; // Listen port for scraping metrics. uint32 listen_port = 10 [(validate.rules).uint32 = { - gt: 0, + gt: 0 lt: 65536 }]; // Environment name. diff --git a/api/management/v1/service.pb.gw.go b/api/management/v1/service.pb.gw.go index 3b437a36bc..b71f27c3f6 100644 --- a/api/management/v1/service.pb.gw.go +++ b/api/management/v1/service.pb.gw.go @@ -475,6 +475,7 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha // UnaryRPC :call ManagementServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterManagementServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ManagementServiceServer) error { mux.Handle("POST", pattern_ManagementService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -794,21 +795,21 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se // RegisterManagementServiceHandlerFromEndpoint is same as RegisterManagementServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterManagementServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -826,7 +827,7 @@ func RegisterManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ManagementServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ManagementServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ManagementServiceClient" to call the correct interceptors. +// "ManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ManagementServiceClient) error { mux.Handle("POST", pattern_ManagementService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index dca811895f..476fd197e4 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: management/v1/service.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ManagementService_AddAnnotation_FullMethodName = "/management.v1.ManagementService/AddAnnotation" @@ -38,6 +38,8 @@ const ( // ManagementServiceClient is the client API for ManagementService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// ManagementService provides public methods for managing and querying Services. type ManagementServiceClient interface { // AddAnnotation adds an annotation. AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*AddAnnotationResponse, error) @@ -76,8 +78,9 @@ func NewManagementServiceClient(cc grpc.ClientConnInterface) ManagementServiceCl } func (c *managementServiceClient) AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*AddAnnotationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddAnnotationResponse) - err := c.cc.Invoke(ctx, ManagementService_AddAnnotation_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_AddAnnotation_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -85,8 +88,9 @@ func (c *managementServiceClient) AddAnnotation(ctx context.Context, in *AddAnno } func (c *managementServiceClient) ListAgents(ctx context.Context, in *ListAgentsRequest, opts ...grpc.CallOption) (*ListAgentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAgentsResponse) - err := c.cc.Invoke(ctx, ManagementService_ListAgents_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_ListAgents_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -94,8 +98,9 @@ func (c *managementServiceClient) ListAgents(ctx context.Context, in *ListAgents } func (c *managementServiceClient) ListAgentVersions(ctx context.Context, in *ListAgentVersionsRequest, opts ...grpc.CallOption) (*ListAgentVersionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAgentVersionsResponse) - err := c.cc.Invoke(ctx, ManagementService_ListAgentVersions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_ListAgentVersions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,8 +108,9 @@ func (c *managementServiceClient) ListAgentVersions(ctx context.Context, in *Lis } func (c *managementServiceClient) RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RegisterNodeResponse) - err := c.cc.Invoke(ctx, ManagementService_RegisterNode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_RegisterNode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -112,8 +118,9 @@ func (c *managementServiceClient) RegisterNode(ctx context.Context, in *Register } func (c *managementServiceClient) UnregisterNode(ctx context.Context, in *UnregisterNodeRequest, opts ...grpc.CallOption) (*UnregisterNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnregisterNodeResponse) - err := c.cc.Invoke(ctx, ManagementService_UnregisterNode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_UnregisterNode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -121,8 +128,9 @@ func (c *managementServiceClient) UnregisterNode(ctx context.Context, in *Unregi } func (c *managementServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListNodesResponse) - err := c.cc.Invoke(ctx, ManagementService_ListNodes_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_ListNodes_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -130,8 +138,9 @@ func (c *managementServiceClient) ListNodes(ctx context.Context, in *ListNodesRe } func (c *managementServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetNodeResponse) - err := c.cc.Invoke(ctx, ManagementService_GetNode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_GetNode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -139,8 +148,9 @@ func (c *managementServiceClient) GetNode(ctx context.Context, in *GetNodeReques } func (c *managementServiceClient) AddService(ctx context.Context, in *AddServiceRequest, opts ...grpc.CallOption) (*AddServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddServiceResponse) - err := c.cc.Invoke(ctx, ManagementService_AddService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_AddService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -148,8 +158,9 @@ func (c *managementServiceClient) AddService(ctx context.Context, in *AddService } func (c *managementServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListServicesResponse) - err := c.cc.Invoke(ctx, ManagementService_ListServices_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_ListServices_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -157,8 +168,9 @@ func (c *managementServiceClient) ListServices(ctx context.Context, in *ListServ } func (c *managementServiceClient) DiscoverRDS(ctx context.Context, in *DiscoverRDSRequest, opts ...grpc.CallOption) (*DiscoverRDSResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DiscoverRDSResponse) - err := c.cc.Invoke(ctx, ManagementService_DiscoverRDS_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_DiscoverRDS_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -166,8 +178,9 @@ func (c *managementServiceClient) DiscoverRDS(ctx context.Context, in *DiscoverR } func (c *managementServiceClient) DiscoverAzureDatabase(ctx context.Context, in *DiscoverAzureDatabaseRequest, opts ...grpc.CallOption) (*DiscoverAzureDatabaseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DiscoverAzureDatabaseResponse) - err := c.cc.Invoke(ctx, ManagementService_DiscoverAzureDatabase_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_DiscoverAzureDatabase_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -175,8 +188,9 @@ func (c *managementServiceClient) DiscoverAzureDatabase(ctx context.Context, in } func (c *managementServiceClient) AddAzureDatabase(ctx context.Context, in *AddAzureDatabaseRequest, opts ...grpc.CallOption) (*AddAzureDatabaseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddAzureDatabaseResponse) - err := c.cc.Invoke(ctx, ManagementService_AddAzureDatabase_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_AddAzureDatabase_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -184,8 +198,9 @@ func (c *managementServiceClient) AddAzureDatabase(ctx context.Context, in *AddA } func (c *managementServiceClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveServiceResponse) - err := c.cc.Invoke(ctx, ManagementService_RemoveService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ManagementService_RemoveService_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -194,7 +209,9 @@ func (c *managementServiceClient) RemoveService(ctx context.Context, in *RemoveS // ManagementServiceServer is the server API for ManagementService service. // All implementations must embed UnimplementedManagementServiceServer -// for forward compatibility +// for forward compatibility. +// +// ManagementService provides public methods for managing and querying Services. type ManagementServiceServer interface { // AddAnnotation adds an annotation. AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) @@ -225,7 +242,11 @@ type ManagementServiceServer interface { mustEmbedUnimplementedManagementServiceServer() } -// UnimplementedManagementServiceServer must be embedded to have forward compatible implementations. +// UnimplementedManagementServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedManagementServiceServer struct{} func (UnimplementedManagementServiceServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) { @@ -280,6 +301,7 @@ func (UnimplementedManagementServiceServer) RemoveService(context.Context, *Remo return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } func (UnimplementedManagementServiceServer) mustEmbedUnimplementedManagementServiceServer() {} +func (UnimplementedManagementServiceServer) testEmbeddedByValue() {} // UnsafeManagementServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ManagementServiceServer will @@ -289,6 +311,13 @@ type UnsafeManagementServiceServer interface { } func RegisterManagementServiceServer(s grpc.ServiceRegistrar, srv ManagementServiceServer) { + // If the following call pancis, it indicates UnimplementedManagementServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ManagementService_ServiceDesc, srv) } diff --git a/api/platform/v1/platform.pb.gw.go b/api/platform/v1/platform.pb.gw.go index a16a0eb48a..06cfee4c9e 100644 --- a/api/platform/v1/platform.pb.gw.go +++ b/api/platform/v1/platform.pb.gw.go @@ -165,6 +165,7 @@ func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler r // UnaryRPC :call PlatformServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPlatformServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PlatformServiceServer) error { mux.Handle("POST", pattern_PlatformService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -340,21 +341,21 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterPlatformServiceHandlerFromEndpoint is same as RegisterPlatformServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPlatformServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -372,7 +373,7 @@ func RegisterPlatformServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PlatformServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PlatformServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PlatformServiceClient" to call the correct interceptors. +// "PlatformServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PlatformServiceClient) error { mux.Handle("POST", pattern_PlatformService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/platform/v1/platform_grpc.pb.go b/api/platform/v1/platform_grpc.pb.go index 37607343f4..42cadaab2d 100644 --- a/api/platform/v1/platform_grpc.pb.go +++ b/api/platform/v1/platform_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: platform/v1/platform.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( PlatformService_Connect_FullMethodName = "/platform.v1.PlatformService/Connect" @@ -32,6 +32,8 @@ const ( // PlatformServiceClient is the client API for PlatformService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Platform contains rpcs related to Percona Platform. type PlatformServiceClient interface { // Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account. Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) @@ -58,8 +60,9 @@ func NewPlatformServiceClient(cc grpc.ClientConnInterface) PlatformServiceClient } func (c *platformServiceClient) Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConnectResponse) - err := c.cc.Invoke(ctx, PlatformService_Connect_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_Connect_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -67,8 +70,9 @@ func (c *platformServiceClient) Connect(ctx context.Context, in *ConnectRequest, } func (c *platformServiceClient) Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DisconnectResponse) - err := c.cc.Invoke(ctx, PlatformService_Disconnect_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_Disconnect_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +80,9 @@ func (c *platformServiceClient) Disconnect(ctx context.Context, in *DisconnectRe } func (c *platformServiceClient) SearchOrganizationTickets(ctx context.Context, in *SearchOrganizationTicketsRequest, opts ...grpc.CallOption) (*SearchOrganizationTicketsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SearchOrganizationTicketsResponse) - err := c.cc.Invoke(ctx, PlatformService_SearchOrganizationTickets_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_SearchOrganizationTickets_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -85,8 +90,9 @@ func (c *platformServiceClient) SearchOrganizationTickets(ctx context.Context, i } func (c *platformServiceClient) SearchOrganizationEntitlements(ctx context.Context, in *SearchOrganizationEntitlementsRequest, opts ...grpc.CallOption) (*SearchOrganizationEntitlementsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SearchOrganizationEntitlementsResponse) - err := c.cc.Invoke(ctx, PlatformService_SearchOrganizationEntitlements_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_SearchOrganizationEntitlements_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -94,8 +100,9 @@ func (c *platformServiceClient) SearchOrganizationEntitlements(ctx context.Conte } func (c *platformServiceClient) GetContactInformation(ctx context.Context, in *GetContactInformationRequest, opts ...grpc.CallOption) (*GetContactInformationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetContactInformationResponse) - err := c.cc.Invoke(ctx, PlatformService_GetContactInformation_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_GetContactInformation_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,8 +110,9 @@ func (c *platformServiceClient) GetContactInformation(ctx context.Context, in *G } func (c *platformServiceClient) ServerInfo(ctx context.Context, in *ServerInfoRequest, opts ...grpc.CallOption) (*ServerInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ServerInfoResponse) - err := c.cc.Invoke(ctx, PlatformService_ServerInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_ServerInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -112,8 +120,9 @@ func (c *platformServiceClient) ServerInfo(ctx context.Context, in *ServerInfoRe } func (c *platformServiceClient) UserStatus(ctx context.Context, in *UserStatusRequest, opts ...grpc.CallOption) (*UserStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UserStatusResponse) - err := c.cc.Invoke(ctx, PlatformService_UserStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PlatformService_UserStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -122,7 +131,9 @@ func (c *platformServiceClient) UserStatus(ctx context.Context, in *UserStatusRe // PlatformServiceServer is the server API for PlatformService service. // All implementations must embed UnimplementedPlatformServiceServer -// for forward compatibility +// for forward compatibility. +// +// Platform contains rpcs related to Percona Platform. type PlatformServiceServer interface { // Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account. Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) @@ -141,7 +152,11 @@ type PlatformServiceServer interface { mustEmbedUnimplementedPlatformServiceServer() } -// UnimplementedPlatformServiceServer must be embedded to have forward compatible implementations. +// UnimplementedPlatformServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedPlatformServiceServer struct{} func (UnimplementedPlatformServiceServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { @@ -172,6 +187,7 @@ func (UnimplementedPlatformServiceServer) UserStatus(context.Context, *UserStatu return nil, status.Errorf(codes.Unimplemented, "method UserStatus not implemented") } func (UnimplementedPlatformServiceServer) mustEmbedUnimplementedPlatformServiceServer() {} +func (UnimplementedPlatformServiceServer) testEmbeddedByValue() {} // UnsafePlatformServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PlatformServiceServer will @@ -181,6 +197,13 @@ type UnsafePlatformServiceServer interface { } func RegisterPlatformServiceServer(s grpc.ServiceRegistrar, srv PlatformServiceServer) { + // If the following call pancis, it indicates UnimplementedPlatformServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&PlatformService_ServiceDesc, srv) } diff --git a/api/qan/v1/collector_grpc.pb.go b/api/qan/v1/collector_grpc.pb.go index b61bc15d15..27f7ffbcdd 100644 --- a/api/qan/v1/collector_grpc.pb.go +++ b/api/qan/v1/collector_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: qan/v1/collector.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( CollectorService_Collect_FullMethodName = "/qan.v1.CollectorService/Collect" @@ -26,6 +26,8 @@ const ( // CollectorServiceClient is the client API for CollectorService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Collector service accepts data from pmm-agent (via pmm-managed). type CollectorServiceClient interface { // Collect accepts data from pmm-agent (via pmm-managed). Collect(ctx context.Context, in *CollectRequest, opts ...grpc.CallOption) (*CollectResponse, error) @@ -40,8 +42,9 @@ func NewCollectorServiceClient(cc grpc.ClientConnInterface) CollectorServiceClie } func (c *collectorServiceClient) Collect(ctx context.Context, in *CollectRequest, opts ...grpc.CallOption) (*CollectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CollectResponse) - err := c.cc.Invoke(ctx, CollectorService_Collect_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, CollectorService_Collect_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -50,20 +53,27 @@ func (c *collectorServiceClient) Collect(ctx context.Context, in *CollectRequest // CollectorServiceServer is the server API for CollectorService service. // All implementations must embed UnimplementedCollectorServiceServer -// for forward compatibility +// for forward compatibility. +// +// Collector service accepts data from pmm-agent (via pmm-managed). type CollectorServiceServer interface { // Collect accepts data from pmm-agent (via pmm-managed). Collect(context.Context, *CollectRequest) (*CollectResponse, error) mustEmbedUnimplementedCollectorServiceServer() } -// UnimplementedCollectorServiceServer must be embedded to have forward compatible implementations. +// UnimplementedCollectorServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedCollectorServiceServer struct{} func (UnimplementedCollectorServiceServer) Collect(context.Context, *CollectRequest) (*CollectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Collect not implemented") } func (UnimplementedCollectorServiceServer) mustEmbedUnimplementedCollectorServiceServer() {} +func (UnimplementedCollectorServiceServer) testEmbeddedByValue() {} // UnsafeCollectorServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CollectorServiceServer will @@ -73,6 +83,13 @@ type UnsafeCollectorServiceServer interface { } func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer) { + // If the following call pancis, it indicates UnimplementedCollectorServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&CollectorService_ServiceDesc, srv) } diff --git a/api/qan/v1/service.pb.gw.go b/api/qan/v1/service.pb.gw.go index 4fdd02dfdb..7046112486 100644 --- a/api/qan/v1/service.pb.gw.go +++ b/api/qan/v1/service.pb.gw.go @@ -327,6 +327,7 @@ func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler r // UnaryRPC :call QANServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQANServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QANServiceServer) error { mux.Handle("POST", pattern_QANService_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -598,21 +599,21 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterQANServiceHandlerFromEndpoint is same as RegisterQANServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQANServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -630,7 +631,7 @@ func RegisterQANServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QANServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QANServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QANServiceClient" to call the correct interceptors. +// "QANServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QANServiceClient) error { mux.Handle("POST", pattern_QANService_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/qan/v1/service_grpc.pb.go b/api/qan/v1/service_grpc.pb.go index 0a0995963e..75fc7b8118 100644 --- a/api/qan/v1/service_grpc.pb.go +++ b/api/qan/v1/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: qan/v1/service.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( QANService_GetReport_FullMethodName = "/qan.v1.QANService/GetReport" @@ -36,6 +36,8 @@ const ( // QANServiceClient is the client API for QANService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// QANService provides an API to interact with PMM Query Analytics. type QANServiceClient interface { // GetReport returns a list of metrics grouped by queryid or other dimensions. GetReport(ctx context.Context, in *GetReportRequest, opts ...grpc.CallOption) (*GetReportResponse, error) @@ -70,8 +72,9 @@ func NewQANServiceClient(cc grpc.ClientConnInterface) QANServiceClient { } func (c *qANServiceClient) GetReport(ctx context.Context, in *GetReportRequest, opts ...grpc.CallOption) (*GetReportResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetReportResponse) - err := c.cc.Invoke(ctx, QANService_GetReport_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetReport_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +82,9 @@ func (c *qANServiceClient) GetReport(ctx context.Context, in *GetReportRequest, } func (c *qANServiceClient) GetFilteredMetricsNames(ctx context.Context, in *GetFilteredMetricsNamesRequest, opts ...grpc.CallOption) (*GetFilteredMetricsNamesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFilteredMetricsNamesResponse) - err := c.cc.Invoke(ctx, QANService_GetFilteredMetricsNames_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetFilteredMetricsNames_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +92,9 @@ func (c *qANServiceClient) GetFilteredMetricsNames(ctx context.Context, in *GetF } func (c *qANServiceClient) GetMetricsNames(ctx context.Context, in *GetMetricsNamesRequest, opts ...grpc.CallOption) (*GetMetricsNamesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMetricsNamesResponse) - err := c.cc.Invoke(ctx, QANService_GetMetricsNames_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetMetricsNames_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -97,8 +102,9 @@ func (c *qANServiceClient) GetMetricsNames(ctx context.Context, in *GetMetricsNa } func (c *qANServiceClient) GetMetrics(ctx context.Context, in *GetMetricsRequest, opts ...grpc.CallOption) (*GetMetricsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMetricsResponse) - err := c.cc.Invoke(ctx, QANService_GetMetrics_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetMetrics_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -106,8 +112,9 @@ func (c *qANServiceClient) GetMetrics(ctx context.Context, in *GetMetricsRequest } func (c *qANServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLabelsResponse) - err := c.cc.Invoke(ctx, QANService_GetLabels_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetLabels_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -115,8 +122,9 @@ func (c *qANServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, } func (c *qANServiceClient) GetHistogram(ctx context.Context, in *GetHistogramRequest, opts ...grpc.CallOption) (*GetHistogramResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetHistogramResponse) - err := c.cc.Invoke(ctx, QANService_GetHistogram_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetHistogram_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -124,8 +132,9 @@ func (c *qANServiceClient) GetHistogram(ctx context.Context, in *GetHistogramReq } func (c *qANServiceClient) ExplainFingerprintByQueryID(ctx context.Context, in *ExplainFingerprintByQueryIDRequest, opts ...grpc.CallOption) (*ExplainFingerprintByQueryIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExplainFingerprintByQueryIDResponse) - err := c.cc.Invoke(ctx, QANService_ExplainFingerprintByQueryID_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_ExplainFingerprintByQueryID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -133,8 +142,9 @@ func (c *qANServiceClient) ExplainFingerprintByQueryID(ctx context.Context, in * } func (c *qANServiceClient) GetQueryPlan(ctx context.Context, in *GetQueryPlanRequest, opts ...grpc.CallOption) (*GetQueryPlanResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetQueryPlanResponse) - err := c.cc.Invoke(ctx, QANService_GetQueryPlan_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetQueryPlan_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -142,8 +152,9 @@ func (c *qANServiceClient) GetQueryPlan(ctx context.Context, in *GetQueryPlanReq } func (c *qANServiceClient) QueryExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryExistsResponse) - err := c.cc.Invoke(ctx, QANService_QueryExists_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_QueryExists_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -151,8 +162,9 @@ func (c *qANServiceClient) QueryExists(ctx context.Context, in *QueryExistsReque } func (c *qANServiceClient) SchemaByQueryID(ctx context.Context, in *SchemaByQueryIDRequest, opts ...grpc.CallOption) (*SchemaByQueryIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SchemaByQueryIDResponse) - err := c.cc.Invoke(ctx, QANService_SchemaByQueryID_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_SchemaByQueryID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -160,8 +172,9 @@ func (c *qANServiceClient) SchemaByQueryID(ctx context.Context, in *SchemaByQuer } func (c *qANServiceClient) GetQueryExample(ctx context.Context, in *GetQueryExampleRequest, opts ...grpc.CallOption) (*GetQueryExampleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetQueryExampleResponse) - err := c.cc.Invoke(ctx, QANService_GetQueryExample_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, QANService_GetQueryExample_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -170,7 +183,9 @@ func (c *qANServiceClient) GetQueryExample(ctx context.Context, in *GetQueryExam // QANServiceServer is the server API for QANService service. // All implementations must embed UnimplementedQANServiceServer -// for forward compatibility +// for forward compatibility. +// +// QANService provides an API to interact with PMM Query Analytics. type QANServiceServer interface { // GetReport returns a list of metrics grouped by queryid or other dimensions. GetReport(context.Context, *GetReportRequest) (*GetReportResponse, error) @@ -197,7 +212,11 @@ type QANServiceServer interface { mustEmbedUnimplementedQANServiceServer() } -// UnimplementedQANServiceServer must be embedded to have forward compatible implementations. +// UnimplementedQANServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedQANServiceServer struct{} func (UnimplementedQANServiceServer) GetReport(context.Context, *GetReportRequest) (*GetReportResponse, error) { @@ -244,6 +263,7 @@ func (UnimplementedQANServiceServer) GetQueryExample(context.Context, *GetQueryE return nil, status.Errorf(codes.Unimplemented, "method GetQueryExample not implemented") } func (UnimplementedQANServiceServer) mustEmbedUnimplementedQANServiceServer() {} +func (UnimplementedQANServiceServer) testEmbeddedByValue() {} // UnsafeQANServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QANServiceServer will @@ -253,6 +273,13 @@ type UnsafeQANServiceServer interface { } func RegisterQANServiceServer(s grpc.ServiceRegistrar, srv QANServiceServer) { + // If the following call pancis, it indicates UnimplementedQANServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&QANService_ServiceDesc, srv) } diff --git a/api/server/v1/json/client/server_service/aws_instance_check_parameters.go b/api/server/v1/json/client/server_service/aws_instance_check_parameters.go deleted file mode 100644 index 87f36dd758..0000000000 --- a/api/server/v1/json/client/server_service/aws_instance_check_parameters.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package server_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewAWSInstanceCheckParams creates a new AWSInstanceCheckParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewAWSInstanceCheckParams() *AWSInstanceCheckParams { - return &AWSInstanceCheckParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAWSInstanceCheckParamsWithTimeout creates a new AWSInstanceCheckParams object -// with the ability to set a timeout on a request. -func NewAWSInstanceCheckParamsWithTimeout(timeout time.Duration) *AWSInstanceCheckParams { - return &AWSInstanceCheckParams{ - timeout: timeout, - } -} - -// NewAWSInstanceCheckParamsWithContext creates a new AWSInstanceCheckParams object -// with the ability to set a context for a request. -func NewAWSInstanceCheckParamsWithContext(ctx context.Context) *AWSInstanceCheckParams { - return &AWSInstanceCheckParams{ - Context: ctx, - } -} - -// NewAWSInstanceCheckParamsWithHTTPClient creates a new AWSInstanceCheckParams object -// with the ability to set a custom HTTPClient for a request. -func NewAWSInstanceCheckParamsWithHTTPClient(client *http.Client) *AWSInstanceCheckParams { - return &AWSInstanceCheckParams{ - HTTPClient: client, - } -} - -/* -AWSInstanceCheckParams contains all the parameters to send to the API endpoint - - for the AWS instance check operation. - - Typically these are written to a http.Request. -*/ -type AWSInstanceCheckParams struct { - /* InstanceID. - - AWS EC2 instance ID (i-1234567890abcdef0). - */ - InstanceID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the AWS instance check params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AWSInstanceCheckParams) WithDefaults() *AWSInstanceCheckParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the AWS instance check params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AWSInstanceCheckParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the AWS instance check params -func (o *AWSInstanceCheckParams) WithTimeout(timeout time.Duration) *AWSInstanceCheckParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the AWS instance check params -func (o *AWSInstanceCheckParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the AWS instance check params -func (o *AWSInstanceCheckParams) WithContext(ctx context.Context) *AWSInstanceCheckParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the AWS instance check params -func (o *AWSInstanceCheckParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the AWS instance check params -func (o *AWSInstanceCheckParams) WithHTTPClient(client *http.Client) *AWSInstanceCheckParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the AWS instance check params -func (o *AWSInstanceCheckParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstanceID adds the instanceID to the AWS instance check params -func (o *AWSInstanceCheckParams) WithInstanceID(instanceID *string) *AWSInstanceCheckParams { - o.SetInstanceID(instanceID) - return o -} - -// SetInstanceID adds the instanceId to the AWS instance check params -func (o *AWSInstanceCheckParams) SetInstanceID(instanceID *string) { - o.InstanceID = instanceID -} - -// WriteToRequest writes these params to a swagger request -func (o *AWSInstanceCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.InstanceID != nil { - - // query param instance_id - var qrInstanceID string - - if o.InstanceID != nil { - qrInstanceID = *o.InstanceID - } - qInstanceID := qrInstanceID - if qInstanceID != "" { - if err := r.SetQueryParam("instance_id", qInstanceID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/server/v1/json/client/server_service/aws_instance_check_responses.go b/api/server/v1/json/client/server_service/aws_instance_check_responses.go deleted file mode 100644 index ed42e91f41..0000000000 --- a/api/server/v1/json/client/server_service/aws_instance_check_responses.go +++ /dev/null @@ -1,369 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package server_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AWSInstanceCheckReader is a Reader for the AWSInstanceCheck structure. -type AWSInstanceCheckReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AWSInstanceCheckReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAWSInstanceCheckOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAWSInstanceCheckDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewAWSInstanceCheckOK creates a AWSInstanceCheckOK with default headers values -func NewAWSInstanceCheckOK() *AWSInstanceCheckOK { - return &AWSInstanceCheckOK{} -} - -/* -AWSInstanceCheckOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type AWSInstanceCheckOK struct { - Payload interface{} -} - -func (o *AWSInstanceCheckOK) Error() string { - return fmt.Sprintf("[GET /v1/server/AWSInstance][%d] awsInstanceCheckOk %+v", 200, o.Payload) -} - -func (o *AWSInstanceCheckOK) GetPayload() interface{} { - return o.Payload -} - -func (o *AWSInstanceCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAWSInstanceCheckDefault creates a AWSInstanceCheckDefault with default headers values -func NewAWSInstanceCheckDefault(code int) *AWSInstanceCheckDefault { - return &AWSInstanceCheckDefault{ - _statusCode: code, - } -} - -/* -AWSInstanceCheckDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type AWSInstanceCheckDefault struct { - _statusCode int - - Payload *AWSInstanceCheckDefaultBody -} - -// Code gets the status code for the AWS instance check default response -func (o *AWSInstanceCheckDefault) Code() int { - return o._statusCode -} - -func (o *AWSInstanceCheckDefault) Error() string { - return fmt.Sprintf("[GET /v1/server/AWSInstance][%d] AWSInstanceCheck default %+v", o._statusCode, o.Payload) -} - -func (o *AWSInstanceCheckDefault) GetPayload() *AWSInstanceCheckDefaultBody { - return o.Payload -} - -func (o *AWSInstanceCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AWSInstanceCheckDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -AWSInstanceCheckDefaultBody AWS instance check default body -swagger:model AWSInstanceCheckDefaultBody -*/ -type AWSInstanceCheckDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*AWSInstanceCheckDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this AWS instance check default body -func (o *AWSInstanceCheckDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AWSInstanceCheckDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AWSInstanceCheck default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AWSInstanceCheck default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this AWS instance check default body based on the context it is used -func (o *AWSInstanceCheckDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AWSInstanceCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AWSInstanceCheck default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AWSInstanceCheck default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AWSInstanceCheckDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AWSInstanceCheckDefaultBody) UnmarshalBinary(b []byte) error { - var res AWSInstanceCheckDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AWSInstanceCheckDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// // or ... -// if (any.isSameTypeAs(Foo.getDefaultInstance())) { -// foo = any.unpack(Foo.getDefaultInstance()); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -swagger:model AWSInstanceCheckDefaultBodyDetailsItems0 -*/ -type AWSInstanceCheckDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. As of May 2023, there are no widely used type server - // implementations and no plans to implement one. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - AtType string `json:"@type,omitempty"` -} - -// Validate validates this AWS instance check default body details items0 -func (o *AWSInstanceCheckDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this AWS instance check default body details items0 based on context it is used -func (o *AWSInstanceCheckDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AWSInstanceCheckDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AWSInstanceCheckDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res AWSInstanceCheckDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/server/v1/json/client/server_service/server_service_client.go b/api/server/v1/json/client/server_service/server_service_client.go index 11343140a9..4d1cd044ff 100644 --- a/api/server/v1/json/client/server_service/server_service_client.go +++ b/api/server/v1/json/client/server_service/server_service_client.go @@ -30,8 +30,6 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - AWSInstanceCheck(params *AWSInstanceCheckParams, opts ...ClientOption) (*AWSInstanceCheckOK, error) - ChangeSettings(params *ChangeSettingsParams, opts ...ClientOption) (*ChangeSettingsOK, error) CheckUpdates(params *CheckUpdatesParams, opts ...ClientOption) (*CheckUpdatesOK, error) @@ -53,45 +51,6 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } -/* -AWSInstanceCheck AWSs instance check - -Checks AWS EC2 instance ID. -*/ -func (a *Client) AWSInstanceCheck(params *AWSInstanceCheckParams, opts ...ClientOption) (*AWSInstanceCheckOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAWSInstanceCheckParams() - } - op := &runtime.ClientOperation{ - ID: "AWSInstanceCheck", - Method: "GET", - PathPattern: "/v1/server/AWSInstance", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &AWSInstanceCheckReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*AWSInstanceCheckOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AWSInstanceCheckDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ChangeSettings changes settings diff --git a/api/server/v1/json/v1.json b/api/server/v1/json/v1.json index 7831e9a4fa..a47880959b 100644 --- a/api/server/v1/json/v1.json +++ b/api/server/v1/json/v1.json @@ -15,65 +15,6 @@ "version": "v1" }, "paths": { - "/v1/server/AWSInstance": { - "get": { - "description": "Checks AWS EC2 instance ID.", - "tags": [ - "ServerService" - ], - "summary": "AWS instance check", - "operationId": "AWSInstanceCheck", - "parameters": [ - { - "type": "string", - "description": "AWS EC2 instance ID (i-1234567890abcdef0).", - "name": "instance_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", - "type": "object", - "properties": { - "@type": { - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, "/v1/server/leaderHealthCheck": { "get": { "description": "Checks if the instance is the leader in a cluster. Returns an error if the instance isn't the leader.", diff --git a/api/server/v1/server.pb.go b/api/server/v1/server.pb.go index ff671a9f28..fd1eccccee 100644 --- a/api/server/v1/server.pb.go +++ b/api/server/v1/server.pb.go @@ -1469,92 +1469,6 @@ func (x *ChangeSettingsResponse) GetSettings() *Settings { return nil } -type AWSInstanceCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // AWS EC2 instance ID (i-1234567890abcdef0). - InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` -} - -func (x *AWSInstanceCheckRequest) Reset() { - *x = AWSInstanceCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_v1_server_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AWSInstanceCheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AWSInstanceCheckRequest) ProtoMessage() {} - -func (x *AWSInstanceCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_v1_server_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AWSInstanceCheckRequest.ProtoReflect.Descriptor instead. -func (*AWSInstanceCheckRequest) Descriptor() ([]byte, []int) { - return file_server_v1_server_proto_rawDescGZIP(), []int{21} -} - -func (x *AWSInstanceCheckRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -type AWSInstanceCheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AWSInstanceCheckResponse) Reset() { - *x = AWSInstanceCheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_v1_server_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AWSInstanceCheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AWSInstanceCheckResponse) ProtoMessage() {} - -func (x *AWSInstanceCheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_v1_server_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AWSInstanceCheckResponse.ProtoReflect.Descriptor instead. -func (*AWSInstanceCheckResponse) Descriptor() ([]byte, []int) { - return file_server_v1_server_proto_rawDescGZIP(), []int{22} -} - var File_server_v1_server_proto protoreflect.FileDescriptor var file_server_v1_server_proto_rawDesc = []byte{ @@ -1804,144 +1718,127 @@ var file_server_v1_server_proto_rawDesc = []byte{ 0x12, 0x2f, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x22, 0x43, 0x0a, 0x17, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0b, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2a, 0xce, 0x01, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x49, 0x53, - 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, - 0x0a, 0x1a, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, - 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1b, - 0x0a, 0x17, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, - 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4f, 0x56, 0x46, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x44, - 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, - 0x4f, 0x44, 0x5f, 0x41, 0x4d, 0x49, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x53, 0x54, + 0x73, 0x2a, 0xce, 0x01, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, - 0x41, 0x5a, 0x55, 0x52, 0x45, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, 0x53, 0x54, 0x52, - 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, - 0x4f, 0x10, 0x05, 0x32, 0xc3, 0x0d, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x92, 0x41, 0x27, 0x12, 0x07, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, - 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xab, - 0x02, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x01, 0x92, 0x41, 0xc5, 0x01, 0x12, 0x16, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0xaa, 0x01, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, - 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x79, - 0x65, 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x41, 0x50, 0x49, - 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x44, 0x6f, 0x63, 0x6b, - 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, - 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, - 0x73, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x12, 0x81, 0x02, 0x0a, - 0x11, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, - 0x92, 0x41, 0x79, 0x12, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x4c, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x69, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x61, - 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, 0x6e, 0x27, 0x74, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x6c, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0xa7, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x56, 0x92, 0x41, 0x39, 0x12, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x28, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x66, - 0x6f, 0x72, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x50, 0x4d, 0x4d, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x0b, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, + 0x1a, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, + 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1b, 0x0a, + 0x17, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, + 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4f, 0x56, 0x46, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, + 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x5f, 0x41, 0x4d, 0x49, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x53, 0x54, 0x52, + 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x41, + 0x5a, 0x55, 0x52, 0x45, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, + 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x44, 0x4f, + 0x10, 0x05, 0x32, 0x91, 0x0c, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x92, 0x41, 0x27, 0x12, 0x07, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, + 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xab, 0x02, + 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x01, 0x92, 0x41, 0xc5, 0x01, 0x12, 0x16, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0xaa, 0x01, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, + 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, + 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, + 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x79, 0x65, + 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x41, 0x50, 0x49, 0x20, + 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x44, 0x6f, 0x63, 0x6b, 0x65, + 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x4b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, + 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x12, 0x81, 0x02, 0x0a, 0x11, + 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x23, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x92, + 0x41, 0x79, 0x12, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x1a, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x69, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, + 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, 0x6e, 0x27, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x6c, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, + 0xa7, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x56, 0x92, 0x41, 0x39, 0x12, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x28, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x0b, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x29, 0x12, 0x0c, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x19, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, - 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0xad, 0x01, 0x0a, 0x0c, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x92, 0x41, - 0x32, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x1a, 0x21, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x3a, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x29, 0x12, 0x0c, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x19, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, + 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0xad, 0x01, 0x0a, 0x0c, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x92, 0x41, 0x32, + 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, + 0x21, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x3a, + 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x34, 0x12, 0x0c, - 0x47, 0x65, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x24, 0x52, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x4d, - 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa7, 0x01, - 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2f, 0x12, 0x0f, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x1c, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, - 0x01, 0x2a, 0x1a, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x10, 0x41, 0x57, 0x53, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x22, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x57, 0x53, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x31, 0x12, 0x12, 0x41, 0x57, 0x53, 0x20, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x1b, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x41, 0x57, 0x53, 0x20, 0x45, 0x43, 0x32, 0x20, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x41, 0x57, - 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x90, 0x01, 0x0a, 0x0d, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, - 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, - 0x02, 0x09, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x34, 0x12, 0x0c, 0x47, + 0x65, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x24, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x73, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x4d, 0x4d, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa7, 0x01, 0x0a, + 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2f, 0x12, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x1c, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, + 0x2a, 0x1a, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x90, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1958,7 +1855,7 @@ func file_server_v1_server_proto_rawDescGZIP() []byte { var ( file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 23) + file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 21) file_server_v1_server_proto_goTypes = []any{ (DistributionMethod)(0), // 0: server.v1.DistributionMethod (*VersionInfo)(nil), // 1: server.v1.VersionInfo @@ -1982,36 +1879,34 @@ var ( (*GetSettingsResponse)(nil), // 19: server.v1.GetSettingsResponse (*ChangeSettingsRequest)(nil), // 20: server.v1.ChangeSettingsRequest (*ChangeSettingsResponse)(nil), // 21: server.v1.ChangeSettingsResponse - (*AWSInstanceCheckRequest)(nil), // 22: server.v1.AWSInstanceCheckRequest - (*AWSInstanceCheckResponse)(nil), // 23: server.v1.AWSInstanceCheckResponse - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 25: google.protobuf.Duration - (*common.StringArray)(nil), // 26: common.StringArray + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 23: google.protobuf.Duration + (*common.StringArray)(nil), // 24: common.StringArray } ) var file_server_v1_server_proto_depIdxs = []int32{ - 24, // 0: server.v1.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp + 22, // 0: server.v1.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 1: server.v1.VersionResponse.server:type_name -> server.v1.VersionInfo 1, // 2: server.v1.VersionResponse.managed:type_name -> server.v1.VersionInfo 0, // 3: server.v1.VersionResponse.distribution_method:type_name -> server.v1.DistributionMethod - 24, // 4: server.v1.DockerVersionInfo.timestamp:type_name -> google.protobuf.Timestamp + 22, // 4: server.v1.DockerVersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 5: server.v1.CheckUpdatesResponse.installed:type_name -> server.v1.VersionInfo 9, // 6: server.v1.CheckUpdatesResponse.latest:type_name -> server.v1.DockerVersionInfo - 24, // 7: server.v1.CheckUpdatesResponse.last_check:type_name -> google.protobuf.Timestamp - 25, // 8: server.v1.MetricsResolutions.hr:type_name -> google.protobuf.Duration - 25, // 9: server.v1.MetricsResolutions.mr:type_name -> google.protobuf.Duration - 25, // 10: server.v1.MetricsResolutions.lr:type_name -> google.protobuf.Duration - 25, // 11: server.v1.AdvisorRunIntervals.standard_interval:type_name -> google.protobuf.Duration - 25, // 12: server.v1.AdvisorRunIntervals.rare_interval:type_name -> google.protobuf.Duration - 25, // 13: server.v1.AdvisorRunIntervals.frequent_interval:type_name -> google.protobuf.Duration + 22, // 7: server.v1.CheckUpdatesResponse.last_check:type_name -> google.protobuf.Timestamp + 23, // 8: server.v1.MetricsResolutions.hr:type_name -> google.protobuf.Duration + 23, // 9: server.v1.MetricsResolutions.mr:type_name -> google.protobuf.Duration + 23, // 10: server.v1.MetricsResolutions.lr:type_name -> google.protobuf.Duration + 23, // 11: server.v1.AdvisorRunIntervals.standard_interval:type_name -> google.protobuf.Duration + 23, // 12: server.v1.AdvisorRunIntervals.rare_interval:type_name -> google.protobuf.Duration + 23, // 13: server.v1.AdvisorRunIntervals.frequent_interval:type_name -> google.protobuf.Duration 15, // 14: server.v1.Settings.metrics_resolutions:type_name -> server.v1.MetricsResolutions - 25, // 15: server.v1.Settings.data_retention:type_name -> google.protobuf.Duration + 23, // 15: server.v1.Settings.data_retention:type_name -> google.protobuf.Duration 16, // 16: server.v1.Settings.advisor_run_intervals:type_name -> server.v1.AdvisorRunIntervals 17, // 17: server.v1.GetSettingsResponse.settings:type_name -> server.v1.Settings 15, // 18: server.v1.ChangeSettingsRequest.metrics_resolutions:type_name -> server.v1.MetricsResolutions - 25, // 19: server.v1.ChangeSettingsRequest.data_retention:type_name -> google.protobuf.Duration - 26, // 20: server.v1.ChangeSettingsRequest.aws_partitions:type_name -> common.StringArray + 23, // 19: server.v1.ChangeSettingsRequest.data_retention:type_name -> google.protobuf.Duration + 24, // 20: server.v1.ChangeSettingsRequest.aws_partitions:type_name -> common.StringArray 16, // 21: server.v1.ChangeSettingsRequest.advisor_run_intervals:type_name -> server.v1.AdvisorRunIntervals 17, // 22: server.v1.ChangeSettingsResponse.settings:type_name -> server.v1.Settings 2, // 23: server.v1.ServerService.Version:input_type -> server.v1.VersionRequest @@ -2022,18 +1917,16 @@ var file_server_v1_server_proto_depIdxs = []int32{ 13, // 28: server.v1.ServerService.UpdateStatus:input_type -> server.v1.UpdateStatusRequest 18, // 29: server.v1.ServerService.GetSettings:input_type -> server.v1.GetSettingsRequest 20, // 30: server.v1.ServerService.ChangeSettings:input_type -> server.v1.ChangeSettingsRequest - 22, // 31: server.v1.ServerService.AWSInstanceCheck:input_type -> server.v1.AWSInstanceCheckRequest - 3, // 32: server.v1.ServerService.Version:output_type -> server.v1.VersionResponse - 5, // 33: server.v1.ServerService.Readiness:output_type -> server.v1.ReadinessResponse - 7, // 34: server.v1.ServerService.LeaderHealthCheck:output_type -> server.v1.LeaderHealthCheckResponse - 10, // 35: server.v1.ServerService.CheckUpdates:output_type -> server.v1.CheckUpdatesResponse - 12, // 36: server.v1.ServerService.StartUpdate:output_type -> server.v1.StartUpdateResponse - 14, // 37: server.v1.ServerService.UpdateStatus:output_type -> server.v1.UpdateStatusResponse - 19, // 38: server.v1.ServerService.GetSettings:output_type -> server.v1.GetSettingsResponse - 21, // 39: server.v1.ServerService.ChangeSettings:output_type -> server.v1.ChangeSettingsResponse - 23, // 40: server.v1.ServerService.AWSInstanceCheck:output_type -> server.v1.AWSInstanceCheckResponse - 32, // [32:41] is the sub-list for method output_type - 23, // [23:32] is the sub-list for method input_type + 3, // 31: server.v1.ServerService.Version:output_type -> server.v1.VersionResponse + 5, // 32: server.v1.ServerService.Readiness:output_type -> server.v1.ReadinessResponse + 7, // 33: server.v1.ServerService.LeaderHealthCheck:output_type -> server.v1.LeaderHealthCheckResponse + 10, // 34: server.v1.ServerService.CheckUpdates:output_type -> server.v1.CheckUpdatesResponse + 12, // 35: server.v1.ServerService.StartUpdate:output_type -> server.v1.StartUpdateResponse + 14, // 36: server.v1.ServerService.UpdateStatus:output_type -> server.v1.UpdateStatusResponse + 19, // 37: server.v1.ServerService.GetSettings:output_type -> server.v1.GetSettingsResponse + 21, // 38: server.v1.ServerService.ChangeSettings:output_type -> server.v1.ChangeSettingsResponse + 31, // [31:39] is the sub-list for method output_type + 23, // [23:31] is the sub-list for method input_type 23, // [23:23] is the sub-list for extension type_name 23, // [23:23] is the sub-list for extension extendee 0, // [0:23] is the sub-list for field type_name @@ -2297,30 +2190,6 @@ func file_server_v1_server_proto_init() { return nil } } - file_server_v1_server_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AWSInstanceCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_v1_server_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AWSInstanceCheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_server_v1_server_proto_msgTypes[19].OneofWrappers = []any{} type x struct{} @@ -2329,7 +2198,7 @@ func file_server_v1_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_server_v1_server_proto_rawDesc, NumEnums: 1, - NumMessages: 23, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/api/server/v1/server.pb.gw.go b/api/server/v1/server.pb.gw.go index d8ac837054..07e35fb1ec 100644 --- a/api/server/v1/server.pb.gw.go +++ b/api/server/v1/server.pb.gw.go @@ -217,42 +217,11 @@ func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler return msg, metadata, err } -var filter_ServerService_AWSInstanceCheck_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -func request_ServerService_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AWSInstanceCheckRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServerService_AWSInstanceCheck_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AWSInstanceCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_ServerService_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AWSInstanceCheckRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServerService_AWSInstanceCheck_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AWSInstanceCheck(ctx, &protoReq) - return msg, metadata, err -} - // RegisterServerServiceHandlerServer registers the http handlers for service ServerService to "mux". // UnaryRPC :call ServerServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServerServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerServiceServer) error { mux.Handle("GET", pattern_ServerService_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -446,51 +415,27 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_ServerService_AWSInstanceCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/server.v1.ServerService/AWSInstanceCheck", runtime.WithHTTPPathPattern("/v1/server/AWSInstance")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ServerService_AWSInstanceCheck_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServerService_AWSInstanceCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } // RegisterServerServiceHandlerFromEndpoint is same as RegisterServerServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterServerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -508,7 +453,7 @@ func RegisterServerServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServerServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServerServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ServerServiceClient" to call the correct interceptors. +// "ServerServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerServiceClient) error { mux.Handle("GET", pattern_ServerService_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -678,27 +623,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_ServerService_AWSInstanceCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/server.v1.ServerService/AWSInstanceCheck", runtime.WithHTTPPathPattern("/v1/server/AWSInstance")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ServerService_AWSInstanceCheck_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServerService_AWSInstanceCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } @@ -718,8 +642,6 @@ var ( pattern_ServerService_GetSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "settings"}, "")) pattern_ServerService_ChangeSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "settings"}, "")) - - pattern_ServerService_AWSInstanceCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "AWSInstance"}, "")) ) var ( @@ -738,6 +660,4 @@ var ( forward_ServerService_GetSettings_0 = runtime.ForwardResponseMessage forward_ServerService_ChangeSettings_0 = runtime.ForwardResponseMessage - - forward_ServerService_AWSInstanceCheck_0 = runtime.ForwardResponseMessage ) diff --git a/api/server/v1/server.pb.validate.go b/api/server/v1/server.pb.validate.go index 42336b9c6d..39897b8317 100644 --- a/api/server/v1/server.pb.validate.go +++ b/api/server/v1/server.pb.validate.go @@ -2900,218 +2900,3 @@ var _ interface { Cause() error ErrorName() string } = ChangeSettingsResponseValidationError{} - -// Validate checks the field values on AWSInstanceCheckRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AWSInstanceCheckRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AWSInstanceCheckRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AWSInstanceCheckRequestMultiError, or nil if none found. -func (m *AWSInstanceCheckRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *AWSInstanceCheckRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetInstanceId()) < 1 { - err := AWSInstanceCheckRequestValidationError{ - field: "InstanceId", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AWSInstanceCheckRequestMultiError(errors) - } - - return nil -} - -// AWSInstanceCheckRequestMultiError is an error wrapping multiple validation -// errors returned by AWSInstanceCheckRequest.ValidateAll() if the designated -// constraints aren't met. -type AWSInstanceCheckRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AWSInstanceCheckRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AWSInstanceCheckRequestMultiError) AllErrors() []error { return m } - -// AWSInstanceCheckRequestValidationError is the validation error returned by -// AWSInstanceCheckRequest.Validate if the designated constraints aren't met. -type AWSInstanceCheckRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AWSInstanceCheckRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AWSInstanceCheckRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AWSInstanceCheckRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AWSInstanceCheckRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AWSInstanceCheckRequestValidationError) ErrorName() string { - return "AWSInstanceCheckRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e AWSInstanceCheckRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAWSInstanceCheckRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AWSInstanceCheckRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AWSInstanceCheckRequestValidationError{} - -// Validate checks the field values on AWSInstanceCheckResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AWSInstanceCheckResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AWSInstanceCheckResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AWSInstanceCheckResponseMultiError, or nil if none found. -func (m *AWSInstanceCheckResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *AWSInstanceCheckResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return AWSInstanceCheckResponseMultiError(errors) - } - - return nil -} - -// AWSInstanceCheckResponseMultiError is an error wrapping multiple validation -// errors returned by AWSInstanceCheckResponse.ValidateAll() if the designated -// constraints aren't met. -type AWSInstanceCheckResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AWSInstanceCheckResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AWSInstanceCheckResponseMultiError) AllErrors() []error { return m } - -// AWSInstanceCheckResponseValidationError is the validation error returned by -// AWSInstanceCheckResponse.Validate if the designated constraints aren't met. -type AWSInstanceCheckResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AWSInstanceCheckResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AWSInstanceCheckResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AWSInstanceCheckResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AWSInstanceCheckResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AWSInstanceCheckResponseValidationError) ErrorName() string { - return "AWSInstanceCheckResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e AWSInstanceCheckResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAWSInstanceCheckResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AWSInstanceCheckResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AWSInstanceCheckResponseValidationError{} diff --git a/api/server/v1/server.proto b/api/server/v1/server.proto index c65d7c3a65..527ff71a27 100644 --- a/api/server/v1/server.proto +++ b/api/server/v1/server.proto @@ -202,13 +202,6 @@ message ChangeSettingsResponse { Settings settings = 1; } -message AWSInstanceCheckRequest { - // AWS EC2 instance ID (i-1234567890abcdef0). - string instance_id = 1 [(validate.rules).string.min_len = 1]; -} - -message AWSInstanceCheckResponse {} - // Server service provides generic PMM Server public APIs. service ServerService { // Version returns PMM Server versions. @@ -285,12 +278,4 @@ service ServerService { description: "Changes PMM Server settings." }; } - // AWSInstanceCheck checks AWS EC2 instance ID. - rpc AWSInstanceCheck(AWSInstanceCheckRequest) returns (AWSInstanceCheckResponse) { - option (google.api.http) = {get: "/v1/server/AWSInstance"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "AWS instance check" - description: "Checks AWS EC2 instance ID." - }; - } } diff --git a/api/server/v1/server_grpc.pb.go b/api/server/v1/server_grpc.pb.go index 4f2478952e..708f24cadf 100644 --- a/api/server/v1/server_grpc.pb.go +++ b/api/server/v1/server_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: server/v1/server.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ServerService_Version_FullMethodName = "/server.v1.ServerService/Version" @@ -28,12 +28,13 @@ const ( ServerService_UpdateStatus_FullMethodName = "/server.v1.ServerService/UpdateStatus" ServerService_GetSettings_FullMethodName = "/server.v1.ServerService/GetSettings" ServerService_ChangeSettings_FullMethodName = "/server.v1.ServerService/ChangeSettings" - ServerService_AWSInstanceCheck_FullMethodName = "/server.v1.ServerService/AWSInstanceCheck" ) // ServerServiceClient is the client API for ServerService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Server service provides generic PMM Server public APIs. type ServerServiceClient interface { // Version returns PMM Server versions. Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) @@ -52,8 +53,6 @@ type ServerServiceClient interface { GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) // ChangeSettings changes PMM Server settings. ChangeSettings(ctx context.Context, in *ChangeSettingsRequest, opts ...grpc.CallOption) (*ChangeSettingsResponse, error) - // AWSInstanceCheck checks AWS EC2 instance ID. - AWSInstanceCheck(ctx context.Context, in *AWSInstanceCheckRequest, opts ...grpc.CallOption) (*AWSInstanceCheckResponse, error) } type serverServiceClient struct { @@ -65,8 +64,9 @@ func NewServerServiceClient(cc grpc.ClientConnInterface) ServerServiceClient { } func (c *serverServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VersionResponse) - err := c.cc.Invoke(ctx, ServerService_Version_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_Version_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -74,8 +74,9 @@ func (c *serverServiceClient) Version(ctx context.Context, in *VersionRequest, o } func (c *serverServiceClient) Readiness(ctx context.Context, in *ReadinessRequest, opts ...grpc.CallOption) (*ReadinessResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadinessResponse) - err := c.cc.Invoke(ctx, ServerService_Readiness_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_Readiness_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -83,8 +84,9 @@ func (c *serverServiceClient) Readiness(ctx context.Context, in *ReadinessReques } func (c *serverServiceClient) LeaderHealthCheck(ctx context.Context, in *LeaderHealthCheckRequest, opts ...grpc.CallOption) (*LeaderHealthCheckResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LeaderHealthCheckResponse) - err := c.cc.Invoke(ctx, ServerService_LeaderHealthCheck_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_LeaderHealthCheck_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -92,8 +94,9 @@ func (c *serverServiceClient) LeaderHealthCheck(ctx context.Context, in *LeaderH } func (c *serverServiceClient) CheckUpdates(ctx context.Context, in *CheckUpdatesRequest, opts ...grpc.CallOption) (*CheckUpdatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckUpdatesResponse) - err := c.cc.Invoke(ctx, ServerService_CheckUpdates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_CheckUpdates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -101,8 +104,9 @@ func (c *serverServiceClient) CheckUpdates(ctx context.Context, in *CheckUpdates } func (c *serverServiceClient) StartUpdate(ctx context.Context, in *StartUpdateRequest, opts ...grpc.CallOption) (*StartUpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartUpdateResponse) - err := c.cc.Invoke(ctx, ServerService_StartUpdate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_StartUpdate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -110,8 +114,9 @@ func (c *serverServiceClient) StartUpdate(ctx context.Context, in *StartUpdateRe } func (c *serverServiceClient) UpdateStatus(ctx context.Context, in *UpdateStatusRequest, opts ...grpc.CallOption) (*UpdateStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateStatusResponse) - err := c.cc.Invoke(ctx, ServerService_UpdateStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_UpdateStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -119,8 +124,9 @@ func (c *serverServiceClient) UpdateStatus(ctx context.Context, in *UpdateStatus } func (c *serverServiceClient) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSettingsResponse) - err := c.cc.Invoke(ctx, ServerService_GetSettings_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_GetSettings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -128,17 +134,9 @@ func (c *serverServiceClient) GetSettings(ctx context.Context, in *GetSettingsRe } func (c *serverServiceClient) ChangeSettings(ctx context.Context, in *ChangeSettingsRequest, opts ...grpc.CallOption) (*ChangeSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangeSettingsResponse) - err := c.cc.Invoke(ctx, ServerService_ChangeSettings_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serverServiceClient) AWSInstanceCheck(ctx context.Context, in *AWSInstanceCheckRequest, opts ...grpc.CallOption) (*AWSInstanceCheckResponse, error) { - out := new(AWSInstanceCheckResponse) - err := c.cc.Invoke(ctx, ServerService_AWSInstanceCheck_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ServerService_ChangeSettings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -147,7 +145,9 @@ func (c *serverServiceClient) AWSInstanceCheck(ctx context.Context, in *AWSInsta // ServerServiceServer is the server API for ServerService service. // All implementations must embed UnimplementedServerServiceServer -// for forward compatibility +// for forward compatibility. +// +// Server service provides generic PMM Server public APIs. type ServerServiceServer interface { // Version returns PMM Server versions. Version(context.Context, *VersionRequest) (*VersionResponse, error) @@ -166,12 +166,14 @@ type ServerServiceServer interface { GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) // ChangeSettings changes PMM Server settings. ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) - // AWSInstanceCheck checks AWS EC2 instance ID. - AWSInstanceCheck(context.Context, *AWSInstanceCheckRequest) (*AWSInstanceCheckResponse, error) mustEmbedUnimplementedServerServiceServer() } -// UnimplementedServerServiceServer must be embedded to have forward compatible implementations. +// UnimplementedServerServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedServerServiceServer struct{} func (UnimplementedServerServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { @@ -205,11 +207,8 @@ func (UnimplementedServerServiceServer) GetSettings(context.Context, *GetSetting func (UnimplementedServerServiceServer) ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSettings not implemented") } - -func (UnimplementedServerServiceServer) AWSInstanceCheck(context.Context, *AWSInstanceCheckRequest) (*AWSInstanceCheckResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AWSInstanceCheck not implemented") -} func (UnimplementedServerServiceServer) mustEmbedUnimplementedServerServiceServer() {} +func (UnimplementedServerServiceServer) testEmbeddedByValue() {} // UnsafeServerServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ServerServiceServer will @@ -219,6 +218,13 @@ type UnsafeServerServiceServer interface { } func RegisterServerServiceServer(s grpc.ServiceRegistrar, srv ServerServiceServer) { + // If the following call pancis, it indicates UnimplementedServerServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ServerService_ServiceDesc, srv) } @@ -366,24 +372,6 @@ func _ServerService_ChangeSettings_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _ServerService_AWSInstanceCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AWSInstanceCheckRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServerServiceServer).AWSInstanceCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ServerService_AWSInstanceCheck_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServerServiceServer).AWSInstanceCheck(ctx, req.(*AWSInstanceCheckRequest)) - } - return interceptor(ctx, in, info, handler) -} - // ServerService_ServiceDesc is the grpc.ServiceDesc for ServerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -423,10 +411,6 @@ var ServerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ChangeSettings", Handler: _ServerService_ChangeSettings_Handler, }, - { - MethodName: "AWSInstanceCheck", - Handler: _ServerService_AWSInstanceCheck_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "server/v1/server.proto", diff --git a/api/swagger/header.json b/api/swagger/header.json index 881b0fb2bb..15009b0031 100644 --- a/api/swagger/header.json +++ b/api/swagger/header.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "PMM API", - "version": "public" + "version": "v3" }, "schemes": [ "https", @@ -25,5 +25,6 @@ "node", "python" ] - } + }, + "x-readme-id": "622892a957a7410330bc6184" } diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 917c75e4ca..cf32bb6f3a 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -26706,65 +26706,6 @@ } } }, - "/v1/server/AWSInstance": { - "get": { - "description": "Checks AWS EC2 instance ID.", - "tags": [ - "ServerService" - ], - "summary": "AWS instance check", - "operationId": "AWSInstanceCheck", - "parameters": [ - { - "type": "string", - "description": "AWS EC2 instance ID (i-1234567890abcdef0).", - "name": "instance_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", - "type": "object", - "properties": { - "@type": { - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/server/leaderHealthCheck": { "get": { "description": "Checks if the instance is the leader in a cluster. Returns an error if the instance isn't the leader.", diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 872fef72b9..53ea07bff3 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -12,7 +12,7 @@ "swagger": "2.0", "info": { "title": "PMM API", - "version": "public" + "version": "v3" }, "paths": { "/v1/actions/{action_id}": { @@ -25748,65 +25748,6 @@ } } }, - "/v1/server/AWSInstance": { - "get": { - "description": "Checks AWS EC2 instance ID.", - "tags": [ - "ServerService" - ], - "summary": "AWS instance check", - "operationId": "AWSInstanceCheck", - "parameters": [ - { - "type": "string", - "description": "AWS EC2 instance ID (i-1234567890abcdef0).", - "name": "instance_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", - "type": "object", - "properties": { - "@type": { - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/server/leaderHealthCheck": { "get": { "description": "Checks if the instance is the leader in a cluster. Returns an error if the instance isn't the leader.", @@ -27171,5 +27112,6 @@ "node", "python" ] - } + }, + "x-readme-id": "622892a957a7410330bc6184" } \ No newline at end of file diff --git a/api/uievents/v1/server.pb.gw.go b/api/uievents/v1/server.pb.gw.go index 3047c99b7b..784ea0403f 100644 --- a/api/uievents/v1/server.pb.gw.go +++ b/api/uievents/v1/server.pb.gw.go @@ -61,6 +61,7 @@ func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtim // UnaryRPC :call UIEventsServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUIEventsServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUIEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UIEventsServiceServer) error { mux.Handle("POST", pattern_UIEventsService_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -92,21 +93,21 @@ func RegisterUIEventsServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterUIEventsServiceHandlerFromEndpoint is same as RegisterUIEventsServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterUIEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -124,7 +125,7 @@ func RegisterUIEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UIEventsServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UIEventsServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "UIEventsServiceClient" to call the correct interceptors. +// "UIEventsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUIEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UIEventsServiceClient) error { mux.Handle("POST", pattern_UIEventsService_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/uievents/v1/server_grpc.pb.go b/api/uievents/v1/server_grpc.pb.go index 24286b2837..b763803e1f 100644 --- a/api/uievents/v1/server_grpc.pb.go +++ b/api/uievents/v1/server_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: uievents/v1/server.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( UIEventsService_Store_FullMethodName = "/uievents.v1.UIEventsService/Store" @@ -26,6 +26,8 @@ const ( // UIEventsServiceClient is the client API for UIEventsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// UIEvents collects UI related events. type UIEventsServiceClient interface { // Store persists received UI events for further processing. Store(ctx context.Context, in *StoreRequest, opts ...grpc.CallOption) (*StoreResponse, error) @@ -40,8 +42,9 @@ func NewUIEventsServiceClient(cc grpc.ClientConnInterface) UIEventsServiceClient } func (c *uIEventsServiceClient) Store(ctx context.Context, in *StoreRequest, opts ...grpc.CallOption) (*StoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StoreResponse) - err := c.cc.Invoke(ctx, UIEventsService_Store_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, UIEventsService_Store_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -50,20 +53,27 @@ func (c *uIEventsServiceClient) Store(ctx context.Context, in *StoreRequest, opt // UIEventsServiceServer is the server API for UIEventsService service. // All implementations must embed UnimplementedUIEventsServiceServer -// for forward compatibility +// for forward compatibility. +// +// UIEvents collects UI related events. type UIEventsServiceServer interface { // Store persists received UI events for further processing. Store(context.Context, *StoreRequest) (*StoreResponse, error) mustEmbedUnimplementedUIEventsServiceServer() } -// UnimplementedUIEventsServiceServer must be embedded to have forward compatible implementations. +// UnimplementedUIEventsServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedUIEventsServiceServer struct{} func (UnimplementedUIEventsServiceServer) Store(context.Context, *StoreRequest) (*StoreResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Store not implemented") } func (UnimplementedUIEventsServiceServer) mustEmbedUnimplementedUIEventsServiceServer() {} +func (UnimplementedUIEventsServiceServer) testEmbeddedByValue() {} // UnsafeUIEventsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to UIEventsServiceServer will @@ -73,6 +83,13 @@ type UnsafeUIEventsServiceServer interface { } func RegisterUIEventsServiceServer(s grpc.ServiceRegistrar, srv UIEventsServiceServer) { + // If the following call pancis, it indicates UnimplementedUIEventsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&UIEventsService_ServiceDesc, srv) } diff --git a/api/user/v1/user.pb.gw.go b/api/user/v1/user.pb.gw.go index b5ae95a1b3..890714f191 100644 --- a/api/user/v1/user.pb.gw.go +++ b/api/user/v1/user.pb.gw.go @@ -93,6 +93,7 @@ func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtim // UnaryRPC :call UserServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -172,21 +173,21 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -204,7 +205,7 @@ func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "UserServiceClient" to call the correct interceptors. +// "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error { mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) diff --git a/api/user/v1/user_grpc.pb.go b/api/user/v1/user_grpc.pb.go index a9da42671e..2a74efe6ff 100644 --- a/api/user/v1/user_grpc.pb.go +++ b/api/user/v1/user_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: user/v1/user.proto @@ -16,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( UserService_GetUser_FullMethodName = "/user.v1.UserService/GetUser" @@ -28,6 +28,8 @@ const ( // UserServiceClient is the client API for UserService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// UserService contains rpcs related to user data type UserServiceClient interface { GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) @@ -43,8 +45,9 @@ func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { } func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserResponse) - err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -52,8 +55,9 @@ func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opt } func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateUserResponse) - err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +65,9 @@ func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserReques } func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListUsersResponse) - err := c.cc.Invoke(ctx, UserService_ListUsers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, UserService_ListUsers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -71,7 +76,9 @@ func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, // UserServiceServer is the server API for UserService service. // All implementations must embed UnimplementedUserServiceServer -// for forward compatibility +// for forward compatibility. +// +// UserService contains rpcs related to user data type UserServiceServer interface { GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) @@ -79,7 +86,11 @@ type UserServiceServer interface { mustEmbedUnimplementedUserServiceServer() } -// UnimplementedUserServiceServer must be embedded to have forward compatible implementations. +// UnimplementedUserServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. type UnimplementedUserServiceServer struct{} func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { @@ -94,6 +105,7 @@ func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersReque return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {} +func (UnimplementedUserServiceServer) testEmbeddedByValue() {} // UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to UserServiceServer will @@ -103,6 +115,13 @@ type UnsafeUserServiceServer interface { } func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { + // If the following call pancis, it indicates UnimplementedUserServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&UserService_ServiceDesc, srv) } diff --git a/build/Makefile b/build/Makefile index 66da3fddb0..8640220610 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,5 +1,6 @@ export PACKER_CACHE_DIR := .cache export PACKER_VERSION := 1.9.4 +export PMM_SERVER_IMAGE ?= docker.io/perconalab/pmm-server:3-dev-latest ## ----------------- PACKER ------------------ fetch: @@ -21,8 +22,7 @@ deps: unzip -o ${PACKER_CACHE_DIR}/packer.zip -d ~/bin pmm-ovf: fetch - /usr/bin/packer build \ - -only virtualbox-ovf -color=false packer/pmm.json | tee build.log + /usr/bin/packer build -var 'pmm_server_image_name=${PMM_SERVER_IMAGE}' -only virtualbox-ovf -color=false packer/pmm.json | tee build.log pmm-digitalocean: packer build -only digitalocean -var 'single_disk=true' packer/pmm.json @@ -32,7 +32,7 @@ pmm-azure: pmm-ami: docker run --rm -v ${HOME}/.aws:/root/.aws -v `pwd`:/build -w /build \hashicorp/packer:${PACKER_VERSION} \ - build -only amazon-ebs -color=false packer/pmm.json | tee build.log + build -var 'pmm_server_image_name=${PMM_SERVER_IMAGE}' -only amazon-ebs -color=false packer/pmm.json | tee build.log ## ----------------- PACKER ------------------ check: ## Run required checks and linters diff --git a/build/ansible/roles/init-admin-password-ami/tasks/main.yml b/build/ansible/roles/init-admin-password-ami/tasks/main.yml new file mode 100644 index 0000000000..9275e0dd56 --- /dev/null +++ b/build/ansible/roles/init-admin-password-ami/tasks/main.yml @@ -0,0 +1,10 @@ +- name: Fetch instance metadata + uri: + url: http://169.254.169.254/latest/meta-data/instance-id + return_content: yes + register: jsondata + +- debug: msg="Instance ID {{ jsondata['content'] }}" + +- name: change admin password + command: change-admin-password {{ jsondata['content'] }} diff --git a/build/ansible/roles/initialization/tasks/main.yml b/build/ansible/roles/initialization/tasks/main.yml index fdbe31c9b2..8715815ad3 100644 --- a/build/ansible/roles/initialization/tasks/main.yml +++ b/build/ansible/roles/initialization/tasks/main.yml @@ -1,5 +1,21 @@ --- # This role contains tasks executed during initialization of PMM Server +- name: detect /srv/pmm-distribution + slurp: + path: /srv/pmm-distribution + register: pmm_distribution + ignore_errors: True + +- name: detect AMI + set_fact: + is_ami: "{{ pmm_distribution['content'] | b64decode | trim == 'ami' }}" + when: pmm_distribution['failed'] == false + +- name: Set PMM distribution + set_fact: + is_ami: "False" + when: pmm_distribution['failed'] == true + - name: Get current version slurp: src: /srv/grafana/PERCONA_DASHBOARDS_VERSION @@ -25,63 +41,102 @@ set_fact: pmm_image_version: "{{ image_version_file['content'] | b64decode | trim }}" +- name: Set need_initialization fact + set_fact: + need_initialization: "{{ current_version_file['failed'] == true }}" + - name: Set need_upgrade fact set_fact: need_upgrade: "{{ pmm_current_version is version(pmm_image_version, '<') }}" +- name: Print PMM distribution + debug: + msg: "PMM distribution: {{ pmm_distribution }}, Is AMI: {{ is_ami }}" + - name: Print current PMM and image versions debug: msg: "Current version: {{ pmm_current_version }} Image Version: {{ pmm_image_version }}" +- name: Print need_initialization fact + debug: + msg: "Need initialization: {{ need_initialization }}" + - name: Print need_upgrade fact debug: msg: "Need upgrade: {{ need_upgrade }}" -- name: Perform upgrade tasks +- name: Perform upgrade & init tasks block: - - name: Enable maintenance mode before upgrade - copy: - src: maintenance.html - dest: /usr/share/pmm-server/maintenance/ - owner: pmm - group: pmm - mode: 0644 - - - name: Upgrade dashboards - include_role: - name: dashboards - - - name: Copy file with image version - copy: - src: /usr/share/percona-dashboards/VERSION - dest: /srv/grafana/PERCONA_DASHBOARDS_VERSION - owner: pmm - group: pmm - mode: 0644 - remote_src: yes - - - name: Create a backup directory - file: - path: /srv/backup - state: directory - owner: pmm - group: pmm - mode: 0775 - - # Note: we want to leave this for some time until we achieve stable builds - - name: Output pmm-managed logs - shell: sleep 10 && tail -n 300 /srv/logs/pmm-managed.log - - - name: Wait for PMM to be ready - ansible.builtin.uri: - url: "http://127.0.0.1:7772/v1/server/readyz" - status_code: 200 - method: GET - retries: 20 - delay: 5 - - - name: Disable maintenance mode - file: - state: absent - path: /usr/share/pmm-server/maintenance/maintenance.html - when: need_upgrade + - name: Enable maintenance mode before upgrade + copy: + src: maintenance.html + dest: /usr/share/pmm-server/maintenance/ + owner: pmm + group: pmm + mode: 0644 + + - name: Create grafana DB + block: + - name: Create grafana database in postgres + postgresql_db: + name: grafana + login_user: postgres + state: present + + - name: Create grafana user in postgres + postgresql_user: + db: grafana + name: grafana + password: grafana + priv: 'ALL' + expires: infinity + login_user: postgres + state: present + when: not ansible_check_mode + when: lookup('env','GF_DATABASE_URL') == '' and lookup('env','GF_DATABASE_HOST') == '' and need_initialization + + - name: Upgrade/Install dashboards + include_role: + name: dashboards + + - name: Copy file with image version + copy: + src: /usr/share/percona-dashboards/VERSION + dest: /srv/grafana/PERCONA_DASHBOARDS_VERSION + owner: pmm + group: pmm + mode: 0644 + remote_src: yes + + - name: Create a backup directory + file: + path: /srv/backup + state: directory + owner: pmm + group: pmm + mode: 0775 + when: need_upgrade + + # Note: we want to leave this for some time until we achieve stable builds + - name: Output pmm-managed logs + shell: sleep 10 && tail -n 300 /srv/logs/pmm-managed.log + + - name: Wait for PMM to be ready + ansible.builtin.uri: + url: "http://127.0.0.1:7772/v1/server/readyz" + status_code: 200 + method: GET + retries: 20 + delay: 5 + ignore_errors: yes + + - name: init admin password on AMI + include_role: + name: init-admin-password-ami + when: need_initialization and is_ami + + - name: Disable maintenance mode + file: + state: absent + path: /usr/share/pmm-server/maintenance/maintenance.html + when: need_initialization or need_upgrade diff --git a/build/ansible/roles/nginx/files/conf.d/pmm.conf b/build/ansible/roles/nginx/files/conf.d/pmm.conf index 21623d8831..c4ac6155bd 100644 --- a/build/ansible/roles/nginx/files/conf.d/pmm.conf +++ b/build/ansible/roles/nginx/files/conf.d/pmm.conf @@ -73,13 +73,9 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Enable auth_request for all locations, including root - # (but excluding /auth_request and /setup below). + # (but excluding /auth_request). auth_request /auth_request; - # Store the value of X-Must-Setup header of auth_request subrequest response in the variable. - # It is used below in /auth_request. - auth_request_set $auth_request_must_setup $upstream_http_x_must_setup; - # Store the value of X-Proxy-Filter header of auth_request subrequest response in the variable. auth_request_set $auth_request_proxy_filter $upstream_http_x_proxy_filter; proxy_set_header X-Proxy-Filter $auth_request_proxy_filter; @@ -109,23 +105,11 @@ proxy_http_version 1.1; proxy_set_header Connection ""; - # This header is set only for to the second request, not for the first subrequest. - # That variable is set above. - proxy_set_header X-Must-Setup $auth_request_must_setup; - # Those headers are set for both subrequest and normal request. proxy_set_header X-Original-Uri $request_uri; proxy_set_header X-Original-Method $request_method; } - # AWS setup wizard - location /setup { - auth_request off; - - alias /usr/share/percona-dashboards/setup-page; - try_files $uri /index.html break; - } - # PMM UI location /pmm-ui { # Will redirect on FE to login page if user is not authenticated diff --git a/build/docker/server/entrypoint.sh b/build/docker/server/entrypoint.sh index df1e5b755e..4b7b0b7f93 100755 --- a/build/docker/server/entrypoint.sh +++ b/build/docker/server/entrypoint.sh @@ -1,6 +1,8 @@ #!/bin/bash set -o errexit +PMM_DISTRIBUTION_METHOD="${PMM_DISTRIBUTION_METHOD:-docker}" + if [ ! -w /srv ]; then echo "FATAL: /srv is not writable for $(whoami) user." >&2 echo "Please make sure that /srv is owned by uid $(id -u) and gid $(id -g) and try again." >&2 @@ -11,12 +13,12 @@ fi # Initialize /srv if empty DIST_FILE=/srv/pmm-distribution if [ ! -f $DIST_FILE ]; then - echo "File $DIST_FILE doesn't exist. Initializing /srv..." - echo docker > $DIST_FILE + echo $PMM_DISTRIBUTION_METHOD > $DIST_FILE + echo "Initializing /srv..." mkdir -p /srv/{backup,clickhouse,grafana,logs,nginx,postgres14,prometheus,victoriametrics} echo "Copying grafana plugins and the VERSION file..." + mkdir -p /srv/grafana/plugins cp -r /usr/share/percona-dashboards/panels/* /srv/grafana/plugins - cp /usr/share/percona-dashboards/VERSION /srv/grafana/PERCONA_DASHBOARDS_VERSION echo "Generating self-signed certificates for nginx..." bash /var/lib/cloud/scripts/per-boot/generate-ssl-certificate @@ -26,8 +28,6 @@ if [ ! -f $DIST_FILE ]; then echo "Enabling pg_stat_statements extension for PostgreSQL..." /usr/pgsql-14/bin/pg_ctl start -D /srv/postgres14 -o '-c logging_collector=off' - # We create the postgres user with superuser privileges to not break the code that connects pmm-managed to postgres. - /usr/pgsql-14/bin/createuser --echo --superuser --host=/run/postgresql --no-password postgres /usr/bin/psql postgres postgres -c 'CREATE EXTENSION pg_stat_statements SCHEMA public' /usr/pgsql-14/bin/pg_ctl stop -D /srv/postgres14 fi diff --git a/build/packages/rpm/server/SPECS/percona-dashboards.spec b/build/packages/rpm/server/SPECS/percona-dashboards.spec index 5a1a895ed3..eb964ce17f 100644 --- a/build/packages/rpm/server/SPECS/percona-dashboards.spec +++ b/build/packages/rpm/server/SPECS/percona-dashboards.spec @@ -7,7 +7,7 @@ %global commit ad4af6808bcd361284e8eb8cd1f36b1e98e32bce %global shortcommit %(c=%{commit}; echo ${c:0:7}) %define build_timestamp %(date -u +"%y%m%d%H%M") -%define release 21 +%define release 22 %define rpm_release %{release}.%{build_timestamp}.%{shortcommit}%{?dist} Name: percona-dashboards @@ -42,11 +42,9 @@ make release %install install -d %{buildroot}%{_datadir}/%{name} install -d %{buildroot}%{_datadir}/%{name}/panels/pmm-app -install -d %{buildroot}%{_datadir}/%{name}/setup-page cp -a ./panels %{buildroot}%{_datadir}/%{name} cp -a ./pmm-app/dist %{buildroot}%{_datadir}/%{name}/panels/pmm-app -cp -ra ./setup-page/build/* %{buildroot}%{_datadir}/%{name}/setup-page echo %{version} > %{buildroot}%{_datadir}/%{name}/VERSION @@ -57,6 +55,9 @@ echo %{version} > %{buildroot}%{_datadir}/%{name}/VERSION %changelog +* Tue Jul 23 2024 Nurlan Moldomurov - 3.0.0-22 +- PMM-13053 Remove /setup page + * Wed Nov 29 2023 Alex Demidoff - 3.0.0-21 - PMM-12693 Run Grafana as non-root user diff --git a/build/packer/README.md b/build/packer/README.md new file mode 100644 index 0000000000..bd55717741 --- /dev/null +++ b/build/packer/README.md @@ -0,0 +1,16 @@ +# Packer templates to build the agents on AWS and DigitalOcean + +### Building agents + +- AWS: `packer build aws.pkr.hcl` + - build only amd64: `packer build -only=jenkins-farm.amazon-ebs.agent aws.pkr.hcl` + - build only arm64: `packer build -only=jenkins-farm.amazon-ebs.arm-agent aws.pkr.hcl` +- DigitalOcean: `packer build -color=false do.pkr.hcl` + +### Turn on logging + +Run: +``` + PACKER_LOG_PATH="packer.log" PACKER_LOG=1 packer build aws.pkr.hcl + PACKER_LOG_PATH="packer.log" PACKER_LOG=1 packer build do.pkr.hcl +``` diff --git a/build/packer/ansible/agent-aws.yml b/build/packer/ansible/agent-aws.yml new file mode 100644 index 0000000000..f5d8c84ef9 --- /dev/null +++ b/build/packer/ansible/agent-aws.yml @@ -0,0 +1,293 @@ +--- +- name: "Provision an AWS Agent" + hosts: default + become: true + vars: + docker_compose_version: "2.26.1" + kubectl_version: "1.29.2" + doctl_version: "1.105.0" + node_version: "18.x" + + tasks: + - name: Detect vm architecture + set_fact: + # Alternative architecture name just because we never can have only one name in computers + ansible_architecture_alt: "{% if ansible_architecture == 'x86_64' %}amd64{% elif ansible_architecture == 'aarch64' %}arm64{% else %}none{% endif %}" + + - name: Upgrade OS packages + yum: + name: "*" + state: latest + + - name: Add a repository for NodeJS + shell: "curl -fsSL https://rpm.nodesource.com/setup_{{ node_version }} | bash -" + + - name: Install packages + package: + name: + - docker + - git + - jq + - gettext + - unzip + - python3 + - svn # we use it in pmm-framework.sh + - php # we use PHP in pmm-qa repo + - php-mysqlnd + - php-pdo + - wget + - kernel-devel + - kernel-headers + - gcc + - make + - perl + # - p7zip + - nodejs + state: present + + - name: Install Java17 + package: + name: jdk-17-headless + state: present + + - name: Install pip3 and ansible + package: + name: + - python3-pip + - ansible-core + - glibc-langpack-en + state: present + + - name: Install ansible collections + shell: "ansible-galaxy collection install {{ item }}" + loop: + - ansible.posix + - community.general + - community.postgresql + + - name: Install bats + shell: "npm install -g bats" + + - name: Install docker-compose + get_url: + url: "https://github.com/docker/compose/releases/download/v{{ docker_compose_version }}/docker-compose-linux-{{ ansible_architecture }}" + dest: /usr/local/bin/docker-compose + mode: "u+x,g+x,o+x" + + - name: Install kubectl + get_url: + url: https://storage.googleapis.com/kubernetes-release/release/v{{ kubectl_version }}/bin/linux/{{ ansible_architecture_alt }}/kubectl + dest: /usr/local/bin/kubectl + mode: "u+x,g+x,o+x" + + - name: Install lacework + get_url: + url: "https://github.com/lacework/lacework-vulnerability-scanner/releases/latest/download/lw-scanner-linux-{{ ansible_architecture_alt }}" + dest: /usr/local/bin/lw-scanner + mode: "u+x,g+x,o+x" + + - name: Install chromium + shell: "dnf install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm" + when: ansible_architecture == "x86_64" + # NOTE: no chromium package for arm64 + + - name: Install doctl client for digital ocean + get_url: + url: https://github.com/digitalocean/doctl/releases/download/v{{ doctl_version }}/doctl-{{ doctl_version }}-linux-{{ ansible_architecture_alt }}.tar.gz + dest: /tmp/doctl.tar.gz + + - name: Unarchive a file with doctl + unarchive: + src: /tmp/doctl.tar.gz + dest: /usr/local/bin + remote_src: yes + mode: "u+x,g+x,o+x" + + - name: Instal yq + get_url: + url: https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + dest: /usr/bin/yq + mode: "555" + + - name: Install Python's virtualenv + pip: + name: virtualenv + + - name: Install Python modules + pip: + name: "{{ item }}" + virtualenv: /home/ec2-user/venv + loop: # Lookup versions at: https://pypi.org/search/ + - pyaml==24.7.0 + - GitPython==3.1.43 + - PyGithub==2.3.0 + - python-digitalocean==1.17.0 + - docker==7.1.0 + - linode-cli==5.50.0 + + - name: Copy docker daemon config + copy: + src: daemon.json + dest: /etc/docker/daemon.json + + - name: Enable Docker service + systemd: + name: docker.service + state: started + enabled: yes + + - name: Download and unarchive AWS installer + unarchive: + src: https://awscli.amazonaws.com/awscli-exe-linux-{{ ansible_architecture }}.zip + dest: /tmp + remote_src: yes + + - name: Run awscli installer + shell: /tmp/aws/install + + - name: Remove files + file: + path: "{{ item }}" + state: absent + loop: + - /tmp/doctl.tar.gz + - /tmp/aws + + - name: Add ec2-user user to "docker" group + user: + name: "ec2-user" + groups: + - "docker" + append: yes + + - name: Pull and cache docker images + docker_image: + name: "{{ item }}" + source: pull + loop: + - debian:buster + - debian:bullseye + - debian:bookworm + - ubuntu:focal + - ubuntu:jammy + - ubuntu:noble + - rockylinux:8 + - oraclelinux:9 + + - name: Turn off swap + sysctl: + name: vm.swappiness + value: 0 + state: present + + - name: Increase dirty ratio + sysctl: + name: vm.dirty_ratio + value: 80 + state: present + + - name: Decrease dirty_background_ratio + sysctl: + name: vm.dirty_background_ratio + value: 5 + + - name: Increase dirty_expire_centisecs + sysctl: + name: vm.dirty_expire_centisecs + value: 12000 #120 sec + + - name: Increase net.core.somaxconn + sysctl: + name: net.core.somaxconn + value: 1024 + + - name: Increase net.core.netdev_max_backlog + sysctl: + name: net.core.netdev_max_backlog + value: 5000 + + - name: Increase net.core.rmem_max + sysctl: + name: net.core.rmem_max + value: 16777216 + + - name: Increase net.core.wmem_max + sysctl: + name: net.core.wmem_max + value: 16777216 + + - name: Increase net.ipv4.tcp_wmem + sysctl: + name: net.ipv4.tcp_wmem + value: 4096 12582912 16777216 + + - name: Increase net.ipv4.tcp_rmem + sysctl: + name: net.ipv4.tcp_rmem + value: 4096 12582912 16777216 + + - name: Increase net.ipv4.tcp_max_syn_backlog + sysctl: + name: net.ipv4.tcp_max_syn_backlog + value: 8192 + + - name: Disable net.ipv4.tcp_slow_start_after_idle + sysctl: + name: net.ipv4.tcp_slow_start_after_idle + value: 0 + + - name: Enable net.ipv4.tcp_tw_reuse + sysctl: + name: net.ipv4.tcp_tw_reuse + value: 1 + + - name: Change net.ipv4.ip_local_port_range + sysctl: + name: net.ipv4.ip_local_port_range + value: 10240 65535 + + - name: Change TCP Congestion Control Algorithm (net.ipv4.tcp_congestion_control) + sysctl: + name: net.ipv4.tcp_congestion_control + value: bbr + + - name: Change net.ipv4.tcp_syn_retries + sysctl: + name: net.ipv4.tcp_syn_retries + value: 2 + + - name: Change BBR algoritm + sysctl: + name: net.core.default_qdisc + value: fq + + - name: Increase kernel.perf_event_max_stack + sysctl: + name: kernel.perf_event_max_stack + value: 1023 + + - name: Increase fs.xfs.xfssyncd_centisecs + sysctl: + name: fs.xfs.xfssyncd_centisecs + value: 9000 + + - name: Increase fs.inotify.max_user_watches + sysctl: + name: fs.inotify.max_user_watches + value: 1048576 + + - name: Get disk UUID + command: blkid -s UUID -o value /dev/nvme0n1p1 + register: disk_uuid + + - name: Replace fstab entities with new mount options + lineinfile: + path: /etc/fstab + regexp: "^UUID={{ disk_uuid.stdout }}" + line: "UUID={{ disk_uuid.stdout }} / xfs defaults,noatime,nobarrier,discard 1 1" + + - name: Add repo.ci.percona.com to /etc/hosts + lineinfile: + dest: /etc/hosts + line: "10.30.6.9 repo.ci.percona.com" + state: present diff --git a/build/packer/ansible/agent-do.yml b/build/packer/ansible/agent-do.yml new file mode 100644 index 0000000000..44ae5485fa --- /dev/null +++ b/build/packer/ansible/agent-do.yml @@ -0,0 +1,271 @@ +--- +- name: "Provision a DO Agent" + hosts: default + become: true + vars: + docker_compose_version: "2.26.1" + kubectl_version: "1.29.2" + doctl_version: "1.105.0" + node_version: "18.x" + + tasks: + - name: Detect vm architecture + set_fact: + # Alternative architecture name just because we never can have only one name in computers + ansible_architecture_alt: "{% if ansible_architecture == 'x86_64' %}amd64{% elif ansible_architecture == 'aarch64' %}arm64{% else %}none{% endif %}" + + - name: Enable epel repo + yum: + name: epel-release + state: present + + - name: Upgrade OS packages + yum: + name: "*" + state: latest + + - name: Add a repository for NodeJS + shell: "curl -fsSL https://rpm.nodesource.com/setup_{{ node_version }} | bash -" + + - name: Install packages + package: + name: + - docker + - git + - jq + - gettext + - unzip + - python3 + - bats + - svn # we use it in pmm-framework.sh + - php # we use PHP in pmm-qa repo + - php-mysqlnd + - php-pdo + - wget + - kernel-devel + - kernel-headers + - gcc + - make + - perl + - p7zip + - nodejs + # - xmlstarlet + state: present + + - name: Install Java17 + package: + name: jdk-17-headless + state: present + + - name: Install docker-compose + get_url: + url: "https://github.com/docker/compose/releases/download/v{{ docker_compose_version }}/docker-compose-linux-{{ ansible_architecture }}" + dest: /usr/local/bin/docker-compose + mode: "u+x,g+x,o+x" + + - name: Install kubectl + get_url: + url: https://storage.googleapis.com/kubernetes-release/release/v{{ kubectl_version }}/bin/linux/{{ ansible_architecture_alt }}/kubectl + dest: /usr/local/bin/kubectl + mode: "u+x,g+x,o+x" + + - name: Install lacework + get_url: + url: "https://github.com/lacework/lacework-vulnerability-scanner/releases/latest/download/lw-scanner-linux-{{ ansible_architecture_alt }}" + dest: /usr/local/bin/lw-scanner + mode: "u+x,g+x,o+x" + + - name: Install other software + package: + name: + - chromium + state: present + when: ansible_architecture == "x86_64" + # NOTE: no chromium package for arm64 + + - name: Install doctl client for digital ocean + get_url: + url: https://github.com/digitalocean/doctl/releases/download/v{{ doctl_version }}/doctl-{{ doctl_version }}-linux-{{ ansible_architecture_alt }}.tar.gz + dest: /tmp/doctl.tar.gz + + - name: Unarchive a file with doctl + unarchive: + src: /tmp/doctl.tar.gz + dest: /usr/local/bin + remote_src: yes + mode: "u+x,g+x,o+x" + group: "root" + owner: "root" + + - name: Instal yq + get_url: + url: https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + dest: /usr/bin/yq + mode: "555" + group: "root" + owner: "root" + + - name: Install Python modules + pip: + name: "{{ item }}" + loop: # Lookup versions at: https://pypi.org/search/ + - pyaml==24.7.0 + - GitPython==3.1.43 + - PyGithub==2.3.0 + - python-digitalocean==1.17.0 + - docker==7.1.0 + - linode-cli==5.50.0 + + - name: Install virtual box (only for Digital Ocean) + block: + - name: Add base repository for VirtualBox + yum_repository: + name: virtualbox + description: VirtualBox + baseurl: "http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch" + gpgcheck: true + gpgkey: https://www.virtualbox.org/download/oracle_vbox.asc + enabled: true + state: present + + - name: Install packages for virtualization + yum: + state: present + name: "{{ item }}" + loop: + - VirtualBox-6.1 + - vagrant + + - name: Reboot to the latest kernel + reboot: + reboot_timeout: 1200 + - name: Recompile kernel + command: /sbin/vboxconfig + + - name: Copy docker daemon config + copy: + src: daemon.json + dest: /etc/docker/daemon.json + + - name: Enable Docker service + systemd: + name: docker.service + state: started + enabled: yes + + - name: Pull and cache docker images + docker_image: + name: "{{ item }}" + source: pull + loop: + - debian:buster + - debian:stretch + - debian:bullseye + - ubuntu:jammy + - ubuntu:bionic + - ubuntu:focal + - rockylinux:8 + - oraclelinux:9 + + - name: Turn off swap + sysctl: + name: vm.swappiness + value: 0 + state: present + + - name: Increase dirty ratio + sysctl: + name: vm.dirty_ratio + value: 80 + state: present + + - name: Decrease dirty_background_ratio + sysctl: + name: vm.dirty_background_ratio + value: 5 + + - name: Increase dirty_expire_centisecs + sysctl: + name: vm.dirty_expire_centisecs + value: 12000 #120 sec + + - name: Increase net.core.somaxconn + sysctl: + name: net.core.somaxconn + value: 1024 + + - name: Increase net.core.netdev_max_backlog + sysctl: + name: net.core.netdev_max_backlog + value: 5000 + + - name: Increase net.core.rmem_max + sysctl: + name: net.core.rmem_max + value: 16777216 + + - name: Increase net.core.wmem_max + sysctl: + name: net.core.wmem_max + value: 16777216 + + - name: Increase net.ipv4.tcp_wmem + sysctl: + name: net.ipv4.tcp_wmem + value: 4096 12582912 16777216 + + - name: Increase net.ipv4.tcp_rmem + sysctl: + name: net.ipv4.tcp_rmem + value: 4096 12582912 16777216 + + - name: Increase net.ipv4.tcp_max_syn_backlog + sysctl: + name: net.ipv4.tcp_max_syn_backlog + value: 8192 + + - name: Disable net.ipv4.tcp_slow_start_after_idle + sysctl: + name: net.ipv4.tcp_slow_start_after_idle + value: 0 + + - name: Enable net.ipv4.tcp_tw_reuse + sysctl: + name: net.ipv4.tcp_tw_reuse + value: 1 + + - name: Change net.ipv4.ip_local_port_range + sysctl: + name: net.ipv4.ip_local_port_range + value: 10240 65535 + + - name: Change TCP Congestion Control Algorithm (net.ipv4.tcp_congestion_control) + sysctl: + name: net.ipv4.tcp_congestion_control + value: bbr + + - name: Change net.ipv4.tcp_syn_retries + sysctl: + name: net.ipv4.tcp_syn_retries + value: 2 + + - name: Change BBR algoritm + sysctl: + name: net.core.default_qdisc + value: fq + + - name: Increase fs.xfs.xfssyncd_centisecs + sysctl: + name: fs.xfs.xfssyncd_centisecs + value: 9000 + + - name: Increase fs.inotify.max_user_watches + sysctl: + name: fs.inotify.max_user_watches + value: 1048576 + + - name: Add repo.ci.percona.com to /etc/hosts + lineinfile: + dest: /etc/hosts + line: "10.30.6.9 repo.ci.percona.com" + state: present diff --git a/build/packer/ansible/files/daemon.json b/build/packer/ansible/files/daemon.json new file mode 100644 index 0000000000..f63a705763 --- /dev/null +++ b/build/packer/ansible/files/daemon.json @@ -0,0 +1,5 @@ +{ + "experimental": true, + "max-concurrent-downloads": 9, + "max-concurrent-uploads": 15 +} diff --git a/build/packer/ansible/roles/cloud-node/files/show-url b/build/packer/ansible/roles/cloud-node/files/show-url index a72488a9b0..c7f3f13410 100644 --- a/build/packer/ansible/roles/cloud-node/files/show-url +++ b/build/packer/ansible/roles/cloud-node/files/show-url @@ -5,8 +5,7 @@ SOURCE= if [ -f /var/lib/cloud/data/status.json ]; then SOURCE=$( - cat /var/lib/cloud/data/status.json 2>/dev/null \ - | python -c 'import json, sys; print json.load(sys.stdin)["v1"]["datasource"];' 2>/dev/null + cat /var/lib/cloud/data/status.json 2>/dev/null | jq -r '.v1.datasource' 2>/dev/null ) fi diff --git a/build/packer/ansible/roles/cloud-node/tasks/ovf.yml b/build/packer/ansible/roles/cloud-node/tasks/ovf.yml index db520b2959..786d521d9e 100644 --- a/build/packer/ansible/roles/cloud-node/tasks/ovf.yml +++ b/build/packer/ansible/roles/cloud-node/tasks/ovf.yml @@ -13,3 +13,21 @@ retries: 2 dest: /etc/cloud/cloud.cfg.d/90_disable-cloud.cfg mode: 0644 + +- name: Create user-specific .ssh directory + when: ansible_virtualization_type == "virtualbox" + file: + path: /home/admin/.ssh + state: directory + owner: admin + group: admin + mode: '0700' + +- name: create authorized_keys file + when: ansible_virtualization_type == "virtualbox" + file: + path: /home/admin/.ssh/authorized_keys + state: touch + owner: admin + group: admin + mode: '0600' \ No newline at end of file diff --git a/build/packer/ansible/roles/lvm-init/vars/main.yml b/build/packer/ansible/roles/lvm-init/vars/main.yml index 3568493682..8934b62d03 100644 --- a/build/packer/ansible/roles/lvm-init/vars/main.yml +++ b/build/packer/ansible/roles/lvm-init/vars/main.yml @@ -1,5 +1,5 @@ --- -data_partition: "/srv" +data_partition: "/home/admin/volume" create_admin: "true" enable_lvm: "true" single_disk: "false" diff --git a/build/packer/ansible/roles/podman-setup/tasks/main.yml b/build/packer/ansible/roles/podman-setup/tasks/main.yml index 7854d0b157..5c53c631cb 100644 --- a/build/packer/ansible/roles/podman-setup/tasks/main.yml +++ b/build/packer/ansible/roles/podman-setup/tasks/main.yml @@ -1,23 +1,38 @@ +- name: Create user-specific volume directory + file: + path: /home/admin/volume/srv/ + state: directory + owner: admin + group: admin + mode: '0755' + - name: Set distribution for OVF when: ansible_virtualization_type == "virtualbox" - copy: - content: ovf - dest: /srv/pmm-distribution + set_fact: + pmm_distribution_method: ovf - name: Set distribution for AMI when: > ( ansible_virtualization_type == "xen" or ansible_virtualization_type == "kvm" ) and ansible_system_vendor != "DigitalOcean" - copy: - content: ami - dest: /srv/pmm-distribution + set_fact: + pmm_distribution_method: ami -- name: Pull the PMM image - command: podman pull {{ pmm_server_image_name }} +- name: Set SELinux in permissive mode for watchtower + selinux: + policy: targeted + state: permissive - name: Create a volume on the host command: podman volume create pmm-data + become: true + become_user: admin + +- name: Create a network + command: podman network create pmm_default + become: true + become_user: admin - name: Enable privileged port become: true @@ -33,7 +48,23 @@ group: admin mode: '0755' -- name: Copy systemd service file to user-specific directory +- name: Copy pmm-server environment file for service to user-specific directory + template: + src: pmm-server.env + dest: /home/admin/.config/systemd/user/ + owner: admin + group: admin + mode: '0644' + +- name: Display the contents of the environment file + command: cat /home/admin/.config/systemd/user/pmm-server.env + register: command_output + +- name: Print to console + debug: + msg: "{{command_output.stdout}}" + +- name: Copy pmm-server systemd service file to user-specific directory template: src: pmm-server.service dest: /home/admin/.config/systemd/user/ @@ -41,6 +72,14 @@ group: admin mode: '0644' +- name: Copy watchtower systemd service file to user-specific directory + template: + src: watchtower.service + dest: /home/admin/.config/systemd/user/ + owner: admin + group: admin + mode: '0644' + - name: Get user ID of admin user command: id -u admin register: admin_user_id @@ -48,9 +87,32 @@ - name: Enable linger for the admin user command: loginctl enable-linger {{ admin_user_id.stdout }} +- name: Pull the PMM image + command: podman pull {{ pmm_server_image_name }} + become: true + become_user: admin + - name: Enable and start PMM container as a user service command: systemctl --user enable --now pmm-server become: true become_user: admin environment: DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ admin_user_id.stdout }}/bus" + +- name: Enable socket + command: systemctl --user enable --now podman.socket + become: true + become_user: admin + environment: + DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ admin_user_id.stdout }}/bus" + +- name: Enable and start watchtower container as a user service + command: systemctl --user enable --now watchtower + become: true + become_user: admin + environment: + DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ admin_user_id.stdout }}/bus" + +- name: Sleep for 1 minute + pause: + minutes: 1 diff --git a/build/packer/ansible/roles/podman-setup/templates/pmm-server.env b/build/packer/ansible/roles/podman-setup/templates/pmm-server.env new file mode 100644 index 0000000000..88936af0a7 --- /dev/null +++ b/build/packer/ansible/roles/podman-setup/templates/pmm-server.env @@ -0,0 +1,5 @@ +PMM_WATCHTOWER_HOST=http://watchtower:8080 +PMM_WATCHTOWER_TOKEN=123 +PMM_SERVER_UPDATE_VERSION=docker.io/perconalab/pmm-server:3-dev-container +PMM_IMAGE={{ pmm_server_image_name }} +PMM_DISTRIBUTION_METHOD={{ pmm_distribution_method }} \ No newline at end of file diff --git a/build/packer/ansible/roles/podman-setup/templates/pmm-server.service b/build/packer/ansible/roles/podman-setup/templates/pmm-server.service index ecb10f37df..dc862129e3 100644 --- a/build/packer/ansible/roles/podman-setup/templates/pmm-server.service +++ b/build/packer/ansible/roles/podman-setup/templates/pmm-server.service @@ -6,11 +6,21 @@ After=nss-user-lookup.target nss-lookup.target After=time-sync.target [Service] -TimeoutStartSec=0 -Restart=always +EnvironmentFile=/home/admin/.config/systemd/user/pmm-server.env -ExecStart=/usr/bin/podman run --volume pmm-data:/srv/ --rm --name %N \ - -p 443:8443/tcp --ulimit=host {{ pmm_server_image_name }} +Restart=on-failure +RestartSec=20 + +ExecStart=/usr/bin/podman run \ + --volume /home/admin/volume/srv:/srv \ + --volume /home/admin/.ssh/:/home/pmm/.ssh/ \ + --volume /home/admin/.config/:/home/pmm/config/ \ + --rm --replace=true --name %N \ + --env-file=/home/admin/.config/systemd/user/pmm-server.env \ + --net pmm_default \ + --cap-add=net_admin,net_raw \ + --userns=keep-id:uid=1000,gid=1000 \ + -p 443:8443/tcp --ulimit=host ${PMM_IMAGE} ExecStop=/usr/bin/podman stop -t 10 %N diff --git a/build/packer/ansible/roles/podman-setup/templates/watchtower.service b/build/packer/ansible/roles/podman-setup/templates/watchtower.service new file mode 100644 index 0000000000..96c1e93202 --- /dev/null +++ b/build/packer/ansible/roles/podman-setup/templates/watchtower.service @@ -0,0 +1,30 @@ +[Unit] +Description=watchtower +Wants=network-online.target +After=network-online.target +After=nss-user-lookup.target nss-lookup.target +After=time-sync.target + +[Service] +Restart=on-failure +RestartSec=20 + +Environment=WATCHTOWER_HTTP_API_UPDATE=1 +Environment=WATCHTOWER_HTTP_API_TOKEN=123 +Environment=WATCHTOWER_NO_RESTART=1 +Environment=WATCHTOWER_DEBUG=1 + +ExecStart=/usr/bin/podman run --rm --replace=true --name %N \ + -v ${XDG_RUNTIME_DIR}/podman/podman.sock:/var/run/docker.sock \ + -e WATCHTOWER_HTTP_API_UPDATE=${WATCHTOWER_HTTP_API_UPDATE} \ + -e WATCHTOWER_HTTP_API_TOKEN=${WATCHTOWER_HTTP_API_TOKEN} \ + -e WATCHTOWER_NO_RESTART=${WATCHTOWER_NO_RESTART} \ + -e WATCHTOWER_DEBUG=${WATCHTOWER_DEBUG} \ + --net pmm_default \ + --cap-add=net_admin,net_raw \ + -p 8080:8080/tcp docker.io/perconalab/watchtower + +ExecStop=/usr/bin/podman stop -t 10 %N + +[Install] +WantedBy=default.target diff --git a/build/packer/aws.pkr.hcl b/build/packer/aws.pkr.hcl new file mode 100644 index 0000000000..d3bd6cd7cf --- /dev/null +++ b/build/packer/aws.pkr.hcl @@ -0,0 +1,121 @@ +packer { + required_plugins { + amazon = { + version = "=1.1.6" + source = "github.com/hashicorp/amazon" + } + ansible = { + source = "github.com/hashicorp/ansible" + version = "~> 1" + } + } +} + +source "amazon-ebs" "agent" { + ami_name = "Docker Agent v3" + instance_type = "t3.xlarge" + force_deregister = true + force_delete_snapshot = true + region = "us-east-2" + source_ami_filter { + filters = { + name = "OL9.3-*" + root-device-type = "ebs" + virtualization-type = "hvm" + architecture = "x86_64" + } + most_recent = true + owners = ["131827586825"] + } + ssh_username = "ec2-user" + tags = { + Name = "Jenkins Agent x86_64 v3" + iit-billing-tag = "pmm-worker-3" + } + run_tags = { + iit-billing-tag = "pmm-worker" + } + run_volume_tags = { + iit-billing-tag = "pmm-worker" + } + launch_block_device_mappings { + device_name = "/dev/xvda" + volume_size = 50 + volume_type = "gp3" + delete_on_termination = true + } + vpc_filter { + filters = { + "tag:Name" : "jenkins-pmm-amzn2" + } + } + subnet_filter { + filters = { + "tag:Name" : "jenkins-pmm-amzn2-B" + } + random = true + } +} + +source "amazon-ebs" "arm-agent" { + ami_name = "Docker Agent ARM v3" + instance_type = "t4g.xlarge" + force_deregister = true + force_delete_snapshot = true + region = "us-east-2" + source_ami_filter { + filters = { + name = "OL9.3-*" + root-device-type = "ebs" + virtualization-type = "hvm" + architecture = "arm64" + } + most_recent = true + owners = ["131827586825"] + } + ssh_username = "ec2-user" + tags = { + Name = "Jenkins Agent arm64 v3" + iit-billing-tag = "pmm-worker-3" + } + run_tags = { + iit-billing-tag = "pmm-worker", + } + run_volume_tags = { + iit-billing-tag = "pmm-worker" + } + launch_block_device_mappings { + device_name = "/dev/xvda" + volume_size = 30 + volume_type = "gp3" + delete_on_termination = true + } + vpc_filter { + filters = { + "tag:Name" : "jenkins-pmm-amzn2" + } + } + subnet_filter { + filters = { + "tag:Name" : "jenkins-pmm-amzn2-B" + } + random = true + } +} + +build { + name = "jenkins-farm" + sources = [ + "source.amazon-ebs.agent", + "source.amazon-ebs.arm-agent" + ] + provisioner "ansible" { + use_proxy = false + user = "ec2-user" + ansible_env_vars = ["ANSIBLE_NOCOLOR=True"] + extra_arguments = [ + "--ssh-extra-args", "-o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o ForwardAgent=yes -o UserKnownHostsFile=/dev/null", "-v" + ] + playbook_file = "./ansible/agent-aws.yml" + } +} diff --git a/build/packer/do.pkr.hcl b/build/packer/do.pkr.hcl new file mode 100644 index 0000000000..3b1cba00a1 --- /dev/null +++ b/build/packer/do.pkr.hcl @@ -0,0 +1,30 @@ +packer { + required_plugins { + digitalocean = { + version = "=1.0.4" + source = "github.com/digitalocean/digitalocean" + } + } +} + +source "digitalocean" "pmm-ovf" { + droplet_name = "pmm-ovf-agent-builder" + image = "centos-stream-9-x64" + region = "ams3" + size = "s-4vcpu-8gb-intel" + ssh_username = "root" + snapshot_name = "pmm-ovf-agent" +} + +build { + name = "jenkins-farm" + sources = ["source.digitalocean.pmm-ovf"] + + provisioner "ansible" { + use_proxy = false # otherwise it fails to connect ansible to the host + ansible_env_vars = ["ANSIBLE_NOCOLOR=True"] + extra_arguments = ["-v"] # -vvv for more verbose output + max_retries = 1 + playbook_file = "./ansible/agent-do.yml" + } +} diff --git a/build/packer/pmm.json b/build/packer/pmm.json index 3262b48916..5fd2f79a43 100644 --- a/build/packer/pmm.json +++ b/build/packer/pmm.json @@ -12,7 +12,7 @@ { "delete_on_termination": true, "device_name": "/dev/sda1", - "volume_size": 10, + "volume_size": 20, "volume_type": "gp3" }, { diff --git a/cli-tests/package-lock.json b/cli-tests/package-lock.json index 24563ccfb0..c5c4e0df95 100644 --- a/cli-tests/package-lock.json +++ b/cli-tests/package-lock.json @@ -9,9 +9,9 @@ "version": "1.0.0", "dependencies": { "@playwright/test": "^1.34.2", - "@types/luxon": "^3.4.0", + "@types/luxon": "^3.4.2", "dotenv": "^16.4.0", - "luxon": "^3.4.4", + "luxon": "^3.5.0", "playwright": "^1.41.2", "promise-retry": "^2.0.1", "shelljs": "^0.8.5", @@ -20,9 +20,9 @@ "devDependencies": { "@types/promise-retry": "^1.1.3", "@types/shelljs": "^0.8.12", - "@typescript-eslint/eslint-plugin": "^7.16.0", - "@typescript-eslint/parser": "^7.15.0", - "eslint": "8.56", + "@typescript-eslint/eslint-plugin": "^8.0.1", + "@typescript-eslint/parser": "^7.18.0", + "eslint": "8.57", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^18.0.0", "eslint-plugin-import": "^2.29.0", @@ -86,22 +86,23 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -122,9 +123,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -208,9 +210,9 @@ "dev": true }, "node_modules/@types/luxon": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.4.0.tgz", - "integrity": "sha512-PEVoA4MOfSsFNaPrZjIUGUZujBDxnO/tj2A2N9KfzlR+pNgpBdDuk0TmRvSMAVUP5q4q8IkMEZ8UOp3MIr+QgA==" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.4.2.tgz", + "integrity": "sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==" }, "node_modules/@types/minimatch": { "version": "5.1.2", @@ -249,31 +251,31 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.0.tgz", - "integrity": "sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.1.tgz", + "integrity": "sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.16.0", - "@typescript-eslint/type-utils": "7.16.0", - "@typescript-eslint/utils": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", + "@typescript-eslint/scope-manager": "8.0.1", + "@typescript-eslint/type-utils": "8.0.1", + "@typescript-eslint/utils": "8.0.1", + "@typescript-eslint/visitor-keys": "8.0.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -281,16 +283,63 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.0.1.tgz", + "integrity": "sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/visitor-keys": "8.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.1.tgz", + "integrity": "sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.1.tgz", + "integrity": "sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.0.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.15.0.tgz", - "integrity": "sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.15.0", - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/typescript-estree": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { @@ -309,14 +358,14 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz", - "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -326,27 +375,51 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.15.0.tgz", - "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.0.1.tgz", + "integrity": "sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==", "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.0.1", + "@typescript-eslint/utils": "8.0.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz", - "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.1.tgz", + "integrity": "sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.1.tgz", + "integrity": "sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.15.0", - "@typescript-eslint/visitor-keys": "7.15.0", + "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/visitor-keys": "8.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -355,7 +428,7 @@ "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -367,24 +440,24 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz", - "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.1.tgz", + "integrity": "sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/types": "8.0.1", "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { + "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", @@ -393,7 +466,7 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/parser/node_modules/minimatch": { + "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -408,15 +481,11 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.0.tgz", - "integrity": "sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==", + "node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0" - }, "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -425,15 +494,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.0.tgz", - "integrity": "sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.16.0", - "@typescript-eslint/utils": "7.16.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { @@ -443,36 +516,96 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, - "node_modules/@typescript-eslint/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.0.tgz", - "integrity": "sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.0.1.tgz", + "integrity": "sha512-CBFR0G0sCt0+fzfnKaciu9IBsKvEKYwN9UZ+eeogK1fYHg4Qxk1yf/wLQkLXlq8wbU2dFlgAesxt8Gi76E8RTA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.0.1", + "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/typescript-estree": "8.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.0.tgz", - "integrity": "sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.0.1.tgz", + "integrity": "sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", + "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/visitor-keys": "8.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.1.tgz", + "integrity": "sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.1.tgz", + "integrity": "sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/visitor-keys": "8.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -481,7 +614,7 @@ "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -493,7 +626,24 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.1.tgz", + "integrity": "sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.0.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", @@ -502,7 +652,7 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "node_modules/@typescript-eslint/utils/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -517,35 +667,13 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@typescript-eslint/utils": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.0.tgz", - "integrity": "sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.16.0", - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/typescript-estree": "7.16.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.0.tgz", - "integrity": "sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.16.0", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1049,16 +1177,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2172,9 +2300,9 @@ } }, "node_modules/luxon": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", - "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", "engines": { "node": ">=12" } diff --git a/cli-tests/package.json b/cli-tests/package.json index f9f75cb17d..8fb66b60b4 100644 --- a/cli-tests/package.json +++ b/cli-tests/package.json @@ -13,9 +13,9 @@ }, "dependencies": { "@playwright/test": "^1.34.2", - "@types/luxon": "^3.4.0", + "@types/luxon": "^3.4.2", "dotenv": "^16.4.0", - "luxon": "^3.4.4", + "luxon": "^3.5.0", "playwright": "^1.41.2", "promise-retry": "^2.0.1", "shelljs": "^0.8.5", @@ -24,9 +24,9 @@ "devDependencies": { "@types/promise-retry": "^1.1.3", "@types/shelljs": "^0.8.12", - "@typescript-eslint/eslint-plugin": "^7.16.0", - "@typescript-eslint/parser": "^7.15.0", - "eslint": "8.56", + "@typescript-eslint/eslint-plugin": "^8.0.1", + "@typescript-eslint/parser": "^7.18.0", + "eslint": "8.57", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^18.0.0", "eslint-plugin-import": "^2.29.0", diff --git a/descriptor.bin b/descriptor.bin index db1b8ee199..b6d4384871 100644 Binary files a/descriptor.bin and b/descriptor.bin differ diff --git a/docs/api/access-control/access-control.md b/docs/api/access-control/access-control.md index d1cf0d6a87..17aeba9c43 100644 --- a/docs/api/access-control/access-control.md +++ b/docs/api/access-control/access-control.md @@ -1,7 +1,7 @@ --- title: Access Control slug: access-control -category: 64e49e26498dc6002b62ebf4 +category: 66aca8d40bf230001846b567 --- ## Overview diff --git a/docs/api/advisor-api/advisors-and-advisor-checks.md b/docs/api/advisor-api/advisors-and-advisor-checks.md index 7a50116fde..d39b0289b3 100644 --- a/docs/api/advisor-api/advisors-and-advisor-checks.md +++ b/docs/api/advisor-api/advisors-and-advisor-checks.md @@ -1,7 +1,7 @@ --- title: Percona Advisors and Advisors checks slug: advisors-and-advisor-checks -category: 6291050b9400a1001ae1877d -order: 2 +category: 66acabbe485c6000126b0499 +order: 1 hidden: 0 --- diff --git a/docs/api/advisor-api/changing-advisor-checks.md b/docs/api/advisor-api/changing-advisor-checks.md index 36265f0c63..240ee068d3 100644 --- a/docs/api/advisor-api/changing-advisor-checks.md +++ b/docs/api/advisor-api/changing-advisor-checks.md @@ -1,7 +1,7 @@ --- title: Changing Advisors and Advisor checks slug: changing-advisor-checks -category: 6291050b9400a1001ae1877d +category: 66acabbe485c6000126b0499 order: 3 hidden: 0 --- diff --git a/docs/api/advisor-api/failed-checks.md b/docs/api/advisor-api/failed-checks.md index b240596293..4e10586a4f 100644 --- a/docs/api/advisor-api/failed-checks.md +++ b/docs/api/advisor-api/failed-checks.md @@ -1,7 +1,7 @@ --- title: List of problems detected by Advisors slug: failed-checks -category: 6291050b9400a1001ae1877d -order: 1 +category: 66acabbe485c6000126b0499 +order: 2 hidden: 0 --- diff --git a/docs/api/advisor-api/overview.md b/docs/api/advisor-api/overview.md index f791f36668..7d0e1b648c 100644 --- a/docs/api/advisor-api/overview.md +++ b/docs/api/advisor-api/overview.md @@ -1,7 +1,7 @@ --- title: Overview -slug: percona-advisors -category: 6291050b9400a1001ae1877d +slug: pmm-advisors +category: 66acabbe485c6000126b0499 order: 0 --- @@ -10,6 +10,6 @@ This section is about API for managing Percona [Advisors](https://docs.percona.c This section has three main subsections. -- In [List of problems detected by Advisors](reference/failed-checks) you can find API to get information about potential problems with your Infrastructure detected by Advisors. -- [Percona Advisors and Advisors checks](reference/advisors-and-advisor-checks) lists all Advisors and Advisor Checks available in your PMM. -- [Changing Advisors and Advisor checks](reference/changing-advisor-checks) will help you automate Advisor checks modification if needed. +- In [List of problems detected by Advisors](failed-checks) you can find API to get information about potential problems with your Infrastructure detected by Advisors. +- [Percona Advisors and Advisors checks](advisors-and-advisor-checks) lists all Advisors and Advisor Checks available in your PMM. +- [Changing Advisors and Advisor checks](changing-advisor-checks) will help you automate Advisor checks modification if needed. diff --git a/docs/api/backups/list-locations.md b/docs/api/backups/list-locations.md index bb64df8151..7834ccd6c5 100644 --- a/docs/api/backups/list-locations.md +++ b/docs/api/backups/list-locations.md @@ -2,7 +2,7 @@ title: List Locations slug: listlocations excerpt: ListLocations returns a list of all backup locations. -category: 626badcabbc59c02acc1a540 +category: 66acac6024b4bc0022d980f3 --- The following API call will list all the available backup locations: diff --git a/docs/api/backups/overview.md b/docs/api/backups/overview.md new file mode 100644 index 0000000000..b7b520cfeb --- /dev/null +++ b/docs/api/backups/overview.md @@ -0,0 +1,24 @@ +--- +title: Overview +slug: database-backups +category: 66acac6024b4bc0022d980f3 +order: 0 +--- + + +This section provides a set of API endpoints that allow to backup databases. Currently, PMM Backup Management works with the following database families: + +- MongoDB (Generally Available) +- MySQL (in Technical Preview) + + +To be able to make a backup, you should start by [preparing a backup location](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/prepare_storage_location.html#prepare-a-location-for-local-backups), which is where the backup artifacts will be physically stored. Although the backup location can be re-used to store multiple backups, we generally recommend to create a backup location per database service, which will help organize your storage. + +Here a few other references to : + +- [Make a backup](startbackup) +- [Restore the database from a backup](restorebackup) +- [List restore history items](listrestorehistory) +- [List available backup locations](listlocations) + +Read [more](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/index.html). diff --git a/docs/api/backups/restore-backup.md b/docs/api/backups/restore-backup.md index 60f3f83038..31589c3461 100644 --- a/docs/api/backups/restore-backup.md +++ b/docs/api/backups/restore-backup.md @@ -2,8 +2,7 @@ title: Restore from a backup slug: restorebackup excerpt: This endpoint allows to restore a database from a previously made backup. -category: 626badcabbc59c02acc1a540 -order: 1 +category: 66acac6024b4bc0022d980f3 --- PMM can backup the monitored services. diff --git a/docs/api/backups/start-backup.md b/docs/api/backups/start-backup.md index 4f69c28081..fcb935660b 100644 --- a/docs/api/backups/start-backup.md +++ b/docs/api/backups/start-backup.md @@ -2,8 +2,7 @@ title: Make a backup slug: startbackup excerpt: This endpoint allows to make an unscheduled, or ad-hoc, backup of a given service. -category: 626badcabbc59c02acc1a540 -order: 0 +category: 66acac6024b4bc0022d980f3 --- PMM can backup the monitored services. diff --git a/docs/api/inventory/add-agent.md b/docs/api/inventory/add-agent.md index 71eef04c71..6c77ea95f4 100644 --- a/docs/api/inventory/add-agent.md +++ b/docs/api/inventory/add-agent.md @@ -1,7 +1,7 @@ --- title: Add an Agent slug: addagent -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Add an Agent diff --git a/docs/api/inventory/add-node.md b/docs/api/inventory/add-node.md index 1a96ed40ec..6cfe8529ed 100644 --- a/docs/api/inventory/add-node.md +++ b/docs/api/inventory/add-node.md @@ -1,7 +1,7 @@ --- title: Add a Node slug: addnode -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Add a Node diff --git a/docs/api/inventory/add-service.md b/docs/api/inventory/add-service.md index c37bfeb819..406e24d06e 100644 --- a/docs/api/inventory/add-service.md +++ b/docs/api/inventory/add-service.md @@ -1,7 +1,7 @@ --- title: Add a Service slug: addservice -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Add a Service diff --git a/docs/api/inventory/change-agent.md b/docs/api/inventory/change-agent.md index a3dc043886..5db94ac192 100644 --- a/docs/api/inventory/change-agent.md +++ b/docs/api/inventory/change-agent.md @@ -1,7 +1,7 @@ --- title: Change Agent Attributes slug: changeagent -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Change Agent Attributes diff --git a/docs/api/inventory/list-nodes.md b/docs/api/inventory/list-nodes.md index 2ba49557dd..5709c8b8f5 100644 --- a/docs/api/inventory/list-nodes.md +++ b/docs/api/inventory/list-nodes.md @@ -1,7 +1,7 @@ --- title: List Nodes slug: listnodes -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## List Nodes diff --git a/docs/api/inventory/list-services.md b/docs/api/inventory/list-services.md index a26f97c6a6..3c32f8bc0b 100644 --- a/docs/api/inventory/list-services.md +++ b/docs/api/inventory/list-services.md @@ -1,7 +1,7 @@ --- title: List Services slug: listservices -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## List Services diff --git a/docs/api/pmm-server-config/account-management/bulk-add-users.md b/docs/api/pmm-server-config/account-management/bulk-add-users.md index 43aede9d08..4a2de7ca90 100644 --- a/docs/api/pmm-server-config/account-management/bulk-add-users.md +++ b/docs/api/pmm-server-config/account-management/bulk-add-users.md @@ -1,8 +1,8 @@ --- title: Create user accounts slug: bulk-add-users -category: 626bd6a45c6ea70129427eff -parentDoc: 626be9a93ab1240284d0d27d +category: 66acab7b0bf230001846b5e2 +parentDoc: 66acad52c21a1a0036295235 order: 1 --- diff --git a/docs/api/pmm-server-config/account-management/change-admin-password.md b/docs/api/pmm-server-config/account-management/change-admin-password.md index de935a1838..910ecb52aa 100644 --- a/docs/api/pmm-server-config/account-management/change-admin-password.md +++ b/docs/api/pmm-server-config/account-management/change-admin-password.md @@ -1,8 +1,8 @@ --- title: Change the administrator's password slug: change-admin-password -category: 626bd6a45c6ea70129427eff -parentDoc: 626be9a93ab1240284d0d27d +category: 66acab7b0bf230001846b5e2 +parentDoc: 66acad52c21a1a0036295235 order: 0 --- diff --git a/docs/api/pmm-server-config/overview.md b/docs/api/pmm-server-config/overview.md index 69e4a9b27c..ac269b3533 100644 --- a/docs/api/pmm-server-config/overview.md +++ b/docs/api/pmm-server-config/overview.md @@ -1,7 +1,7 @@ --- title: Overview slug: pmm-server-configuration -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 0 --- diff --git a/docs/api/pmm-server-config/pmm-server-settings.md b/docs/api/pmm-server-config/pmm-server-settings.md index e9923b15ca..e9e95df6c7 100644 --- a/docs/api/pmm-server-config/pmm-server-settings.md +++ b/docs/api/pmm-server-config/pmm-server-settings.md @@ -1,7 +1,7 @@ --- title: PMM Server Settings slug: pmm-server-settings -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 2 --- diff --git a/docs/api/pmm-server-config/pmm-server-troubleshooting.md b/docs/api/pmm-server-config/pmm-server-troubleshooting.md index 58e23de2d6..7b1bf8d931 100644 --- a/docs/api/pmm-server-config/pmm-server-troubleshooting.md +++ b/docs/api/pmm-server-config/pmm-server-troubleshooting.md @@ -1,7 +1,7 @@ --- title: Troubleshooting slug: pmm-server-troubleshooting -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 4 hidden: 0 --- diff --git a/docs/api/pmm-server-config/pmm-server-upgrade.md b/docs/api/pmm-server-config/pmm-server-upgrade.md index ae5116a0d6..012db77a63 100644 --- a/docs/api/pmm-server-config/pmm-server-upgrade.md +++ b/docs/api/pmm-server-config/pmm-server-upgrade.md @@ -1,7 +1,7 @@ --- title: Upgrade your PMM Server slug: pmm-server-upgrade -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 3 --- diff --git a/docs/api/pmm-server-config/troubleshooting/logs.md b/docs/api/pmm-server-config/troubleshooting/logs.md index dbb4b30b3f..97439aaeeb 100644 --- a/docs/api/pmm-server-config/troubleshooting/logs.md +++ b/docs/api/pmm-server-config/troubleshooting/logs.md @@ -1,7 +1,7 @@ --- title: Logs slug: "logs" -category: 626badcabbc59c02acc1a540 +category: 66acab7b0bf230001846b5e2 --- Sometimes users need to troubleshoot an issue. PMM Server offers an ability to download the logs as well as configuration of its components. diff --git a/docs/api/pmm-server-config/user-account-management.md b/docs/api/pmm-server-config/user-account-management.md index b5fac01365..01d53fa149 100644 --- a/docs/api/pmm-server-config/user-account-management.md +++ b/docs/api/pmm-server-config/user-account-management.md @@ -1,7 +1,7 @@ --- title: User account management slug: pmm-server-config-security -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 1 --- diff --git a/docs/api/welcome/authentication.md b/docs/api/welcome/authentication.md index cec8d37873..a6c737023b 100644 --- a/docs/api/welcome/authentication.md +++ b/docs/api/welcome/authentication.md @@ -1,7 +1,7 @@ --- title: Authentication slug: authentication -category: 651bd218baa868000c212203 +category: 66aca6ddfd9bfe004c97cd48 order: 1 --- diff --git a/docs/api/welcome/introduction.md b/docs/api/welcome/introduction.md index 454c89171c..fffbc9a29c 100644 --- a/docs/api/welcome/introduction.md +++ b/docs/api/welcome/introduction.md @@ -1,7 +1,7 @@ --- title: Introduction slug: introduction -category: 651bd218baa868000c212203 +category: 66aca6ddfd9bfe004c97cd48 order: 0 --- diff --git a/docs/api/welcome/monitoring.md b/docs/api/welcome/monitoring.md index 55a9570353..5ca61a84b9 100644 --- a/docs/api/welcome/monitoring.md +++ b/docs/api/welcome/monitoring.md @@ -1,7 +1,7 @@ --- title: Monitoring slug: monitoring -category: 651bd218baa868000c212203 +category: 66aca6ddfd9bfe004c97cd48 order: 2 --- diff --git a/docs/release-notes/2.43.0.md b/docs/release-notes/2.43.0.md index 2097be5b29..a8cd62d187 100644 --- a/docs/release-notes/2.43.0.md +++ b/docs/release-notes/2.43.0.md @@ -45,4 +45,12 @@ If you're looking to upgrade, you can easily [install the latest version of Perc ### Fixed issues -- [PMM-xxxxx](https://perconadev.atlassian.net/browse/PMM-xxxx) - Fixed an issue in the +- [PMM-13246](https://perconadev.atlassian.net/browse/PMM-13246) - Addressed four security vulnerabilities (CVEs) related to the GNU C Library (Glibc), specifically affecting the Name Service Cache Daemon (nscd): + + - [CVE-2024-33599](https://nvd.nist.gov/vuln/detail/CVE-2024-33599) + - [CVE-2024-33600](https://nvd.nist.gov/vuln/detail/CVE-2024-33600) + - [CVE-2024-33601](https://nvd.nist.gov/vuln/detail/CVE-2024-33601) + - [CVE-2024-33602](https://nvd.nist.gov/vuln/detail/CVE-2024-33602) + + While these vulnerabilities did not directly impact PMM's core functionality, fixing them enhanced the overall security of the PMM Server environment. + diff --git a/go.mod b/go.mod index 291c64494f..0a65f7f4c7 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/percona/pmm -go 1.22 +go 1.22.0 -toolchain go1.22.2 +toolchain go1.22.5 // Update saas with // go get -v github.com/percona-platform/saas@latest @@ -21,12 +21,12 @@ require ( github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/alecthomas/kong v0.9.0 github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 - github.com/aws/aws-sdk-go v1.51.3 + github.com/aws/aws-sdk-go v1.55.3 github.com/blang/semver v3.5.1+incompatible github.com/brianvoe/gofakeit/v6 v6.28.0 github.com/charmbracelet/bubbles v0.18.0 - github.com/charmbracelet/bubbletea v0.25.0 - github.com/charmbracelet/lipgloss v0.10.0 + github.com/charmbracelet/bubbletea v0.26.6 + github.com/charmbracelet/lipgloss v0.12.1 github.com/davecgh/go-spew v1.1.1 github.com/docker/docker v25.0.3+incompatible github.com/docker/go-connections v0.5.0 @@ -44,9 +44,9 @@ require ( github.com/grafana/grafana-api-golang-client v0.27.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/raft v1.6.0 + github.com/hashicorp/raft v1.7.0 github.com/jmoiron/sqlx v1.3.5 github.com/jotaen/kong-completion v0.0.5 github.com/lib/pq v1.10.9 @@ -60,24 +60,24 @@ require ( github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.6 github.com/pmezard/go-difflib v1.0.0 - github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.53.0 + github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/common v0.55.0 github.com/ramr/go-reaper v0.2.1 github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/objx v0.5.2 github.com/stretchr/testify v1.9.0 - go.mongodb.org/mongo-driver v1.15.0 + go.mongodb.org/mongo-driver v1.16.0 go.starlark.net v0.0.0-20230717150657-8a3343210976 - golang.org/x/crypto v0.24.0 - golang.org/x/sync v0.7.0 - golang.org/x/sys v0.21.0 - golang.org/x/text v0.16.0 - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d - google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 - google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 + golang.org/x/crypto v0.26.0 + golang.org/x/sync v0.8.0 + golang.org/x/sys v0.23.0 + golang.org/x/text v0.17.0 + golang.org/x/tools v0.24.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a + google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.34.2 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/reform.v1 v1.5.1 gopkg.in/yaml.v3 v3.0.1 @@ -86,7 +86,12 @@ require ( require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/charmbracelet/x/ansi v0.1.4 // indirect + github.com/charmbracelet/x/input v0.1.0 // indirect + github.com/charmbracelet/x/term v0.1.1 // indirect + github.com/charmbracelet/x/windows v0.1.0 // indirect github.com/distribution/reference v0.5.0 // indirect + github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/fatih/color v1.13.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -96,16 +101,18 @@ require ( github.com/golang/mock v1.4.4 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.0.0 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-msgpack/v2 v2.1.1 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/kr/fs v0.1.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/miekg/dns v1.1.41 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/posener/complete v1.2.3 // indirect github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect @@ -128,7 +135,6 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/go-faster/city v1.0.1 // indirect @@ -156,7 +162,7 @@ require ( github.com/kylelemons/godebug v1.1.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/minio/md5-simd v1.1.2 // indirect @@ -164,8 +170,8 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/montanaflynn/stats v0.7.0 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect + github.com/montanaflynn/stats v0.7.1 // indirect + github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.15.2 // indirect @@ -177,7 +183,7 @@ require ( github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rs/xid v1.5.0 // indirect github.com/segmentio/asm v1.2.0 // indirect @@ -188,8 +194,7 @@ require ( github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/term v0.21.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect gotest.tools/v3 v3.3.0 // indirect ) diff --git a/go.sum b/go.sum index e8edddcd9f..feefa68523 100644 --- a/go.sum +++ b/go.sum @@ -59,8 +59,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.51.3 h1:OqSyEXcJwf/XhZNVpMRgKlLA9nmbo5X8dwbll4RWxq8= -github.com/aws/aws-sdk-go v1.51.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.55.3 h1:0B5hOX+mIx7I5XPOrjrHlKSDQV/+ypFZpIHOx5LOk3E= +github.com/aws/aws-sdk-go v1.55.3/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -82,12 +82,20 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= -github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM= -github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg= +github.com/charmbracelet/bubbletea v0.26.6 h1:zTCWSuST+3yZYZnVSvbXwKOPRSNZceVeqpzOLN2zq1s= +github.com/charmbracelet/bubbletea v0.26.6/go.mod h1:dz8CWPlfCCGLFbBlTY4N7bjLiyOGDJEnd2Muu7pOWhk= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= -github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s= -github.com/charmbracelet/lipgloss v0.10.0/go.mod h1:Wig9DSfvANsxqkRsqj6x87irdy123SR4dOXlKa91ciE= +github.com/charmbracelet/lipgloss v0.12.1 h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs= +github.com/charmbracelet/lipgloss v0.12.1/go.mod h1:V2CiwIuhx9S1S1ZlADfOj9HmxeMAORuz5izHb0zGbB8= +github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM= +github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/input v0.1.0 h1:TEsGSfZYQyOtp+STIjyBq6tpRaorH0qpwZUj8DavAhQ= +github.com/charmbracelet/x/input v0.1.0/go.mod h1:ZZwaBxPF7IG8gWWzPUVqHEtWhc1+HXJPNuerJGRGZ28= +github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI= +github.com/charmbracelet/x/term v0.1.1/go.mod h1:wB1fHt5ECsu3mXYusyzcngVWWlu1KKUmmLhfgr/Flxw= +github.com/charmbracelet/x/windows v0.1.0 h1:gTaxdvzDM5oMa/I2ZNF7wN78X/atWemG9Wph7Ika2k4= +github.com/charmbracelet/x/windows v0.1.0/go.mod h1:GLEO/l+lizvFDBPLIOk+49gdX49L9YWMB5t+DZd0jkQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -98,8 +106,6 @@ github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 h1:F1EaeKL/ta07PY github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -126,6 +132,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= +github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= @@ -237,16 +245,16 @@ github.com/grafana/grafana-api-golang-client v0.27.0 h1:zIwMXcbCB4n588i3O2N6HfNc github.com/grafana/grafana-api-golang-client v0.27.0/go.mod h1:uNLZEmgKtTjHBtCQMwNn3qsx2mpMb8zU+7T4Xv3NR9Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -272,8 +280,8 @@ github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/raft v1.6.0 h1:tkIAORZy2GbJ2Trp5eUSggLXDPOJLXC+JJLNMMqtgtM= -github.com/hashicorp/raft v1.6.0/go.mod h1:Xil5pDgeGwRWuX4uPUmwa+7Vagg4N804dz6mhNi6S7o= +github.com/hashicorp/raft v1.7.0 h1:4u24Qn6lQ6uwziM++UgsyiT64Q8GyRn43CV41qPiz1o= +github.com/hashicorp/raft v1.7.0/go.mod h1:N1sKh6Vn47mrWvEArQgILTyng8GoDRNYlgKyK7PMjs0= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= @@ -337,8 +345,8 @@ github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZb github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= @@ -370,18 +378,20 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/montanaflynn/stats v0.7.0 h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU= -github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= +github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34= -github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -435,8 +445,8 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -445,13 +455,13 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/ramr/go-reaper v0.2.1 h1:zww+wlQOvTjBZuk1920R/e0GFEb6O7+B0WQLV6dM924= github.com/ramr/go-reaper v0.2.1/go.mod h1:AVypdzrcCXjSc/JYnlXl8TsB+z84WyFzxWE8Jh0MOJc= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -507,6 +517,8 @@ github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3k github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= @@ -514,8 +526,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc= -go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.mongodb.org/mongo-driver v1.16.0 h1:tpRsfBJMROVHKpdGyc1BBEzzjDUWjItxbVSZ8Ls4BQ4= +go.mongodb.org/mongo-driver v1.16.0/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= @@ -562,8 +574,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -581,11 +593,11 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -595,8 +607,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -615,6 +627,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -628,16 +641,16 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -647,8 +660,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -670,8 +683,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -683,25 +696,23 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a h1:YIa/rzVqMEokBkPtydCkx1VLmv3An1Uw7w1P1m6EhOY= +google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a h1:hqK4+jJZXCU4pW7jsAdGOVFIfLHQeV7LaizZKnZ84HI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -713,8 +724,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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index 89a006f59f..fcd396f0bd 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -102,6 +102,7 @@ import ( "github.com/percona/pmm/managed/services/victoriametrics" "github.com/percona/pmm/managed/services/vmalert" "github.com/percona/pmm/managed/utils/clean" + "github.com/percona/pmm/managed/utils/distribution" "github.com/percona/pmm/managed/utils/envvars" "github.com/percona/pmm/managed/utils/interceptors" platformClient "github.com/percona/pmm/managed/utils/platform" @@ -131,6 +132,9 @@ const ( clickhouseMaxIdleConns = 5 clickhouseMaxOpenConns = 10 + + distributionInfoFilePath = "/srv/pmm-distribution" + osInfoFilePath = "/proc/version" ) var pprofSemaphore = semaphore.NewWeighted(1) @@ -264,7 +268,7 @@ func runGRPCServer(ctx context.Context, deps *gRPCServerDeps) { deps.vmdb, deps.connectionCheck, deps.serviceInfoBroker, deps.agentService) mgmtBackupService := managementbackup.NewBackupsService(deps.db, deps.backupService, deps.compatibilityService, deps.schedulerService, deps.backupRemovalService, deps.pbmPITRService) - mgmtRestoreService := managementbackup.NewRestoreService(deps.db) + mgmtRestoreService := managementbackup.NewRestoreService(deps.db, deps.backupService, deps.schedulerService) mgmtServices := common.NewMgmtServices(mgmtBackupService, mgmtRestoreService) servicesSvc := inventory.NewServicesService(deps.db, deps.agentsRegistry, deps.agentsStateUpdater, deps.vmdb, deps.versionCache, mgmtServices) @@ -348,8 +352,7 @@ func runHTTP1Server(ctx context.Context, deps *http1ServerDeps) { proxyMux := grpc_gateway.NewServeMux( grpc_gateway.WithMarshalerOption(grpc_gateway.MIMEWildcard, marshaller), grpc_gateway.WithErrorHandler(pmmerrors.PMMHTTPErrorHandler), - grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler), - ) + grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler)) opts := []grpc.DialOption{ grpc.WithTransportCredentials(insecure.NewCredentials()), @@ -893,12 +896,12 @@ func main() { //nolint:maintidx,cyclop telemetry.UIEventsExtension: uieventsService, } - telemetry, err := telemetry.NewService(db, platformClient, version.Version, cfg.Config.Services.Telemetry, telemetryExtensions) + dus := distribution.NewService(distributionInfoFilePath, osInfoFilePath, l) + telemetry, err := telemetry.NewService(db, platformClient, version.Version, dus, cfg.Config.Services.Telemetry, telemetryExtensions) if err != nil { l.Fatalf("Could not create telemetry service: %s", err) } - awsInstanceChecker := server.NewAWSInstanceChecker(db, telemetry) grafanaClient := grafana.NewClient(*grafanaAddrF) prom.MustRegister(grafanaClient) @@ -949,10 +952,10 @@ func main() { //nolint:maintidx,cyclop TemplatesService: alertingService, Supervisord: supervisord, TelemetryService: telemetry, - AwsInstanceChecker: awsInstanceChecker, GrafanaClient: grafanaClient, VMAlertExternalRules: externalRules, Updater: updater, + Dus: dus, } server, err := server.NewServer(serverParams) @@ -1020,7 +1023,7 @@ func main() { //nolint:maintidx,cyclop l.Fatalf("Failed to get settings: %+v.", err) } - authServer := grafana.NewAuthServer(grafanaClient, awsInstanceChecker, db) + authServer := grafana.NewAuthServer(grafanaClient, db) l.Info("Starting services...") var wg sync.WaitGroup diff --git a/managed/models/artifact_helpers.go b/managed/models/artifact_helpers.go index 4c4bdc7acc..1cf76d1dd6 100644 --- a/managed/models/artifact_helpers.go +++ b/managed/models/artifact_helpers.go @@ -124,14 +124,14 @@ func FindArtifactsByIDs(q *reform.Querier, ids []string) (map[string]*Artifact, // FindArtifactByID returns artifact by given ID if found, ErrNotFound if not. func FindArtifactByID(q *reform.Querier, id string) (*Artifact, error) { if id == "" { - return nil, errors.New("provided artifact id is empty") + return nil, errors.New("provided backup artifact id is empty") } artifact := &Artifact{ID: id} err := q.Reload(artifact) if err != nil { if errors.Is(err, reform.ErrNoRows) { - return nil, errors.Wrapf(ErrNotFound, "artifact by id '%s'", id) + return nil, errors.Wrapf(ErrNotFound, "artifact with id '%s'", id) } return nil, errors.WithStack(err) } diff --git a/managed/services/agents/deps.go b/managed/services/agents/deps.go index 7701164266..a0d4f45804 100644 --- a/managed/services/agents/deps.go +++ b/managed/services/agents/deps.go @@ -22,7 +22,7 @@ import ( "github.com/sirupsen/logrus" agentv1 "github.com/percona/pmm/api/agent/v1" - qanpb "github.com/percona/pmm/api/qan/v1" + qanv1 "github.com/percona/pmm/api/qan/v1" ) // prometheusService is a subset of methods of victoriametrics.Service used by this package. @@ -39,8 +39,8 @@ type prometheusService interface { type qanClient interface { Collect(ctx context.Context, metricsBuckets []*agentv1.MetricsBucket) error QueryExists(ctx context.Context, serviceID, query string) error - ExplainFingerprintByQueryID(ctx context.Context, serviceID, queryID string) (*qanpb.ExplainFingerprintByQueryIDResponse, error) - SchemaByQueryID(ctx context.Context, serviceID, queryID string) (*qanpb.SchemaByQueryIDResponse, error) + ExplainFingerprintByQueryID(ctx context.Context, serviceID, queryID string) (*qanv1.ExplainFingerprintByQueryIDResponse, error) + SchemaByQueryID(ctx context.Context, serviceID, queryID string) (*qanv1.SchemaByQueryIDResponse, error) } // retentionService is a subset of methods of backup.Client used by this package. diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go index 4379d23ad0..71c7167448 100644 --- a/managed/services/grafana/auth_server.go +++ b/managed/services/grafana/auth_server.go @@ -94,14 +94,13 @@ var rules = map[string]role{ "/v1/qan": viewer, "/v1/qan:": viewer, - // mustSetupRules group "/prometheus": admin, "/victoriametrics": admin, "/graph": none, "/swagger": none, "/v1/server/logs.zip": admin, - // "/auth_request" and "/setup" have auth_request disabled in nginx config + // "/auth_request" has auth_request disabled in nginx config // "/" is a special case in this code } @@ -115,16 +114,6 @@ var vmProxyPrefixes = []string{ const vmProxyHeaderName = "X-Proxy-Filter" -// Only UI is blocked by setup wizard; APIs can be used. -// Critically, AWSInstanceCheck must be available for the setup wizard itself to work; -// and /agent.v1.AgentService/Connect and Management APIs should be available for pmm-agent on PMM Server registration. -var mustSetupRules = []string{ - "/prometheus", - "/victoriametrics", - "/graph", - "/swagger", -} - // nginx auth_request directive supports only 401 and 403 - every other code results in 500. // Our APIs can return codes.PermissionDenied which maps to 403 / http.StatusForbidden. // Our APIs MUST NOT return codes.Unauthenticated which maps to 401 / http.StatusUnauthorized @@ -158,10 +147,9 @@ type clientInterface interface { // AuthServer authenticates incoming requests via Grafana API. type AuthServer struct { - c clientInterface - checker awsInstanceChecker - db *reform.DB - l *logrus.Entry + c clientInterface + db *reform.DB + l *logrus.Entry cache map[string]cacheItem rw sync.RWMutex @@ -172,13 +160,12 @@ type AuthServer struct { } // NewAuthServer creates new AuthServer. -func NewAuthServer(c clientInterface, checker awsInstanceChecker, db *reform.DB) *AuthServer { +func NewAuthServer(c clientInterface, db *reform.DB) *AuthServer { return &AuthServer{ - c: c, - checker: checker, - db: db, - l: logrus.WithField("component", "grafana/auth"), - cache: make(map[string]cacheItem), + c: c, + db: db, + l: logrus.WithField("component", "grafana/auth"), + cache: make(map[string]cacheItem), accessControl: &accessControl{ db: db, }, @@ -227,10 +214,6 @@ func (s *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { l := s.l.WithField("req", fmt.Sprintf("%s %s", req.Method, req.URL.Path)) // TODO l := logger.Get(ctx) once we have it after https://jira.percona.com/browse/PMM-4326 - if s.mustSetup(rw, req, l) { - return - } - // fail-safe ctx, cancel := context.WithTimeout(req.Context(), 3*time.Second) defer cancel() @@ -404,51 +387,6 @@ func extractOriginalRequest(req *http.Request) error { return nil } -// mustSetup returns true if AWS instance ID must be checked. -func (s *AuthServer) mustSetup(rw http.ResponseWriter, req *http.Request, l *logrus.Entry) bool { - // Only UI is blocked by setup wizard; APIs can be used. - var found bool - for _, r := range mustSetupRules { - if strings.HasPrefix(req.URL.Path, r) { - found = true - break - } - } - if !found { - return false - } - - // This header is used to pass information that setup is required from auth_request subrequest - // to normal request to return redirect with location - something that auth_request can't do. - const mustSetupHeader = "X-Must-Setup" - - // Redirect to /setup page. - if req.Header.Get(mustSetupHeader) != "" { - const redirectCode = 303 // temporary, not cacheable, always GET - l.Warnf("AWS instance ID must be checked, returning %d with Location.", redirectCode) - rw.Header().Set("Location", "/setup") - rw.WriteHeader(redirectCode) - return true - } - - // Use X-Test-Must-Setup header for testing. - // There is no way to skip check, only to enforce it. - mustCheck := s.checker.MustCheck() - if req.Header.Get("X-Test-Must-Setup") != "" { - l.Debug("X-Test-Must-Setup is present, enforcing AWS instance ID check.") - mustCheck = true - } - - if mustCheck { - l.Warnf("AWS instance ID must be checked, returning %d with %s.", authenticationErrorCode, mustSetupHeader) - rw.Header().Set(mustSetupHeader, "1") // any non-empty value is ok - rw.WriteHeader(authenticationErrorCode) - return true - } - - return false -} - // nextPrefix returns path's prefix, stopping on slashes, dots, and colons, e.g.: // /inventory.Nodes/ListNodes -> /inventory.Nodes/ -> /inventory.Nodes -> /inventory. -> /inventory -> / // /v1/inventory/Nodes/List -> /v1/inventory/Nodes/ -> /v1/inventory/Nodes -> /v1/inventory/ -> /v1/inventory -> /v1/ -> /v1 -> / diff --git a/managed/services/grafana/auth_server_test.go b/managed/services/grafana/auth_server_test.go index 54ab827128..42aa225fac 100644 --- a/managed/services/grafana/auth_server_test.go +++ b/managed/services/grafana/auth_server_test.go @@ -20,7 +20,6 @@ import ( "encoding/base64" "encoding/json" "fmt" - "io" "net/http" "net/http/httptest" "testing" @@ -65,112 +64,12 @@ func TestNextPrefix(t *testing.T) { } } -func TestAuthServerMustSetup(t *testing.T) { - t.Run("MustCheck", func(t *testing.T) { - req, err := http.NewRequest(http.MethodGet, "/graph", nil) - require.NoError(t, err) - - checker := &mockAwsInstanceChecker{} - checker.Test(t) - defer checker.AssertExpectations(t) - - s := NewAuthServer(nil, checker, nil) - - t.Run("Subrequest", func(t *testing.T) { - checker.On("MustCheck").Return(true) - rw := httptest.NewRecorder() - assert.True(t, s.mustSetup(rw, req, logrus.WithField("test", t.Name()))) - - resp := rw.Result() - defer resp.Body.Close() //nolint:gosec,errcheck,nolintlint - assert.Equal(t, 401, resp.StatusCode) - assert.Equal(t, "1", resp.Header.Get("X-Must-Setup")) - assert.Equal(t, "", resp.Header.Get("Location")) - b, err := io.ReadAll(resp.Body) - assert.NoError(t, err) - assert.Empty(t, b) - }) - - t.Run("Request", func(t *testing.T) { - req.Header.Set("X-Must-Setup", "1") - - checker.On("MustCheck").Return(true) - rw := httptest.NewRecorder() - assert.True(t, s.mustSetup(rw, req, logrus.WithField("test", t.Name()))) - - resp := rw.Result() - defer resp.Body.Close() //nolint:gosec,errcheck,nolintlint - assert.Equal(t, 303, resp.StatusCode) - assert.Equal(t, "", resp.Header.Get("X-Must-Setup")) - assert.Equal(t, "/setup", resp.Header.Get("Location")) - b, err := io.ReadAll(resp.Body) - assert.NoError(t, err) - assert.Empty(t, b) - }) - }) - - t.Run("MustNotCheck", func(t *testing.T) { - req, err := http.NewRequest(http.MethodGet, "/graph", nil) - require.NoError(t, err) - - checker := &mockAwsInstanceChecker{} - checker.Test(t) - defer checker.AssertExpectations(t) - - s := NewAuthServer(nil, checker, nil) - - t.Run("Subrequest", func(t *testing.T) { - checker.On("MustCheck").Return(false) - rw := httptest.NewRecorder() - assert.False(t, s.mustSetup(rw, req, logrus.WithField("test", t.Name()))) - - resp := rw.Result() - defer resp.Body.Close() //nolint:gosec,errcheck,nolintlint - assert.Equal(t, 200, resp.StatusCode) - assert.Equal(t, "", resp.Header.Get("X-Must-Setup")) - assert.Equal(t, "", resp.Header.Get("Location")) - b, err := io.ReadAll(resp.Body) - assert.NoError(t, err) - assert.Empty(t, b) - }) - }) - - t.Run("SkipNonUI", func(t *testing.T) { - req, err := http.NewRequest(http.MethodGet, "/dummy", nil) - require.NoError(t, err) - - checker := &mockAwsInstanceChecker{} - checker.Test(t) - defer checker.AssertExpectations(t) - - s := NewAuthServer(nil, checker, nil) - - t.Run("Subrequest", func(t *testing.T) { - rw := httptest.NewRecorder() - assert.False(t, s.mustSetup(rw, req, logrus.WithField("test", t.Name()))) - - resp := rw.Result() - defer resp.Body.Close() //nolint:gosec,errcheck,nolintlint - assert.Equal(t, 200, resp.StatusCode) - assert.Equal(t, "", resp.Header.Get("X-Must-Setup")) - assert.Equal(t, "", resp.Header.Get("Location")) - b, err := io.ReadAll(resp.Body) - assert.NoError(t, err) - assert.Empty(t, b) - }) - }) -} - func TestAuthServerAuthenticate(t *testing.T) { t.Parallel() - checker := &mockAwsInstanceChecker{} - checker.Test(t) - t.Cleanup(func() { checker.AssertExpectations(t) }) - ctx := context.Background() c := NewClient("127.0.0.1:3000") - s := NewAuthServer(c, checker, nil) + s := NewAuthServer(c, nil) req, err := http.NewRequestWithContext(ctx, http.MethodGet, "/dummy", nil) require.NoError(t, err) @@ -283,13 +182,9 @@ func TestAuthServerAuthenticate(t *testing.T) { func TestServerClientConnection(t *testing.T) { t.Parallel() - checker := &mockAwsInstanceChecker{} - checker.Test(t) - t.Cleanup(func() { checker.AssertExpectations(t) }) - ctx := context.Background() c := NewClient("127.0.0.1:3000") - s := NewAuthServer(c, checker, nil) + s := NewAuthServer(c, nil) t.Run("Basic auth - success", func(t *testing.T) { t.Parallel() @@ -365,12 +260,8 @@ func TestAuthServerAddVMGatewayToken(t *testing.T) { require.NoError(t, sqlDB.Close()) }(t) - var checker mockAwsInstanceChecker - checker.Test(t) - defer checker.AssertExpectations(t) - c := NewClient("127.0.0.1:3000") - s := NewAuthServer(c, &checker, db) + s := NewAuthServer(c, db) roleA := models.Role{ Title: "Role A", diff --git a/managed/services/grafana/deps.go b/managed/services/grafana/deps.go index fe4f32012e..39862b3980 100644 --- a/managed/services/grafana/deps.go +++ b/managed/services/grafana/deps.go @@ -14,9 +14,3 @@ // along with this program. If not, see . package grafana - -// checker is a subset of methods of server.AWSInstanceChecker used by this package. -// We use it instead of real type for testing and to avoid dependency cycle. -type awsInstanceChecker interface { - MustCheck() bool -} diff --git a/managed/services/grafana/mock_aws_instance_checker_test.go b/managed/services/grafana/mock_aws_instance_checker_test.go deleted file mode 100644 index f502ba06d3..0000000000 --- a/managed/services/grafana/mock_aws_instance_checker_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package grafana - -import mock "github.com/stretchr/testify/mock" - -// mockAwsInstanceChecker is an autogenerated mock type for the awsInstanceChecker type -type mockAwsInstanceChecker struct { - mock.Mock -} - -// MustCheck provides a mock function with given fields: -func (_m *mockAwsInstanceChecker) MustCheck() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for MustCheck") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// newMockAwsInstanceChecker creates a new instance of mockAwsInstanceChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAwsInstanceChecker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAwsInstanceChecker { - mock := &mockAwsInstanceChecker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/annotation.go b/managed/services/management/annotation.go index 1535064cbd..e0047a6c73 100644 --- a/managed/services/management/annotation.go +++ b/managed/services/management/annotation.go @@ -29,9 +29,7 @@ import ( "github.com/percona/pmm/managed/models" ) -// AddAnnotation create annotation in grafana. -// -//nolint:unparam +// AddAnnotation creates an annotation in grafana. func (s *ManagementService) AddAnnotation(ctx context.Context, req *managementv1.AddAnnotationRequest) (*managementv1.AddAnnotationResponse, error) { headers, ok := metadata.FromIncomingContext(ctx) if !ok { @@ -70,6 +68,13 @@ func (s *ManagementService) AddAnnotation(ctx context.Context, req *managementv1 postfix = append(postfix, "Node Name: "+req.NodeName) } + for _, tag := range tags { + if len(tag) > 100 { + msg := fmt.Sprintf("tag length cannot exceed 100 characters, tag: %s", tag) + return nil, status.Error(codes.InvalidArgument, msg) + } + } + if len(postfix) != 0 { req.Text += " (" + strings.Join(postfix, ". ") + ")" } diff --git a/managed/services/management/backup/backups_service.go b/managed/services/management/backup/backup_service.go similarity index 97% rename from managed/services/management/backup/backups_service.go rename to managed/services/management/backup/backup_service.go index 12f4785793..a1c783f203 100644 --- a/managed/services/management/backup/backups_service.go +++ b/managed/services/management/backup/backup_service.go @@ -136,36 +136,6 @@ func (s *BackupService) StartBackup(ctx context.Context, req *backupv1.StartBack }, nil } -// RestoreBackup starts restore backup job. -func (s *BackupService) RestoreBackup( - ctx context.Context, - req *backupv1.RestoreBackupRequest, -) (*backupv1.RestoreBackupResponse, error) { - // Disable all related scheduled backups before restoring - tasks, err := models.FindScheduledTasks(s.db.Querier, models.ScheduledTasksFilter{ServiceID: req.ServiceId}) - if err != nil { - return nil, err - } - - for _, t := range tasks { - if _, err := s.ChangeScheduledBackup(ctx, &backupv1.ChangeScheduledBackupRequest{ - ScheduledBackupId: t.ID, - Enabled: pointer.ToBool(false), - }); err != nil { - return nil, err - } - } - - id, err := s.backupService.RestoreBackup(ctx, req.ServiceId, req.ArtifactId, req.PitrTimestamp.AsTime()) - if err != nil { - return nil, convertError(err) - } - - return &backupv1.RestoreBackupResponse{ - RestoreId: id, - }, nil -} - // ScheduleBackup add new backup task to scheduler. func (s *BackupService) ScheduleBackup(ctx context.Context, req *backupv1.ScheduleBackupRequest) (*backupv1.ScheduleBackupResponse, error) { var id string diff --git a/managed/services/management/backup/backups_service_test.go b/managed/services/management/backup/backup_service_test.go similarity index 91% rename from managed/services/management/backup/backups_service_test.go rename to managed/services/management/backup/backup_service_test.go index 458cb59965..a15ff5e855 100644 --- a/managed/services/management/backup/backups_service_test.go +++ b/managed/services/management/backup/backup_service_test.go @@ -250,66 +250,6 @@ func TestStartBackup(t *testing.T) { }) } -func TestRestoreBackupErrors(t *testing.T) { - sqlDB := testdb.Open(t, models.SkipFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - backupService := &mockBackupService{} - mockedPbmPITRService := &mockPbmPITRService{} - backupSvc := NewBackupsService(db, backupService, nil, nil, nil, mockedPbmPITRService) - - for _, tc := range []struct { - testName string - backupError error - code backupv1.ErrorCode - }{ - { - testName: "xtrabackup not installed", - backupError: backup.ErrXtrabackupNotInstalled, - code: backupv1.ErrorCode_ERROR_CODE_XTRABACKUP_NOT_INSTALLED, - }, - { - testName: "invalid xtrabackup", - backupError: backup.ErrInvalidXtrabackup, - code: backupv1.ErrorCode_ERROR_CODE_INVALID_XTRABACKUP, - }, - { - testName: "incompatible xtrabackup", - backupError: backup.ErrIncompatibleXtrabackup, - code: backupv1.ErrorCode_ERROR_CODE_INCOMPATIBLE_XTRABACKUP, - }, - { - testName: "target MySQL is not compatible", - backupError: backup.ErrIncompatibleTargetMySQL, - code: backupv1.ErrorCode_ERROR_CODE_INCOMPATIBLE_TARGET_MYSQL, - }, - { - testName: "target MongoDB is not compatible", - backupError: backup.ErrIncompatibleTargetMongoDB, - code: backupv1.ErrorCode_ERROR_CODE_INCOMPATIBLE_TARGET_MONGODB, - }, - } { - t.Run(tc.testName, func(t *testing.T) { - backupError := fmt.Errorf("error: %w", tc.backupError) - backupService.On("RestoreBackup", mock.Anything, "serviceID1", "artifactID1", mock.Anything). - Return("", backupError).Once() - ctx := context.Background() - resp, err := backupSvc.RestoreBackup(ctx, &backupv1.RestoreBackupRequest{ - ServiceId: "serviceID1", - ArtifactId: "artifactID1", - }) - assert.Nil(t, resp) - st, ok := status.FromError(err) - require.True(t, ok) - assert.Equal(t, codes.FailedPrecondition, st.Code()) - assert.Equal(t, backupError.Error(), st.Message()) - require.Len(t, st.Details(), 1) - detailedError, ok := st.Details()[0].(*backupv1.Error) - require.True(t, ok) - assert.Equal(t, tc.code, detailedError.Code) - }) - } -} - func TestScheduledBackups(t *testing.T) { ctx := context.Background() sqlDB := testdb.Open(t, models.SkipFixtures, nil) diff --git a/managed/services/management/backup/restore_service.go b/managed/services/management/backup/restore_service.go index 96aada7581..6d75311440 100644 --- a/managed/services/management/backup/restore_service.go +++ b/managed/services/management/backup/restore_service.go @@ -33,17 +33,21 @@ import ( // RestoreService represents backup restore API. type RestoreService struct { - l *logrus.Entry - db *reform.DB + l *logrus.Entry + db *reform.DB + backupService backupService + scheduleService scheduleService backupv1.UnimplementedRestoreServiceServer } // NewRestoreService creates new restore API service. -func NewRestoreService(db *reform.DB) *RestoreService { +func NewRestoreService(db *reform.DB, backupService backupService, scheduleService scheduleService) *RestoreService { return &RestoreService{ - l: logrus.WithField("component", "management/backup/restore_history"), - db: db, + l: logrus.WithField("component", "management/backup/restore"), + db: db, + backupService: backupService, + scheduleService: scheduleService, } } @@ -171,6 +175,69 @@ func (s *RestoreService) GetLogs(_ context.Context, req *backupv1.RestoreService return res, nil } +// RestoreBackup starts restore backup job. +func (s *RestoreService) RestoreBackup(ctx context.Context, req *backupv1.RestoreBackupRequest) (*backupv1.RestoreBackupResponse, error) { + // Disable all related scheduled backups before restoring + tasks, err := models.FindScheduledTasks(s.db.Querier, models.ScheduledTasksFilter{ServiceID: req.ServiceId}) + if err != nil { + return nil, err + } + + for _, task := range tasks { + var disablePITR bool + var serviceID string + + errTx := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + scheduledTask, err := models.FindScheduledTaskByID(tx.Querier, task.ID) + if err != nil { + return convertError(err) + } + + var data *models.CommonBackupTaskData + switch scheduledTask.Type { + case models.ScheduledMySQLBackupTask: + data = &scheduledTask.Data.MySQLBackupTask.CommonBackupTaskData + case models.ScheduledMongoDBBackupTask: + data = &scheduledTask.Data.MongoDBBackupTask.CommonBackupTaskData + default: + return status.Errorf(codes.InvalidArgument, "Unknown type: %s", scheduledTask.Type) + } + + serviceID = data.ServiceID + params := models.ChangeScheduledTaskParams{ + Data: scheduledTask.Data, + Disable: pointer.ToBool(true), + } + + if scheduledTask.Type == models.ScheduledMongoDBBackupTask { + disablePITR = data.Mode == models.PITR + } + + err = s.scheduleService.Update(task.ID, params) + + return convertError(err) + }) + if errTx != nil { + return nil, errTx + } + + if disablePITR { + if err := s.backupService.SwitchMongoPITR(ctx, serviceID, false); err != nil { + s.l.WithError(err).Error("failed to disable PITR") + } + } + } + + id, err := s.backupService.RestoreBackup(ctx, req.ServiceId, req.ArtifactId, req.PitrTimestamp.AsTime()) + if err != nil { + return nil, convertError(err) + } + + return &backupv1.RestoreBackupResponse{ + RestoreId: id, + }, nil +} + func convertRestoreStatus(status models.RestoreStatus) (*backupv1.RestoreStatus, error) { var s backupv1.RestoreStatus switch status { diff --git a/managed/services/management/backup/restore_service_test.go b/managed/services/management/backup/restore_service_test.go index 12543c38b2..b4ab8d5c21 100644 --- a/managed/services/management/backup/restore_service_test.go +++ b/managed/services/management/backup/restore_service_test.go @@ -17,16 +17,21 @@ package backup import ( "context" + "fmt" "testing" "github.com/google/uuid" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "gopkg.in/reform.v1" "gopkg.in/reform.v1/dialects/postgresql" backupv1 "github.com/percona/pmm/api/backup/v1" "github.com/percona/pmm/managed/models" + "github.com/percona/pmm/managed/services/backup" "github.com/percona/pmm/managed/utils/testdb" ) @@ -35,7 +40,9 @@ func TestRestoreServiceGetLogs(t *testing.T) { sqlDB := testdb.Open(t, models.SkipFixtures, nil) db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - restoreSvc := NewRestoreService(db) + backupService := &mockBackupService{} + scheduleService := &mockScheduleService{} + restoreSvc := NewRestoreService(db, backupService, scheduleService) t.Cleanup(func() { _ = sqlDB.Close() @@ -144,3 +151,63 @@ func TestRestoreServiceGetLogs(t *testing.T) { } }) } + +func TestRestoreBackupErrors(t *testing.T) { + sqlDB := testdb.Open(t, models.SkipFixtures, nil) + db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) + backupService := &mockBackupService{} + scheduleService := &mockScheduleService{} + restoreSvc := NewRestoreService(db, backupService, scheduleService) + + for _, tc := range []struct { + testName string + backupError error + code backupv1.ErrorCode + }{ + { + testName: "xtrabackup not installed", + backupError: backup.ErrXtrabackupNotInstalled, + code: backupv1.ErrorCode_ERROR_CODE_XTRABACKUP_NOT_INSTALLED, + }, + { + testName: "invalid xtrabackup", + backupError: backup.ErrInvalidXtrabackup, + code: backupv1.ErrorCode_ERROR_CODE_INVALID_XTRABACKUP, + }, + { + testName: "incompatible xtrabackup", + backupError: backup.ErrIncompatibleXtrabackup, + code: backupv1.ErrorCode_ERROR_CODE_INCOMPATIBLE_XTRABACKUP, + }, + { + testName: "target MySQL is not compatible", + backupError: backup.ErrIncompatibleTargetMySQL, + code: backupv1.ErrorCode_ERROR_CODE_INCOMPATIBLE_TARGET_MYSQL, + }, + { + testName: "target MongoDB is not compatible", + backupError: backup.ErrIncompatibleTargetMongoDB, + code: backupv1.ErrorCode_ERROR_CODE_INCOMPATIBLE_TARGET_MONGODB, + }, + } { + t.Run(tc.testName, func(t *testing.T) { + backupError := fmt.Errorf("error: %w", tc.backupError) + backupService.On("RestoreBackup", mock.Anything, "serviceID1", "artifactID1", mock.Anything). + Return("", backupError).Once() + ctx := context.Background() + resp, err := restoreSvc.RestoreBackup(ctx, &backupv1.RestoreBackupRequest{ + ServiceId: "serviceID1", + ArtifactId: "artifactID1", + }) + assert.Nil(t, resp) + st, ok := status.FromError(err) + require.True(t, ok) + assert.Equal(t, codes.FailedPrecondition, st.Code()) + assert.Equal(t, backupError.Error(), st.Message()) + require.Len(t, st.Details(), 1) + detailedError, ok := st.Details()[0].(*backupv1.Error) + require.True(t, ok) + assert.Equal(t, tc.code, detailedError.Code) + }) + } +} diff --git a/managed/services/scheduler/scheduler.go b/managed/services/scheduler/scheduler.go index 829dc0ab33..842987bbfb 100644 --- a/managed/services/scheduler/scheduler.go +++ b/managed/services/scheduler/scheduler.go @@ -168,7 +168,7 @@ func (s *Service) Update(id string, params models.ChangeScheduledTaskParams) err } s.mx.Lock() - // TODO if addDBTask will fail, then scheduler state will be not restored by the transaction rollback + // TODO if addDBTask fails, then scheduler state will be not restored by the transaction rollback _ = s.scheduler.RemoveByTag(id) s.mx.Unlock() diff --git a/managed/services/server/aws_instance_checker.go b/managed/services/server/aws_instance_checker.go deleted file mode 100644 index b4b047f1cb..0000000000 --- a/managed/services/server/aws_instance_checker.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2023 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 . - -package server - -import ( - "crypto/subtle" - "sync" - - "github.com/aws/aws-sdk-go/aws/ec2metadata" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - - serverv1 "github.com/percona/pmm/api/server/v1" - "github.com/percona/pmm/managed/models" -) - -// AWSInstanceChecker checks AWS EC2 instance ID for AMI. -type AWSInstanceChecker struct { - db *reform.DB - telemetryService telemetryService - l *logrus.Entry - - rw sync.RWMutex - checked bool -} - -// NewAWSInstanceChecker creates a new AWSInstanceChecker. -func NewAWSInstanceChecker(db *reform.DB, telemetryService telemetryService) *AWSInstanceChecker { - return &AWSInstanceChecker{ - db: db, - telemetryService: telemetryService, - l: logrus.WithField("component", "server/awsInstanceChecker"), - } -} - -// MustCheck returns true if instance ID must be checked: this is AMI, and it wasn't checked already. -func (c *AWSInstanceChecker) MustCheck() bool { - // fast-path without hitting database - c.rw.RLock() - checked := c.checked - c.rw.RUnlock() - if checked { - return false - } - - c.rw.Lock() - defer c.rw.Unlock() - - if c.telemetryService.DistributionMethod() != serverv1.DistributionMethod_DISTRIBUTION_METHOD_AMI { - c.checked = true - return false - } - - settings, err := models.GetSettings(c.db.Querier) - if err != nil { - c.l.Error(err) - return true - } - if settings.AWSInstanceChecked { - c.checked = true - return false - } - - return true -} - -// check performs instance ID check and stores successful result flag in settings. -func (c *AWSInstanceChecker) check(instanceID string) error { - // do not allow more AWS API calls if instance is already checked - if !c.MustCheck() { - return nil - } - - sess, err := session.NewSession() - if err != nil { - return errors.Wrap(err, "cannot create AWS session") - } - doc, err := ec2metadata.New(sess).GetInstanceIdentityDocument() - if err != nil { - c.l.Error(err) - return status.Error(codes.Unavailable, "cannot get instance metadata") - } - if subtle.ConstantTimeCompare([]byte(instanceID), []byte(doc.InstanceID)) == 0 { - return status.Error(codes.InvalidArgument, "invalid instance ID") - } - - if e := c.db.InTransaction(func(tx *reform.TX) error { - settings, err := models.GetSettings(tx.Querier) - if err != nil { - return err - } - - settings.AWSInstanceChecked = true - return models.SaveSettings(tx.Querier, settings) - }); e != nil { - return e - } - - c.rw.Lock() - c.checked = true - c.rw.Unlock() - - return nil -} diff --git a/managed/services/server/aws_instance_checker_test.go b/managed/services/server/aws_instance_checker_test.go deleted file mode 100644 index f82d0a8b63..0000000000 --- a/managed/services/server/aws_instance_checker_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2023 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 . - -package server - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - - serverv1 "github.com/percona/pmm/api/server/v1" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" -) - -func TestAWSInstanceChecker(t *testing.T) { - setup := func(t *testing.T) (db *reform.DB, teardown func()) { - t.Helper() - sqlDB := testdb.Open(t, models.SkipFixtures, nil) - db = reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - - teardown = func() { - t.Helper() - require.NoError(t, sqlDB.Close()) - } - - return - } - - t.Run("Docker", func(t *testing.T) { - db, teardown := setup(t) - defer teardown() - - telemetry := &mockTelemetryService{} - telemetry.Test(t) - telemetry.On("DistributionMethod").Return(serverv1.DistributionMethod_DISTRIBUTION_METHOD_DOCKER) - defer telemetry.AssertExpectations(t) - - checker := NewAWSInstanceChecker(db, telemetry) - assert.False(t, checker.MustCheck()) - assert.NoError(t, checker.check("foo")) - }) - - t.Run("AMI", func(t *testing.T) { - db, teardown := setup(t) - defer teardown() - - telemetry := &mockTelemetryService{} - telemetry.Test(t) - telemetry.On("DistributionMethod").Return(serverv1.DistributionMethod_DISTRIBUTION_METHOD_AMI) - defer telemetry.AssertExpectations(t) - - checker := NewAWSInstanceChecker(db, telemetry) - assert.True(t, checker.MustCheck()) - tests.AssertGRPCError(t, status.New(codes.Unavailable, `cannot get instance metadata`), checker.check("foo")) - }) - - t.Run("AMI/Checked", func(t *testing.T) { - db, teardown := setup(t) - defer teardown() - - settings, err := models.GetSettings(db.Querier) - require.NoError(t, err) - settings.AWSInstanceChecked = true - err = models.SaveSettings(db.Querier, settings) - require.NoError(t, err) - - telemetry := &mockTelemetryService{} - telemetry.Test(t) - telemetry.On("DistributionMethod").Return(serverv1.DistributionMethod_DISTRIBUTION_METHOD_AMI) - defer telemetry.AssertExpectations(t) - - checker := NewAWSInstanceChecker(db, telemetry) - assert.False(t, checker.MustCheck()) - assert.NoError(t, checker.check("foo")) - }) -} diff --git a/managed/services/server/server.go b/managed/services/server/server.go index 2bd2cd502d..051214bf8c 100644 --- a/managed/services/server/server.go +++ b/managed/services/server/server.go @@ -43,6 +43,7 @@ import ( serverv1 "github.com/percona/pmm/api/server/v1" "github.com/percona/pmm/managed/models" + "github.com/percona/pmm/managed/utils/distribution" "github.com/percona/pmm/managed/utils/envvars" "github.com/percona/pmm/version" ) @@ -58,7 +59,6 @@ type Server struct { templatesService templatesService supervisord supervisordService telemetryService telemetryService - awsInstanceChecker *AWSInstanceChecker grafanaClient grafanaClient haService haService updater *Updater @@ -91,9 +91,9 @@ type Params struct { VMAlertExternalRules vmAlertExternalRules Supervisord supervisordService TelemetryService telemetryService - AwsInstanceChecker *AWSInstanceChecker GrafanaClient grafanaClient Updater *Updater + Dus *distribution.Service } // NewServer returns new server for Server service. @@ -114,7 +114,6 @@ func NewServer(params *Params) (*Server, error) { vmalertExternalRules: params.VMAlertExternalRules, supervisord: params.Supervisord, telemetryService: params.TelemetryService, - awsInstanceChecker: params.AwsInstanceChecker, grafanaClient: params.GrafanaClient, updater: params.Updater, l: logrus.WithField("component", "server"), @@ -666,6 +665,11 @@ func (s *Server) writeSSHKey(sshKey string) error { s.sshKeyM.Lock() defer s.sshKeyM.Unlock() + distributionMethod := s.telemetryService.DistributionMethod() + if distributionMethod != serverv1.DistributionMethod_DISTRIBUTION_METHOD_AMI && distributionMethod != serverv1.DistributionMethod_DISTRIBUTION_METHOD_OVF { + return errors.New("SSH key can be set only on AMI and OVF distributions") + } + username := "pmm" usr, err := user.Lookup(username) if err != nil { @@ -676,35 +680,13 @@ func (s *Server) writeSSHKey(sshKey string) error { return errors.WithStack(err) } - uid, err := strconv.Atoi(usr.Uid) - if err != nil { - return errors.WithStack(err) - } - gid, err := strconv.Atoi(usr.Gid) - if err != nil { - return errors.WithStack(err) - } - if err = os.Chown(sshDirPath, uid, gid); err != nil { - return errors.WithStack(err) - } keysPath := path.Join(sshDirPath, "authorized_keys") if err = os.WriteFile(keysPath, []byte(sshKey), 0o600); err != nil { return errors.WithStack(err) } - if err = os.Chown(keysPath, uid, gid); err != nil { - return errors.WithStack(err) - } return nil } -// AWSInstanceCheck checks AWS EC2 instance ID. -func (s *Server) AWSInstanceCheck(ctx context.Context, req *serverv1.AWSInstanceCheckRequest) (*serverv1.AWSInstanceCheckResponse, error) { //nolint:revive - if err := s.awsInstanceChecker.check(req.InstanceId); err != nil { - return nil, err - } - return &serverv1.AWSInstanceCheckResponse{}, nil -} - // isAgentsStateUpdateNeeded - checks metrics resolution changes, // if it was changed, agents state must be updated. func isAgentsStateUpdateNeeded(mr *serverv1.MetricsResolutions) bool { diff --git a/managed/services/server/updater.go b/managed/services/server/updater.go index 0240536e19..62683a7643 100644 --- a/managed/services/server/updater.go +++ b/managed/services/server/updater.go @@ -147,7 +147,6 @@ func (up *Updater) StartUpdate(ctx context.Context, newImageName string) error { return errors.New("update already in progress") } up.running = true - up.performM.Unlock() if newImageName == "" { return errors.New("newImageName is empty") } diff --git a/managed/services/telemetry/deps.go b/managed/services/telemetry/deps.go index b10e89310b..603e669505 100644 --- a/managed/services/telemetry/deps.go +++ b/managed/services/telemetry/deps.go @@ -26,7 +26,7 @@ import ( // distributionUtilService service to get info about OS on which pmm server is running. type distributionUtilService interface { - getDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) + GetDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) } // sender is interface which defines method for client which sends report with metrics. diff --git a/managed/services/telemetry/mock_distribution_util_service_test.go b/managed/services/telemetry/mock_distribution_util_service_test.go index b8a33e7fb9..baa81ac8e8 100644 --- a/managed/services/telemetry/mock_distribution_util_service_test.go +++ b/managed/services/telemetry/mock_distribution_util_service_test.go @@ -14,12 +14,12 @@ type mockDistributionUtilService struct { mock.Mock } -// getDistributionMethodAndOS provides a mock function with given fields: -func (_m *mockDistributionUtilService) getDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) { +// GetDistributionMethodAndOS provides a mock function with given fields: +func (_m *mockDistributionUtilService) GetDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) { ret := _m.Called() if len(ret) == 0 { - panic("no return value specified for getDistributionMethodAndOS") + panic("no return value specified for GetDistributionMethodAndOS") } var r0 serverv1.DistributionMethod diff --git a/managed/services/telemetry/telemetry.go b/managed/services/telemetry/telemetry.go index c303094368..966ee5ec27 100644 --- a/managed/services/telemetry/telemetry.go +++ b/managed/services/telemetry/telemetry.go @@ -38,9 +38,7 @@ import ( ) const ( - distributionInfoFilePath = "/srv/pmm-distribution" - osInfoFilePath = "/proc/version" - sendChSize = 10 + sendChSize = 10 ) // Service reports telemetry. @@ -69,7 +67,9 @@ var ( ) // NewService creates a new service. -func NewService(db *reform.DB, portalClient *platform.Client, pmmVersion string, config ServiceConfig, extensions map[ExtensionType]Extension) (*Service, error) { +func NewService(db *reform.DB, portalClient *platform.Client, pmmVersion string, + dus distributionUtilService, config ServiceConfig, extensions map[ExtensionType]Extension, +) (*Service, error) { if config.SaasHostname == "" { return nil, errors.New("empty host") } @@ -80,7 +80,6 @@ func NewService(db *reform.DB, portalClient *platform.Client, pmmVersion string, if err != nil { return nil, err } - dus := newDistributionUtilServiceImpl(distributionInfoFilePath, osInfoFilePath, l) s := &Service{ db: db, l: l, @@ -94,7 +93,7 @@ func NewService(db *reform.DB, portalClient *platform.Client, pmmVersion string, extensions: extensions, } - s.sDistributionMethod, s.tDistributionMethod, s.os = dus.getDistributionMethodAndOS() + s.sDistributionMethod, s.tDistributionMethod, s.os = dus.GetDistributionMethodAndOS() s.dataSourcesMap = s.locateDataSources(config.telemetry) return s, nil @@ -360,7 +359,7 @@ func (s *Service) makeMetric(ctx context.Context) (*pmmv1.ServerMetric, error) { if err != nil { return nil, errors.Wrapf(err, "failed to decode UUID %s", serverIDToUse) } - _, distMethod, _ := s.dus.getDistributionMethodAndOS() + _, distMethod, _ := s.dus.GetDistributionMethodAndOS() eventID := uuid.New() return &pmmv1.ServerMetric{ diff --git a/managed/services/telemetry/telemetry_test.go b/managed/services/telemetry/telemetry_test.go index 16dcf8722b..ac463b6589 100644 --- a/managed/services/telemetry/telemetry_test.go +++ b/managed/services/telemetry/telemetry_test.go @@ -34,6 +34,7 @@ import ( serverv1 "github.com/percona/pmm/api/server/v1" "github.com/percona/pmm/managed/models" + "github.com/percona/pmm/managed/utils/distribution" "github.com/percona/pmm/managed/utils/testdb" ) @@ -258,7 +259,7 @@ func getServiceConfig(pgPortHost string, qanDSN string, vmDSN string) ServiceCon return serviceConfig } -func getDistributionUtilService(t *testing.T, l *logrus.Entry) *distributionUtilServiceImpl { +func getDistributionUtilService(t *testing.T, l *logrus.Entry) distributionUtilService { t.Helper() const ( tmpDistributionFile = "/tmp/distribution" @@ -269,7 +270,7 @@ func getDistributionUtilService(t *testing.T, l *logrus.Entry) *distributionUtil assert.Fail(t, "cannot write to file: ", err) return nil } - dus := newDistributionUtilServiceImpl(tmpDistributionFile, osInfoFilePath, l) + dus := distribution.NewService(tmpDistributionFile, "/proc/version", l) return dus } diff --git a/managed/services/telemetry/distribution_util.go b/managed/utils/distribution/distribution_util.go similarity index 73% rename from managed/services/telemetry/distribution_util.go rename to managed/utils/distribution/distribution_util.go index 986ee00f55..e25f21b3b5 100644 --- a/managed/services/telemetry/distribution_util.go +++ b/managed/utils/distribution/distribution_util.go @@ -13,7 +13,8 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -package telemetry +// Package distribution provides structures and methods to determine the distribution method and OS of the PMM Server. +package distribution import ( "bytes" @@ -26,29 +27,36 @@ import ( serverv1 "github.com/percona/pmm/api/server/v1" ) -type distributionUtilServiceImpl struct { +// Service provides methods to determine the distribution method and OS of the PMM Server. +type Service struct { distributionInfoFilePath string osInfoFilePath string l *logrus.Entry } -func newDistributionUtilServiceImpl(distributionFilePath, osInfoFilePath string, l *logrus.Entry) *distributionUtilServiceImpl { - return &distributionUtilServiceImpl{ +// NewService creates a new Distribution Service. +func NewService(distributionFilePath, osInfoFilePath string, l *logrus.Entry) *Service { + return &Service{ distributionInfoFilePath: distributionFilePath, osInfoFilePath: osInfoFilePath, l: l, } } -func (d distributionUtilServiceImpl) getDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) { - b, err := os.ReadFile(d.distributionInfoFilePath) - if err != nil { - d.l.Debugf("Failed to read %s: %s", d.distributionInfoFilePath, err) - } +// GetDistributionMethodAndOS returns the distribution method and OS of the PMM Server. +func (d Service) GetDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) { + dm := os.Getenv("PMM_DISTRIBUTION_METHOD") + if dm == "" { + b, err := os.ReadFile(d.distributionInfoFilePath) + if err != nil { + d.l.Debugf("Failed to read %s: %s", d.distributionInfoFilePath, err) + } - b = bytes.ToLower(bytes.TrimSpace(b)) - switch string(b) { + b = bytes.ToLower(bytes.TrimSpace(b)) + dm = string(b) + } + switch dm { case "ovf": return serverv1.DistributionMethod_DISTRIBUTION_METHOD_OVF, pmmv1.DistributionMethod_OVF, "ovf" case "ami": @@ -58,7 +66,8 @@ func (d distributionUtilServiceImpl) getDistributionMethodAndOS() (serverv1.Dist case "digitalocean": return serverv1.DistributionMethod_DISTRIBUTION_METHOD_DO, pmmv1.DistributionMethod_DO, "digitalocean" case "docker", "": // /srv/pmm-distribution does not exist in PMM 2.0. - if b, err = os.ReadFile(d.osInfoFilePath); err != nil { + b, err := os.ReadFile(d.osInfoFilePath) + if err != nil { d.l.Debugf("Failed to read %s: %s", d.osInfoFilePath, err) } return serverv1.DistributionMethod_DISTRIBUTION_METHOD_DOCKER, pmmv1.DistributionMethod_DOCKER, d.getLinuxDistribution(string(b)) @@ -85,7 +94,7 @@ var procVersionRegexps = []pair{ } // getLinuxDistribution detects Linux distribution and version from /proc/version information. -func (d distributionUtilServiceImpl) getLinuxDistribution(procVersion string) string { +func (d Service) getLinuxDistribution(procVersion string) string { for _, p := range procVersionRegexps { match := p.re.FindStringSubmatchIndex(procVersion) if match != nil { diff --git a/managed/services/telemetry/distribution_util_test.go b/managed/utils/distribution/distribution_util_test.go similarity index 94% rename from managed/services/telemetry/distribution_util_test.go rename to managed/utils/distribution/distribution_util_test.go index 596b0ce373..dca253ccd0 100644 --- a/managed/services/telemetry/distribution_util_test.go +++ b/managed/utils/distribution/distribution_util_test.go @@ -13,7 +13,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -package telemetry +package distribution import ( "os" @@ -132,11 +132,11 @@ func Test_distributionUtilServiceImpl_getDistributionMethodAndOS(t *testing.T) { tmpOsInfoFilePath = f2.Name() } - d := newDistributionUtilServiceImpl(tmpDistributionFilePath, tmpOsInfoFilePath, logEntry) - got, got1, got2 := d.getDistributionMethodAndOS() - assert.Equalf(t, tt.want, got, "getDistributionMethodAndOS() serverv1.DistributionMethod") - assert.Equalf(t, tt.want1, got1, "getDistributionMethodAndOS() pmmv1.DistributionMethod") - assert.Equalf(t, tt.want2, got2, "getDistributionMethodAndOS() name") + d := NewService(tmpDistributionFilePath, tmpOsInfoFilePath, logEntry) + got, got1, got2 := d.GetDistributionMethodAndOS() + assert.Equalf(t, tt.want, got, "GetDistributionMethodAndOS() serverv1.DistributionMethod") + assert.Equalf(t, tt.want1, got1, "GetDistributionMethodAndOS() pmmv1.DistributionMethod") + assert.Equalf(t, tt.want2, got2, "GetDistributionMethodAndOS() name") }) } } @@ -228,7 +228,7 @@ func Test_distributionUtilServiceImpl_getLinuxDistribution(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() - d := distributionUtilServiceImpl{ + d := Service{ distributionInfoFilePath: tmpDistributionFile, osInfoFilePath: tmpOsInfoFilePath, l: logEntry, diff --git a/managed/utils/envvars/parser.go b/managed/utils/envvars/parser.go index d2515f5ea3..6d68a85187 100644 --- a/managed/utils/envvars/parser.go +++ b/managed/utils/envvars/parser.go @@ -176,7 +176,7 @@ func ParseEnvVars(envs []string) (*models.ChangeSettingsParams, []error, []strin err = fmt.Errorf("invalid value %q for environment variable %q", v, k) } - case "PMM_INSTALL_METHOD": + case "PMM_INSTALL_METHOD", "PMM_DISTRIBUTION_METHOD": continue case envEnableAccessControl: diff --git a/qan-api2/main.go b/qan-api2/main.go index 2d982afb3f..382bff4e38 100644 --- a/qan-api2/main.go +++ b/qan-api2/main.go @@ -149,8 +149,7 @@ func runJSONServer(ctx context.Context, grpcBindF, jsonBindF string) { proxyMux := grpc_gateway.NewServeMux( grpc_gateway.WithMarshalerOption(grpc_gateway.MIMEWildcard, marshaller), - grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler), - ) + grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler)) opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} type registrar func(context.Context, *grpc_gateway.ServeMux, string, []grpc.DialOption) error diff --git a/tools/go.mod b/tools/go.mod index 507e62a6ce..ced0cc8631 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -2,7 +2,7 @@ module github.com/percona/pmm/tools go 1.22 -toolchain go1.22.2 +toolchain go1.22.5 replace github.com/go-openapi/spec => github.com/Percona-Lab/spec v0.20.5-percona @@ -10,36 +10,33 @@ require ( github.com/BurntSushi/go-sumtype v0.0.0-20190304192233-fcb4a6205bdc github.com/Percona-Lab/swagger-order v0.0.0-20191002141859-166b3973d026 github.com/apache/skywalking-eyes v0.6.0 - github.com/bufbuild/buf v1.31.0 + github.com/bufbuild/buf v1.36.0 github.com/daixiang0/gci v0.13.0 - github.com/envoyproxy/protoc-gen-validate v1.0.4 - github.com/go-delve/delve v1.22.0 + github.com/envoyproxy/protoc-gen-validate v1.1.0 + github.com/go-delve/delve v1.23.0 github.com/go-openapi/runtime v0.25.0 github.com/go-openapi/spec v0.20.4 github.com/go-swagger/go-swagger v0.29.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 github.com/jstemmer/go-junit-report v1.0.0 github.com/quasilyte/go-consistent v0.6.0 - github.com/reviewdog/reviewdog v0.18.0 + github.com/reviewdog/reviewdog v0.20.1 github.com/vburenin/ifacemaker v1.2.1 - github.com/vektra/mockery/v2 v2.43.0 + github.com/vektra/mockery/v2 v2.44.1 golang.org/x/perf v0.0.0-20230717203022-1ba3a21238c9 - golang.org/x/tools v0.22.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 + golang.org/x/tools v0.24.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 google.golang.org/protobuf v1.34.2 gopkg.in/reform.v1 v1.5.1 mvdan.cc/gofumpt v0.6.0 ) require ( - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240401165935-b983156c5e99.1 // indirect - cloud.google.com/go v0.114.0 // indirect - cloud.google.com/go/auth v0.5.1 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/datastore v1.17.1 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240508200655-46a4cf4ba109.2 // indirect + buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.2-20240610164129-660609bc46d3.1 // indirect + buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.2-20240610164129-660609bc46d3.2 // indirect code.gitea.io/sdk/gitea v0.18.0 // indirect - connectrpc.com/connect v1.16.1 // indirect + connectrpc.com/connect v1.16.2 // indirect connectrpc.com/otelconnect v0.7.0 // indirect dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect @@ -54,8 +51,8 @@ require ( github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/bmatcuk/doublestar/v2 v2.0.4 // indirect - github.com/bradleyfalzon/ghinstallation/v2 v2.11.0 // indirect - github.com/bufbuild/protocompile v0.9.0 // indirect + github.com/bufbuild/protocompile v0.14.0 // indirect + github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee // indirect github.com/bufbuild/protovalidate-go v0.6.2 // indirect github.com/bufbuild/protoyaml-go v0.1.9 // indirect github.com/chigopher/pathlib v0.19.1 // indirect @@ -69,24 +66,23 @@ require ( github.com/denisenkom/go-mssqldb v0.9.0 // indirect github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v26.1.0+incompatible // indirect + github.com/docker/cli v26.1.4+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v26.1.0+incompatible // indirect - github.com/docker/docker-credential-helpers v0.8.1 // indirect + github.com/docker/docker v27.1.0+incompatible // indirect + github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/felixge/fgprof v0.9.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-chi/chi/v5 v5.0.12 // indirect - github.com/go-delve/gore v0.11.6 // indirect - github.com/go-delve/liner v1.2.3-0.20220127212407-d32d89dd2a5d // indirect + github.com/go-chi/chi/v5 v5.0.14 // indirect + github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62 // indirect github.com/go-fed/httpsig v1.1.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.11.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/analysis v0.21.3 // indirect github.com/go-openapi/errors v0.20.2 // indirect @@ -105,26 +101,20 @@ require ( github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5 // indirect github.com/go-toolsmith/typep v1.0.2 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect - github.com/gofrs/uuid/v5 v5.1.0 // indirect + github.com/gofrs/uuid/v5 v5.2.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/cel-go v0.20.1 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/go-containerregistry v0.19.1 // indirect - github.com/google/go-dap v0.11.0 // indirect + github.com/google/go-containerregistry v0.19.2 // indirect + github.com/google/go-dap v0.12.0 // indirect github.com/google/go-github/v33 v33.0.0 // indirect - github.com/google/go-github/v60 v60.0.0 // indirect github.com/google/go-github/v62 v62.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/licensecheck v0.3.1 // indirect - github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/pprof v0.0.0-20240622144329-c177fd99eaa9 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.4 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect @@ -132,7 +122,7 @@ require ( github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/haya14busa/go-actions-toolkit v0.0.0-20200105081403-ca0307860f01 // indirect - github.com/haya14busa/go-sarif v0.0.0-20210102043135-e2c5fed2fa3d // indirect + github.com/haya14busa/go-sarif v0.0.0-20240630170108-a3ba8d79599f // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/orderedmap v0.2.0 // indirect @@ -147,12 +137,12 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.6 // indirect - github.com/lyft/protoc-gen-star/v2 v2.0.3 // indirect + github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -190,7 +180,7 @@ require ( github.com/skeema/knownhosts v1.2.1 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect @@ -198,12 +188,9 @@ require ( github.com/subosito/gotenv v1.4.2 // indirect github.com/toqueteos/webbrowser v1.2.0 // indirect github.com/vbatts/tar-split v0.11.5 // indirect - github.com/vvakame/sdlog v1.2.0 // indirect - github.com/xanzy/go-gitlab v0.105.0 // indirect + github.com/xanzy/go-gitlab v0.106.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.mongodb.org/mongo-driver v1.9.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect @@ -215,22 +202,20 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.6.0 // indirect - golang.org/x/build v0.0.0-20240616231658-d6ee231f334b // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect + golang.org/x/build v0.0.0-20240712162709-0b82a206aadf // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.183.0 // indirect - google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/grpc v1.64.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a // indirect + google.golang.org/grpc v1.65.0 // indirect gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/tools/go.sum b/tools/go.sum index 942ba3201b..178a3f9bb4 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -1,5 +1,9 @@ -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240401165935-b983156c5e99.1 h1:2IGhRovxlsOIQgx2ekZWo4wTPAYpck41+18ICxs37is= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240401165935-b983156c5e99.1/go.mod h1:Tgn5bgL220vkFOI0KPStlcClPeOJzAv4uT+V8JXGUnw= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240508200655-46a4cf4ba109.2 h1:cFrEG/pJch6t62+jqndcPXeTNkYcztS4tBRgNkR+drw= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240508200655-46a4cf4ba109.2/go.mod h1:ylS4c28ACSI59oJrOdW4pHS4n0Hw4TgSPHn8rpHl4Yw= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.2-20240610164129-660609bc46d3.1 h1:PmSlGbLLyhKIAm46ROmzdGVaaYgDdFsQNA+VftjuCLs= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.2-20240610164129-660609bc46d3.1/go.mod h1:4ptL49VoWyYwajT6j4zu5vmQ/k/om4tGMB9atY2FhEo= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.2-20240610164129-660609bc46d3.2 h1:y1+UxFIWzj/eF2RCPqt9egR7Rt9vgQkXNUzSdmR6iEU= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.2-20240610164129-660609bc46d3.2/go.mod h1:psseUmlKRo9v5LZJtR/aTpdTLuyp9o3X7rnLT87SZEo= cloud.google.com/go v0.0.0-20170206221025-ce650573d812/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -20,24 +24,14 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.114.0 h1:OIPFAdfrFDFO2ve2U7r/H5SwSbBzEdrBdE7xkgwc+kY= -cloud.google.com/go v0.114.0/go.mod h1:ZV9La5YYxctro1HTPug5lXH/GefROyW8PPD4T8n9J8E= -cloud.google.com/go/auth v0.5.1 h1:0QNO7VThG54LUzKiQxv8C6x1YX7lUrzlAa1nVLF8CIw= -cloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.17.1 h1:6Me8ugrAOAxssGhSo8im0YSuy4YvYk4mbGvCadAH5aE= -cloud.google.com/go/datastore v1.17.1/go.mod h1:mtzZ2HcVtz90OVrEXXGDc2pO4NM1kiBQy8YV4qGe0ZM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -50,8 +44,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= code.gitea.io/sdk/gitea v0.18.0 h1:+zZrwVmujIrgobt6wVBWCqITz6bn1aBjnCUHmpZrerI= code.gitea.io/sdk/gitea v0.18.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI= -connectrpc.com/connect v1.16.1 h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis= -connectrpc.com/connect v1.16.1/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= +connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= +connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= @@ -108,14 +102,14 @@ github.com/bmatcuk/doublestar/v2 v2.0.4 h1:6I6oUiT/sU27eE2OFcWqBhL1SwjyvQuOssxT4 github.com/bmatcuk/doublestar/v2 v2.0.4/go.mod h1:QMmcs3H2AUQICWhfzLXz+IYln8lRQmTZRptLie8RgRw= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bradleyfalzon/ghinstallation/v2 v2.11.0 h1:R9d0v+iobRHSaE4wKUnXFiZp53AL4ED5MzgEMwGTZag= -github.com/bradleyfalzon/ghinstallation/v2 v2.11.0/go.mod h1:0LWKQwOHewXO/1acI6TtyE0Xc4ObDb2rFN7eHBAG71M= github.com/brianvoe/gofakeit v3.18.0+incompatible h1:wDOmHc9DLG4nRjUVVaxA+CEglKOW72Y5+4WNxUIkjM8= github.com/brianvoe/gofakeit v3.18.0+incompatible/go.mod h1:kfwdRA90vvNhPutZWfH7WPaDzUjz+CZFqG+rPkOjGOc= -github.com/bufbuild/buf v1.31.0 h1:YHLGIr8bjcLaTCIw0+/bCAvJLiR8u46QTwKvn7miSEg= -github.com/bufbuild/buf v1.31.0/go.mod h1:LlxpG2LF33f1Ixw29BTt0pyLriLzg3rXY1K9XQVHSio= -github.com/bufbuild/protocompile v0.9.0 h1:DI8qLG5PEO0Mu1Oj51YFPqtx6I3qYXUAhJVJ/IzAVl0= -github.com/bufbuild/protocompile v0.9.0/go.mod h1:s89m1O8CqSYpyE/YaSGtg1r1YFMF5nLTwh4vlj6O444= +github.com/bufbuild/buf v1.36.0 h1:sC/MRgAhwvcbLbUXlTY+zgLUT4PzHm19BnnEsgu/rgU= +github.com/bufbuild/buf v1.36.0/go.mod h1:SM7b5QW3FkQPNkkqIa/9UWzLOoe51la+GGZpEgH9b68= +github.com/bufbuild/protocompile v0.14.0 h1:z3DW4IvXE5G/uTOnSQn+qwQQxvhckkTWLS/0No/o7KU= +github.com/bufbuild/protocompile v0.14.0/go.mod h1:N6J1NYzkspJo3ZwyL4Xjvli86XOj1xq4qAasUFxGups= +github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee h1:E6ET8YUcYJ1lAe6ctR3as7yqzW2BNItDFnaB5zQq/8M= +github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee/go.mod h1:HjGFxsck9RObrTJp2hXQZfWhPgZqnR6sR1U5fCA/Kus= github.com/bufbuild/protovalidate-go v0.6.2 h1:U/V3CGF0kPlR12v41rjO4DrYZtLcS4ZONLmWN+rJVCQ= github.com/bufbuild/protovalidate-go v0.6.2/go.mod h1:4BR3rKEJiUiTy+sqsusFn2ladOf0kYmA2Reo6BHSBgQ= github.com/bufbuild/protoyaml-go v0.1.9 h1:anV5UtF1Mlvkkgp4NWA6U/zOnJFng8Orq4Vf3ZUQHBU= @@ -153,7 +147,6 @@ github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9N github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosiner/argv v0.1.0 h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg= github.com/cosiner/argv v0.1.0/go.mod h1:EusR6TucWKX+zFgtdUsKT2Cvg45K5rtpCcWz4hK06d8= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -174,14 +167,14 @@ github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d h1:hUWoLdw5kvo2xC github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d/go.mod h1:C7Es+DLenIpPc9J6IYw4jrK0h7S9bKj4DNl8+KxGEXU= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.0+incompatible h1:+nwRy8Ocd8cYNQ60mozDDICICD8aoFGtlPXifX/UQ3Y= -github.com/docker/cli v26.1.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= +github.com/docker/cli v26.1.4+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 v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= -github.com/docker/docker v26.1.0+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/docker v27.1.0+incompatible h1:rEHVQc4GZ0MIQKifQPHSFGV/dVgaZafgRf8fCPtDYBs= +github.com/docker/docker v27.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= +github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -196,8 +189,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= @@ -214,14 +207,12 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= -github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= -github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-delve/delve v1.22.0 h1:c7GOFs49/jMGHdp10KphKkGqNmLjOp7fcwz1MQwcMlw= -github.com/go-delve/delve v1.22.0/go.mod h1:cSvtTzN0Ei8NsPH7TbxeQSLBmdsreeAD5p1UNhrII7w= -github.com/go-delve/gore v0.11.6 h1:MyP7xTNQO+dDiLBKxI/DKgkn74cMBjHZZxS8grtJ6G8= -github.com/go-delve/gore v0.11.6/go.mod h1:6RBVnEUxVGkztpRY0UDUnEzS4GqETQjWrw8rhegmN4I= -github.com/go-delve/liner v1.2.3-0.20220127212407-d32d89dd2a5d h1:pxjSLshkZJGLVm0wv20f/H0oTWiq/egkoJQ2ja6LEvo= -github.com/go-delve/liner v1.2.3-0.20220127212407-d32d89dd2a5d/go.mod h1:biJCRbqp51wS+I92HMqn5H8/A0PAhxn2vyOT+JqhiGI= +github.com/go-chi/chi/v5 v5.0.14 h1:PyEwo2Vudraa0x/Wl6eDRRW2NXBvekgfxyydcM0WGE0= +github.com/go-chi/chi/v5 v5.0.14/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-delve/delve v1.23.0 h1:jYgZISZ14KAO3ys8kD07kjrowrygE9F9SIwnpz9xXys= +github.com/go-delve/delve v1.23.0/go.mod h1:S3SLuEE2mn7wipKilTvk1p9HdTMnXXElcEpiZ+VcuqU= +github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62 h1:IGtvsNyIuRjl04XAOFGACozgUD7A82UffYxZt4DWbvA= +github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62/go.mod h1:biJCRbqp51wS+I92HMqn5H8/A0PAhxn2vyOT+JqhiGI= github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= @@ -243,8 +234,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= @@ -332,12 +323,10 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid/v5 v5.1.0 h1:S5rqVKIigghZTCBKPCw0Y+bXkn26K3TB5mvQq2Ix8dk= -github.com/gofrs/uuid/v5 v5.1.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= +github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM= +github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -368,7 +357,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -389,19 +377,15 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.19.1 h1:yMQ62Al6/V0Z7CqIrrS1iYoA5/oQCm88DeNujc7C1KY= -github.com/google/go-containerregistry v0.19.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= -github.com/google/go-dap v0.11.0 h1:SpAZJL41rOOvd85PuLCCLE1dteTQOyKNnn0H3DBHywo= -github.com/google/go-dap v0.11.0/go.mod h1:HAeyoSd2WIfTfg+0GRXcFrb+RnojAtGNh+k+XTIxJDE= +github.com/google/go-containerregistry v0.19.2 h1:TannFKE1QSajsP6hPWb5oJNgKe1IKjHukIKDUmvsV6w= +github.com/google/go-containerregistry v0.19.2/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= +github.com/google/go-dap v0.12.0 h1:rVcjv3SyMIrpaOoTAdFDyHs99CwVOItIJGKLQFQhNeM= +github.com/google/go-dap v0.12.0/go.mod h1:tNjCASCm5cqePi/RVXXWEVqtnNLV1KTWtYOqu6rZNzc= github.com/google/go-github/v33 v33.0.0 h1:qAf9yP0qc54ufQxzwv+u9H0tiVOnPJxo0lI/JXqw3ZM= github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg= -github.com/google/go-github/v60 v60.0.0 h1:oLG98PsLauFvvu4D/YPxq374jhSxFYdzQGNCyONLfn8= -github.com/google/go-github/v60 v60.0.0/go.mod h1:ByhX2dP9XT9o/ll2yXAu2VD8l5eNVg8hD4Cr0S/LmQk= github.com/google/go-github/v62 v62.0.0 h1:/6mGCaRywZz9MuHyw9gD1CwsbmBX8GWsbFkwMmHdhl4= github.com/google/go-github/v62 v62.0.0/go.mod h1:EMxeUqGJq2xRu9DYBMwel/mr7kZrzUOfQmmpYrZn2a4= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -424,29 +408,23 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7 h1:3q13T5NW3mlTJZM6B5UAsf2N5NYFbYWIyI3W8DlvBDU= -github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240622144329-c177fd99eaa9 h1:ouFdLLCOyCfnxGpQTMZKHLyHr/D1GFbQzEsJxumO16E= +github.com/google/pprof v0.0.0-20240622144329-c177fd99eaa9/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/safehtml v0.0.2/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= -github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= @@ -464,8 +442,9 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/haya14busa/go-actions-toolkit v0.0.0-20200105081403-ca0307860f01 h1:HiJF8Mek+I7PY0Bm+SuhkwaAZSZP83sw6rrTMrgZ0io= github.com/haya14busa/go-actions-toolkit v0.0.0-20200105081403-ca0307860f01/go.mod h1:1DWDZmeYf0LX30zscWb7K9rUMeirNeBMd5Dum+seUhc= github.com/haya14busa/go-checkstyle v0.0.0-20170303121022-5e9d09f51fa1/go.mod h1:RsN5RGgVYeXpcXNtWyztD5VIe7VNSEqpJvF2iEH7QvI= -github.com/haya14busa/go-sarif v0.0.0-20210102043135-e2c5fed2fa3d h1:2uCbyMhWNFYI+HkRqXfIeTq5pTPxQM68yG+INJ2gvq8= github.com/haya14busa/go-sarif v0.0.0-20210102043135-e2c5fed2fa3d/go.mod h1:1Hkn3JseGMB/hv1ywzkapVQDWV3bFgp6POZobZmR/5g= +github.com/haya14busa/go-sarif v0.0.0-20240630170108-a3ba8d79599f h1:IrBUFBhHflcoA53Wp5TEK15bAgad0bgzY0FzW2CV5Oc= +github.com/haya14busa/go-sarif v0.0.0-20240630170108-a3ba8d79599f/go.mod h1:1Hkn3JseGMB/hv1ywzkapVQDWV3bFgp6POZobZmR/5g= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -495,8 +474,8 @@ github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jhump/protoreflect v1.15.6 h1:WMYJbw2Wo+KOWwZFvgY0jMoVHM6i4XIvRs2RcBj5VmI= -github.com/jhump/protoreflect v1.15.6/go.mod h1:jCHoyYQIJnaabEYnbGwyo9hUqfyUMTbJw/tAut5t97E= +github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg= +github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= @@ -516,8 +495,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -536,8 +515,8 @@ github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1 github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lyft/protoc-gen-star/v2 v2.0.3 h1:/3+/2sWyXeMLzKd1bX+ixWKgEMsULrIivpDsuaF441o= -github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= +github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4 h1:sIXJOMrYnQZJu7OB7ANSF4MYri2fTEGIsRLz6LwI4xE= +github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -623,8 +602,8 @@ github.com/reviewdog/errorformat v0.0.0-20240608101709-1d3280ed6bd4 h1:wFzV+/Kig github.com/reviewdog/errorformat v0.0.0-20240608101709-1d3280ed6bd4/go.mod h1:AqhrP0G7F9YRROF10JQwdd4cNO8bdm6bY6KzcOc3Cp8= github.com/reviewdog/go-bitbucket v0.0.0-20201024094602-708c3f6a7de0 h1:XZ60Bp2UqwaJ6fDQExoFVrgs4nIzwBCy9ct6GCj9hH8= github.com/reviewdog/go-bitbucket v0.0.0-20201024094602-708c3f6a7de0/go.mod h1:5JbWAMFyq9hbISZawRyIe7QTcLaptvCIvmZnYo+1VvA= -github.com/reviewdog/reviewdog v0.18.0 h1:U7em0JfRjEp1oaUvIe2kMI4NwTOUQkW8gK8b+hVb61M= -github.com/reviewdog/reviewdog v0.18.0/go.mod h1:7TGHiO6vrNCLEdlo5WcurtIFabcHNhQx9i6R7DxKydI= +github.com/reviewdog/reviewdog v0.20.1 h1:t5MGy3pSgAoXnCvcZvrzzQ8FtDkjH8QRblD8vYLgQVc= +github.com/reviewdog/reviewdog v0.20.1/go.mod h1:h5ON9DMAcqjkpo2Vi7AdetHbYykKD3WYCBaQ1pmi5RI= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -661,8 +640,8 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -699,12 +678,10 @@ github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinC github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/vburenin/ifacemaker v1.2.1 h1:3Vq8B/bfBgjWTkv+jDg4dVL1KHt3k1K4lO7XRxYA2sk= github.com/vburenin/ifacemaker v1.2.1/go.mod h1:5WqrzX2aD7/hi+okBjcaEQJMg4lDGrpuEX3B8L4Wgrs= -github.com/vektra/mockery/v2 v2.43.0 h1:9jgLwYbFIKPwWJUeK6Y+0s9oLRIGXLfW4FWlmF9R8c0= -github.com/vektra/mockery/v2 v2.43.0/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= -github.com/vvakame/sdlog v1.2.0 h1:gwZRXZ0EmhJQJN/Do/+PTQigcmFiSqZ07aDjxqGOLT8= -github.com/vvakame/sdlog v1.2.0/go.mod h1:gFYv2g/iR3pJSxkJz0YnkNmhNbXT5R3PzWsfZKGQADY= -github.com/xanzy/go-gitlab v0.105.0 h1:3nyLq0ESez0crcaM19o5S//SvezOQguuIHZ3wgX64hM= -github.com/xanzy/go-gitlab v0.105.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= +github.com/vektra/mockery/v2 v2.44.1 h1:lfvocO3HklLp68gezPBVaHl+5rKXloGCO7eTEXh71dA= +github.com/vektra/mockery/v2 v2.44.1/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= +github.com/xanzy/go-gitlab v0.106.0 h1:EDfD03K74cIlQo2EducfiupVrip+Oj02bq9ofw5F8sA= +github.com/xanzy/go-gitlab v0.106.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -726,10 +703,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= @@ -746,8 +719,8 @@ go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8 go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.starlark.net v0.0.0-20231101134539-556fd59b42f6 h1:+eC0F/k4aBLC4szgOcjd7bDTEnpxADJyWJE0yowgM3E= go.starlark.net v0.0.0-20231101134539-556fd59b42f6/go.mod h1:LcLNIzVOMp4oV+uusnpk+VU+SzXaJakUuBjoCSWH5dM= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= @@ -760,8 +733,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= -golang.org/x/build v0.0.0-20240616231658-d6ee231f334b h1:g2bDentUrL5ARPWxm9++zo6zvqaby93QvbQJqxRCZHY= -golang.org/x/build v0.0.0-20240616231658-d6ee231f334b/go.mod h1:Q3Y4+jnPQCnNizilofBXOJ7EmO14lCIRAAE8pKZshic= +golang.org/x/build v0.0.0-20240712162709-0b82a206aadf h1:yxXHOnHUeXT9mop6DOYhyBNeVl20sSyKYR6+5YAwLnk= +golang.org/x/build v0.0.0-20240712162709-0b82a206aadf/go.mod h1:YsGhg4JUVUWLzdqU2wCrtpRrOveOql6w56FLDHq/CJ4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -780,8 +753,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -796,8 +769,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -832,8 +805,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -863,7 +836,6 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -872,8 +844,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -901,8 +873,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -963,16 +935,16 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -985,8 +957,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1051,8 +1023,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1084,8 +1056,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.183.0 h1:PNMeRDwo1pJdgNcFQ9GstuLe/noWKIc89pRWRLMvLwE= -google.golang.org/api v0.183.0/go.mod h1:q43adC5/pHoSZTx5h2mSmdF7NcyfW9JuDyIOJAgS9ZQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1129,12 +1099,10 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20240528184218-531527333157 h1:u7WMYrIrVvs0TF5yaKwKNbcJyySYf+HAIFXxWltJOXE= -google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= -google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a h1:YIa/rzVqMEokBkPtydCkx1VLmv3An1Uw7w1P1m6EhOY= +google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a h1:hqK4+jJZXCU4pW7jsAdGOVFIfLHQeV7LaizZKnZ84HI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1152,10 +1120,10 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1166,8 +1134,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=