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:
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user