ci: update golangci-lint version as it fails for some k8s version in 1.10
Closes: https://github.com/rook/rook/issues/11896
Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit 8e317ee074)
Signed-off-by: parth-gr <paarora@redhat.com>
This commit is contained in:
1 parent
7b97033399
commit
35f9fdd97e
8 files changed
+12
-11
No files matched your search
@@ -34,7 +34,7 @@ jobs:
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||
version: v1.48.0
|
||||
version: v1.51.2
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
# working-directory: somedir
|
||||
|
||||
@@ -148,7 +148,7 @@ func configTLS(ctx context.Context, clusterdContext *clusterd.Context, namespace
|
||||
}
|
||||
|
||||
// Write into a file
|
||||
err = ioutil.WriteFile(file.Name(), secret.Data[tlsSecretKeyToCheck(tlsOption)], 0444)
|
||||
err = os.WriteFile(file.Name(), secret.Data[tlsSecretKeyToCheck(tlsOption)], 0400)
|
||||
if err != nil {
|
||||
return nil, removeCertFiles, errors.Wrapf(err, "failed to write k8s secret %q content to a file", tlsSecretName)
|
||||
}
|
||||
|
||||
@@ -53,5 +53,7 @@ func GetPortFromEndpoint(endpoint string) int32 {
|
||||
logger.Errorf("failed to convert %q to integer. %v", portString, err)
|
||||
}
|
||||
}
|
||||
return int32(port)
|
||||
//#nosec G109 -- This is just a lower bit to bigger bit conversion
|
||||
portInt32 := int32(port)
|
||||
return portInt32
|
||||
}
|
||||
@@ -87,7 +87,7 @@ func TestGetTcmallocMaxTotalThreadCacheBytes(t *testing.T) {
|
||||
assert.Equal(t, "67108864", v.Value)
|
||||
|
||||
// Read the file now
|
||||
err = ioutil.WriteFile(file.Name(), sysconfig, 0444)
|
||||
err = os.WriteFile(file.Name(), sysconfig, 0400)
|
||||
assert.NoError(t, err)
|
||||
v = getTcmallocMaxTotalThreadCacheBytes("")
|
||||
assert.Equal(t, "134217728", v.Value)
|
||||
|
||||
@@ -355,9 +355,7 @@ func TestCephObjectStoreController(t *testing.T) {
|
||||
objectStore,
|
||||
}
|
||||
|
||||
for i := range additionalObjects {
|
||||
objects = append(objects, additionalObjects[i])
|
||||
}
|
||||
objects = append(objects, additionalObjects...)
|
||||
|
||||
executor := &exectest.MockExecutor{
|
||||
MockExecuteCommandWithOutput: func(command string, args ...string) (string, error) {
|
||||
|
||||
@@ -357,9 +357,7 @@ func ListDevicesInUse(ctx context.Context, clusterdContext *clusterd.Context, na
|
||||
logger.Warningf("failed to unmarshal %s", deviceJson)
|
||||
continue
|
||||
}
|
||||
for i := range d {
|
||||
devices = append(devices, d[i])
|
||||
}
|
||||
devices = append(devices, d...)
|
||||
}
|
||||
logger.Debugf("devices in use %+v", devices)
|
||||
return devices, nil
|
||||
|
||||
@@ -141,6 +141,9 @@ func NewComplexClientset(t *testing.T) *fake.Clientset {
|
||||
}
|
||||
obj := createAction.GetObject()
|
||||
objMeta, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to objMeta"))
|
||||
}
|
||||
resource := action.GetResource().Resource
|
||||
name := objMeta.GetName()
|
||||
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ func CreateTempFile(content string) (*os.File, error) {
|
||||
}
|
||||
|
||||
// Write content into file
|
||||
err = ioutil.WriteFile(file.Name(), []byte(content), 0440)
|
||||
err = os.WriteFile(file.Name(), []byte(content), 0400)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to write content into file")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user