Retrieve pod metrics only if metrics server is running and Go lint fixes (#2094)

* Retrieve pod metrics only if metrics server is running

Currently we query pod metrics every 30 sec which floods executor logs,
added check which confirms if metrics server is running then only we start
querying pod metrics for identifying CPU utilization.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Fixed couple of typos and misspells with Go CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Remove unnecessary conversions with Go CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2021-06-28 10:06:32 +05:30
committed by GitHub
parent a493f0117d
commit 154fe0d447
21 changed files with 105 additions and 39 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ func (pruner *ArchivePruner) insertArchive(archiveID string) {
// and not the archives that are referenced by them, leaving the archives as orphans.
// getOrphanArchives reaps the orphaned archives.
func (pruner *ArchivePruner) getOrphanArchives() {
pruner.logger.Info("getting orphan archives")
pruner.logger.Debug("getting orphan archives")
archivesRefByPkgs := make([]string, 0)
var archiveID string
+3 -2
View File
@@ -28,12 +28,13 @@ import (
"time"
"github.com/dchest/uniuri"
"github.com/fission/fission/pkg/storagesvc"
"github.com/minio/minio-go"
"github.com/ory/dockertest"
dc "github.com/ory/dockertest/docker"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/fission/fission/pkg/storagesvc"
)
const (
@@ -153,7 +154,7 @@ func TestS3StorageService(t *testing.T) {
time.Sleep(10 * time.Second)
// Retrive file through minioClient
// Retrieve file through minioClient
reader, err := minioClient.GetObject(bucketName, fileID, minio.GetObjectOptions{})
panicIf(err)
defer reader.Close()
+1 -1
View File
@@ -114,7 +114,7 @@ func (client *StowClient) putFile(file multipart.File, fileSize int64) (string,
uploadName := client.config.storage.getUploadFileName()
// save the file to the storage backend
item, err := client.container.Put(uploadName, file, int64(fileSize), nil)
item, err := client.container.Put(uploadName, file, fileSize, nil)
if err != nil {
client.logger.Error("error writing file on storage",
zap.Error(err),