profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/valyala/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Aliaksandr Valialkin valyala @VictoriaMetrics Kyiv https://victoriametrics.com Working on @VictoriaMetrics

valyala/fasthttp 15323

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

valyala/fastjson 1247

Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection

valyala/bytebufferpool 636

Anti-memory-waste byte buffer pool

valyala/fasttemplate 503

Simple and fast template engine for Go

valyala/goloris 299

Slowloris for nginx DoS. Written in go

valyala/fastrand 127

Fast and scalable pseudorandom generator for Go

valyala/gheap 107

Fast generalized heap tree algorithms in C++ and C. Provides simultaneous support for D-heap and B-heap.

valyala/fastrpc 77

Building blocks for fast rpc systems

valyala/chclient 40

Fast http client for SELECT queries in clickhouse

valyala/fasthttprouter 18

A high performance fasthttp request router that scales well

startedvalyala/fasthttp

started time in 2 hours

startedvalyala/fasttemplate

started time in 4 hours

startedvalyala/quicktemplate

started time in 4 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c componentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1 	return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil } +type checkResponse struct {+	err                   error+	kuberentesClusterName string+	pxcOperatorVersion    string+	psmdbOperatorVersion  string+}++func (c componentsService) getInstalledOperatorsVersion(ctx context.Context, wg *sync.WaitGroup, responseCh chan checkResponse, kuberentesCluster *models.KubernetesCluster) {+	defer wg.Done()+	resp, err := c.dbaasClient.CheckKubernetesClusterConnection(ctx, kuberentesCluster.KubeConfig)+	if err != nil {+		responseCh <- checkResponse{+			err: err,+		}+		return+	}+	responseCh <- checkResponse{+		kuberentesClusterName: kuberentesCluster.KubernetesClusterName,+		pxcOperatorVersion:    resp.Operators.Xtradb.Version,+		psmdbOperatorVersion:  resp.Operators.Psmdb.Version,+	}+}++func doesOperatorNeedUpdate(installedOperatorVersion, latestOperatorForInstalledPMM *goversion.Version) (availableOperatorVersion string) {+	if latestOperatorForInstalledPMM.GreaterThan(installedOperatorVersion) {+		return latestOperatorForInstalledPMM.String()+	}+	return ""+}++func (c componentsService) CheckForOperatorUpdate(ctx context.Context, req *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) {+	if pmmversion.PMMVersion == "" {+		return nil, status.Error(codes.Internal, "failed to get current PMM version")+	}++	// List operator versions in all kuberenetes clusters.+	clusters, err := models.FindAllKubernetesClusters(c.db.Querier)+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	// And get operators version from all of them.+	responseCh := make(chan checkResponse, len(clusters))+	go func() {+		wg := &sync.WaitGroup{}+		wg.Add(len(clusters))+		for _, cluster := range clusters {+			k8sCluster := cluster+			go c.getInstalledOperatorsVersion(ctx, wg, responseCh, k8sCluster)+		}+		wg.Wait()+		close(responseCh)+	}()++	// Meanwhile, get latest operators version compatible with installed PMM.+	pmmVersionParts := strings.Split(pmmversion.PMMVersion, "-") // handle development builds, for example: 2.18.0-27-g1e5f59d-dirty+	latestPXCOperatorForInstalledPMM, latestPSMDBOperatorForInstalledPMM, err := c.versionServiceClient.GetLatestOperatorVersion(ctx, pmmVersionParts[0])+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	if latestPXCOperatorForInstalledPMM == nil || latestPSMDBOperatorForInstalledPMM == nil {+		return nil, status.Error(codes.Internal, "latest versions are of invalid values")+	}++	resp := &dbaasv1beta1.CheckForOperatorUpdateResponse{+		ClusterToComponents: make(map[string]*dbaasv1beta1.ComponentsUpdateInformation),+	}+	// Some of the requests to kuberenetes clusters for getting operators versions should be done.+	// Go through them and decide what operator needs update.+	for operatorsVersion := range responseCh {+		if operatorsVersion.err != nil {+			c.l.Error(operatorsVersion.err)

Logging error via channel makes no sense, because timing is very important in logs.

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 type componentVersion struct { }  type matrix struct {-	Mongod       map[string]componentVersion `json:"mongod"`-	Pxc          map[string]componentVersion `json:"pxc"`-	Pmm          map[string]componentVersion `json:"pmm"`-	Proxysql     map[string]componentVersion `json:"proxysql"`-	Haproxy      map[string]componentVersion `json:"haproxy"`-	Backup       map[string]componentVersion `json:"backup"`-	Operator     map[string]componentVersion `json:"operator"`-	LogCollector map[string]componentVersion `json:"logCollector"`+	Mongod        map[string]componentVersion `json:"mongod"`+	Pxc           map[string]componentVersion `json:"pxc"`+	Pmm           map[string]componentVersion `json:"pmm"`+	Proxysql      map[string]componentVersion `json:"proxysql"`+	Haproxy       map[string]componentVersion `json:"haproxy"`+	Backup        map[string]componentVersion `json:"backup"`+	Operator      map[string]componentVersion `json:"operator"`+	LogCollector  map[string]componentVersion `json:"logCollector"`+	PXCOperator   map[string]componentVersion `json:"pxcOperator,omitempty"`+	PSMDBOperator map[string]componentVersion `json:"psmdbOperator,omitempty"` }  // VersionServiceResponse represents response from version service API. type VersionServiceResponse struct { 	Versions []struct {-		Product  string `json:"product"`-		Operator string `json:"operator"`-		Matrix   matrix `json:"matrix"`+		Product        string `json:"product"`+		ProductVersion string `json:"operator"`+		Matrix         matrix `json:"matrix"` 	} `json:"versions"` }  // componentsParams contains params to filter components in version service API. type componentsParams struct {-	operator        string-	operatorVersion string-	dbVersion       string+	product        string+	productVersion string+	versionToApply string

what is the difference between productVersion and versionToApply?

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 type componentVersion struct { }  type matrix struct {-	Mongod       map[string]componentVersion `json:"mongod"`-	Pxc          map[string]componentVersion `json:"pxc"`-	Pmm          map[string]componentVersion `json:"pmm"`-	Proxysql     map[string]componentVersion `json:"proxysql"`-	Haproxy      map[string]componentVersion `json:"haproxy"`-	Backup       map[string]componentVersion `json:"backup"`-	Operator     map[string]componentVersion `json:"operator"`-	LogCollector map[string]componentVersion `json:"logCollector"`+	Mongod        map[string]componentVersion `json:"mongod"`+	Pxc           map[string]componentVersion `json:"pxc"`+	Pmm           map[string]componentVersion `json:"pmm"`+	Proxysql      map[string]componentVersion `json:"proxysql"`+	Haproxy       map[string]componentVersion `json:"haproxy"`+	Backup        map[string]componentVersion `json:"backup"`+	Operator      map[string]componentVersion `json:"operator"`+	LogCollector  map[string]componentVersion `json:"logCollector"`+	PXCOperator   map[string]componentVersion `json:"pxcOperator,omitempty"`+	PSMDBOperator map[string]componentVersion `json:"psmdbOperator,omitempty"` }  // VersionServiceResponse represents response from version service API. type VersionServiceResponse struct { 	Versions []struct {-		Product  string `json:"product"`-		Operator string `json:"operator"`-		Matrix   matrix `json:"matrix"`+		Product        string `json:"product"`+		ProductVersion string `json:"operator"`+		Matrix         matrix `json:"matrix"` 	} `json:"versions"` }  // componentsParams contains params to filter components in version service API. type componentsParams struct {-	operator        string-	operatorVersion string-	dbVersion       string+	product        string+	productVersion string+	versionToApply string

I would suggest to keep dbVersion as is since we don't use it for pmm-server

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c componentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1 	return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil } +type checkResponse struct {

installedComponents ?

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 type dbaasClient interface { type versionService interface { 	// Matrix calls version service with given params and returns components matrix. 	Matrix(ctx context.Context, params componentsParams) (*VersionServiceResponse, error)+	// GetLatestOperatorVersion returns latest operators versions available based on given params.+	// It also returns PMM version that is compatible with returned operators version.

as far as I see it doesn't return PMM version

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c *VersionServiceClient) Matrix(ctx context.Context, params componentsPara  	return &vsResponse, nil }++func getLatest(m map[string]componentVersion) (*goversion.Version, error) {+	if len(m) == 0 {+		return nil, errNoVersionsFound+	}+	keys := make([]*goversion.Version, len(m))+	i := 0+	var err error+	for k := range m {+		keys[i], err = goversion.NewVersion(k)+		if err != nil {+			return nil, err+		}+		i+++	}++	latest := goversion.Must(goversion.NewVersion("v0.0.0"))+	for _, version := range keys {+		if version.GreaterThan(latest) {+			latest = version+		}+	}

it can be done using only one loop instead of two.

jprukner

comment created time in 4 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 import ( 	"gopkg.in/reform.v1" 	"gopkg.in/reform.v1/dialects/postgresql" 

blank line

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c componentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1 	return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil } +type checkResponse struct {+	err                   error+	kuberentesClusterName string+	pxcOperatorVersion    string+	psmdbOperatorVersion  string+}++func (c componentsService) getInstalledOperatorsVersion(ctx context.Context, wg *sync.WaitGroup, responseCh chan checkResponse, kuberentesCluster *models.KubernetesCluster) {+	defer wg.Done()+	resp, err := c.dbaasClient.CheckKubernetesClusterConnection(ctx, kuberentesCluster.KubeConfig)+	if err != nil {+		responseCh <- checkResponse{+			err: err,+		}+		return+	}+	responseCh <- checkResponse{+		kuberentesClusterName: kuberentesCluster.KubernetesClusterName,+		pxcOperatorVersion:    resp.Operators.Xtradb.Version,+		psmdbOperatorVersion:  resp.Operators.Psmdb.Version,+	}+}++func doesOperatorNeedUpdate(installedOperatorVersion, latestOperatorForInstalledPMM *goversion.Version) (availableOperatorVersion string) {+	if latestOperatorForInstalledPMM.GreaterThan(installedOperatorVersion) {+		return latestOperatorForInstalledPMM.String()+	}+	return ""+}++func (c componentsService) CheckForOperatorUpdate(ctx context.Context, req *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) {+	if pmmversion.PMMVersion == "" {+		return nil, status.Error(codes.Internal, "failed to get current PMM version")+	}++	// List operator versions in all kuberenetes clusters.+	clusters, err := models.FindAllKubernetesClusters(c.db.Querier)+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	// And get operators version from all of them.+	responseCh := make(chan checkResponse, len(clusters))+	go func() {+		wg := &sync.WaitGroup{}+		wg.Add(len(clusters))+		for _, cluster := range clusters {+			k8sCluster := cluster+			go c.getInstalledOperatorsVersion(ctx, wg, responseCh, k8sCluster)+		}+		wg.Wait()+		close(responseCh)+	}()++	// Meanwhile, get latest operators version compatible with installed PMM.+	pmmVersionParts := strings.Split(pmmversion.PMMVersion, "-") // handle development builds, for example: 2.18.0-27-g1e5f59d-dirty+	latestPXCOperatorForInstalledPMM, latestPSMDBOperatorForInstalledPMM, err := c.versionServiceClient.GetLatestOperatorVersion(ctx, pmmVersionParts[0])+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	if latestPXCOperatorForInstalledPMM == nil || latestPSMDBOperatorForInstalledPMM == nil {+		return nil, status.Error(codes.Internal, "latest versions are of invalid values")+	}++	resp := &dbaasv1beta1.CheckForOperatorUpdateResponse{+		ClusterToComponents: make(map[string]*dbaasv1beta1.ComponentsUpdateInformation),+	}+	// Some of the requests to kuberenetes clusters for getting operators versions should be done.+	// Go through them and decide what operator needs update.+	for operatorsVersion := range responseCh {+		if operatorsVersion.err != nil {+			c.l.Error(operatorsVersion.err)+			resp.ClusterToComponents[operatorsVersion.kuberentesClusterName] = &dbaasv1beta1.ComponentsUpdateInformation{}

to be honest I'm not sure that we need err in checkResponse at all if we are not going to return it in response.

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c *VersionServiceClient) Matrix(ctx context.Context, params componentsPara  	return &vsResponse, nil }++func getLatest(m map[string]componentVersion) (*goversion.Version, error) {+	if len(m) == 0 {+		return nil, errNoVersionsFound+	}+	keys := make([]*goversion.Version, len(m))+	i := 0+	var err error+	for k := range m {+		keys[i], err = goversion.NewVersion(k)+		if err != nil {+			return nil, err+		}+		i+++	}++	latest := goversion.Must(goversion.NewVersion("v0.0.0"))+	for _, version := range keys {+		if version.GreaterThan(latest) {+			latest = version+		}+	}+	return latest, nil+}++// GetLatestOperatorVersion return latest PXC and PSMDB operators for given PMM version.+func (c *VersionServiceClient) GetLatestOperatorVersion(ctx context.Context, pmmVersion string) (*goversion.Version, *goversion.Version, error) {+	if pmmVersion == "" {+		return nil, nil, errors.New("given PMM version is empty")+	}+	params := componentsParams{+		product:        "pmm-server",+		productVersion: pmmVersion,+	}+	resp, err := c.Matrix(ctx, params)+	if err != nil {+		return nil, nil, err+	}+	if len(resp.Versions) != 1 {+		return nil, nil, errors.Errorf("version service response does not cointain deps for single PMM version: length is %d", len(resp.Versions))+	}

that's possible case and we shouldn't return error. We just shouldn't return update version.

jprukner

comment created time in 4 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c componentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1 	return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil } +type checkResponse struct {+	err                   error+	kuberentesClusterName string+	pxcOperatorVersion    string+	psmdbOperatorVersion  string+}++func (c componentsService) getInstalledOperatorsVersion(ctx context.Context, wg *sync.WaitGroup, responseCh chan checkResponse, kuberentesCluster *models.KubernetesCluster) {+	defer wg.Done()+	resp, err := c.dbaasClient.CheckKubernetesClusterConnection(ctx, kuberentesCluster.KubeConfig)+	if err != nil {+		responseCh <- checkResponse{+			err: err,+		}+		return+	}+	responseCh <- checkResponse{+		kuberentesClusterName: kuberentesCluster.KubernetesClusterName,+		pxcOperatorVersion:    resp.Operators.Xtradb.Version,+		psmdbOperatorVersion:  resp.Operators.Psmdb.Version,+	}+}++func doesOperatorNeedUpdate(installedOperatorVersion, latestOperatorForInstalledPMM *goversion.Version) (availableOperatorVersion string) {+	if latestOperatorForInstalledPMM.GreaterThan(installedOperatorVersion) {+		return latestOperatorForInstalledPMM.String()+	}+	return ""+}++func (c componentsService) CheckForOperatorUpdate(ctx context.Context, req *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) {+	if pmmversion.PMMVersion == "" {+		return nil, status.Error(codes.Internal, "failed to get current PMM version")+	}++	// List operator versions in all kuberenetes clusters.+	clusters, err := models.FindAllKubernetesClusters(c.db.Querier)+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	// And get operators version from all of them.+	responseCh := make(chan checkResponse, len(clusters))+	go func() {+		wg := &sync.WaitGroup{}+		wg.Add(len(clusters))+		for _, cluster := range clusters {+			k8sCluster := cluster+			go c.getInstalledOperatorsVersion(ctx, wg, responseCh, k8sCluster)+		}+		wg.Wait()+		close(responseCh)+	}()++	// Meanwhile, get latest operators version compatible with installed PMM.+	pmmVersionParts := strings.Split(pmmversion.PMMVersion, "-") // handle development builds, for example: 2.18.0-27-g1e5f59d-dirty+	latestPXCOperatorForInstalledPMM, latestPSMDBOperatorForInstalledPMM, err := c.versionServiceClient.GetLatestOperatorVersion(ctx, pmmVersionParts[0])+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	if latestPXCOperatorForInstalledPMM == nil || latestPSMDBOperatorForInstalledPMM == nil {+		return nil, status.Error(codes.Internal, "latest versions are of invalid values")+	}

I would suggest to not return error and return that there is no available updates.

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c componentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1 	return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil } +type checkResponse struct {+	err                   error+	kuberentesClusterName string+	pxcOperatorVersion    string+	psmdbOperatorVersion  string+}++func (c componentsService) getInstalledOperatorsVersion(ctx context.Context, wg *sync.WaitGroup, responseCh chan checkResponse, kuberentesCluster *models.KubernetesCluster) {+	defer wg.Done()+	resp, err := c.dbaasClient.CheckKubernetesClusterConnection(ctx, kuberentesCluster.KubeConfig)+	if err != nil {+		responseCh <- checkResponse{+			err: err,+		}+		return+	}+	responseCh <- checkResponse{+		kuberentesClusterName: kuberentesCluster.KubernetesClusterName,+		pxcOperatorVersion:    resp.Operators.Xtradb.Version,+		psmdbOperatorVersion:  resp.Operators.Psmdb.Version,+	}+}++func doesOperatorNeedUpdate(installedOperatorVersion, latestOperatorForInstalledPMM *goversion.Version) (availableOperatorVersion string) {+	if latestOperatorForInstalledPMM.GreaterThan(installedOperatorVersion) {+		return latestOperatorForInstalledPMM.String()+	}+	return ""+}++func (c componentsService) CheckForOperatorUpdate(ctx context.Context, req *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) {+	if pmmversion.PMMVersion == "" {+		return nil, status.Error(codes.Internal, "failed to get current PMM version")+	}++	// List operator versions in all kuberenetes clusters.+	clusters, err := models.FindAllKubernetesClusters(c.db.Querier)+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	// And get operators version from all of them.+	responseCh := make(chan checkResponse, len(clusters))+	go func() {+		wg := &sync.WaitGroup{}+		wg.Add(len(clusters))+		for _, cluster := range clusters {+			k8sCluster := cluster+			go c.getInstalledOperatorsVersion(ctx, wg, responseCh, k8sCluster)+		}+		wg.Wait()+		close(responseCh)+	}()++	// Meanwhile, get latest operators version compatible with installed PMM.+	pmmVersionParts := strings.Split(pmmversion.PMMVersion, "-") // handle development builds, for example: 2.18.0-27-g1e5f59d-dirty

let's use https://github.com/hashicorp/go-version/blob/master/version.go#L283

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 func (c componentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1 	return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil } +type checkResponse struct {+	err                   error+	kuberentesClusterName string+	pxcOperatorVersion    string+	psmdbOperatorVersion  string+}++func (c componentsService) getInstalledOperatorsVersion(ctx context.Context, wg *sync.WaitGroup, responseCh chan checkResponse, kuberentesCluster *models.KubernetesCluster) {+	defer wg.Done()+	resp, err := c.dbaasClient.CheckKubernetesClusterConnection(ctx, kuberentesCluster.KubeConfig)+	if err != nil {+		responseCh <- checkResponse{+			err: err,+		}+		return+	}+	responseCh <- checkResponse{+		kuberentesClusterName: kuberentesCluster.KubernetesClusterName,+		pxcOperatorVersion:    resp.Operators.Xtradb.Version,+		psmdbOperatorVersion:  resp.Operators.Psmdb.Version,+	}+}++func doesOperatorNeedUpdate(installedOperatorVersion, latestOperatorForInstalledPMM *goversion.Version) (availableOperatorVersion string) {+	if latestOperatorForInstalledPMM.GreaterThan(installedOperatorVersion) {+		return latestOperatorForInstalledPMM.String()+	}+	return ""+}++func (c componentsService) CheckForOperatorUpdate(ctx context.Context, req *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) {+	if pmmversion.PMMVersion == "" {+		return nil, status.Error(codes.Internal, "failed to get current PMM version")+	}++	// List operator versions in all kuberenetes clusters.+	clusters, err := models.FindAllKubernetesClusters(c.db.Querier)+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	// And get operators version from all of them.+	responseCh := make(chan checkResponse, len(clusters))+	go func() {+		wg := &sync.WaitGroup{}+		wg.Add(len(clusters))+		for _, cluster := range clusters {+			k8sCluster := cluster+			go c.getInstalledOperatorsVersion(ctx, wg, responseCh, k8sCluster)+		}+		wg.Wait()+		close(responseCh)+	}()++	// Meanwhile, get latest operators version compatible with installed PMM.+	pmmVersionParts := strings.Split(pmmversion.PMMVersion, "-") // handle development builds, for example: 2.18.0-27-g1e5f59d-dirty+	latestPXCOperatorForInstalledPMM, latestPSMDBOperatorForInstalledPMM, err := c.versionServiceClient.GetLatestOperatorVersion(ctx, pmmVersionParts[0])+	if err != nil {+		return nil, status.Error(codes.Internal, err.Error())+	}+	if latestPXCOperatorForInstalledPMM == nil || latestPSMDBOperatorForInstalledPMM == nil {+		return nil, status.Error(codes.Internal, "latest versions are of invalid values")+	}++	resp := &dbaasv1beta1.CheckForOperatorUpdateResponse{+		ClusterToComponents: make(map[string]*dbaasv1beta1.ComponentsUpdateInformation),+	}+	// Some of the requests to kuberenetes clusters for getting operators versions should be done.+	// Go through them and decide what operator needs update.+	for operatorsVersion := range responseCh {+		if operatorsVersion.err != nil {+			c.l.Error(operatorsVersion.err)+			resp.ClusterToComponents[operatorsVersion.kuberentesClusterName] = &dbaasv1beta1.ComponentsUpdateInformation{}+			continue+		}+		installedPXCOperatorVersion, pxcErr := goversion.NewVersion(operatorsVersion.pxcOperatorVersion)+		installedPSMDBOperatorVersion, psmdbErr := goversion.NewVersion(operatorsVersion.psmdbOperatorVersion)+		if pxcErr != nil || psmdbErr != nil {+			c.l.Errorf("failed to parse versions: pxc operator: %q, psmdb operator: %q", operatorsVersion.pxcOperatorVersion, operatorsVersion.psmdbOperatorVersion)+			continue+		}

pxc or psmdb might not be installed, so we should just ignore update in that case.

jprukner

comment created time in 5 hours

Pull request review commentpercona/pmm-managed

PMM-8172 DBaaS: Check for operator update

 import ( 	"google.golang.org/grpc/status" 	"gopkg.in/reform.v1" 

please remove blank line.

jprukner

comment created time in 5 hours

startedkyleneideck/BackgroundMusic

started time in 6 hours

startedjames-proxy/james

started time in 7 hours

startedvalyala/fasthttp

started time in 7 hours

startedvalyala/fasthttp

started time in 8 hours

startedvalyala/httpteleport

started time in 9 hours

startedvalyala/fastrpc

started time in 9 hours

startedvalyala/fasthttp

started time in 12 hours

startedvalyala/fasthttp

started time in 15 hours

startedvalyala/fasthttp

started time in 16 hours

fork zhanglei/bytebufferpool

Anti-memory-waste byte buffer pool

fork in 16 hours

startedvalyala/bytebufferpool

started time in 16 hours

startedvalyala/bytebufferpool

started time in 16 hours

startedvalyala/bytebufferpool

started time in 16 hours

startedvalyala/bytebufferpool

started time in 16 hours