Skip to content

Commit

Permalink
Merge pull request #324 from dell/codeowners-update-20240821
Browse files Browse the repository at this point in the history
Codeowners update 20240821
  • Loading branch information
donatwork authored Aug 28, 2024
2 parents 2bee858 + 5691835 commit 03a963f
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 53 deletions.
30 changes: 9 additions & 21 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
# CODEOWNERS
#
# documentation for this file can be found at:
# Documentation for this file can be found at:
# https://help.github.com/en/articles/about-code-owners

# These are the default owners for the code and will
# be requested for review when someone opens a pull request.
# order is alphabetical for easier maintenance.
# Order is alphabetical for easier maintenance.
#
# Abhilash (abhi16394)
# Abhilash Muralidhara (abhi16394)
# Adarsh Kumar Yadav (adarsh-dell)
# Akshay Saini (AkshaySainiDell)
# Aaron Tye (atye)
# Ashley Joy (ashleyvjoy)
# Bharath Sreekanth (bharathsreekanth)
# Deepak Ghivari (Deepak-Ghivari)
# Emily Kinuthia (EmilyKatdell)
# Jacob Grosner (JacobGros)
# Jooseppi Luna (jooseppi-luna)
# Rajshree Khare (khareRajshree)
# Kshitija Kakde (KshitijaKakde)
# Kumar Karthik Gosa (kumarkgosa)
# Abrar Basha (mbasha-dell)
# Matt Schmaelzle (mjsdell)
# Prabhu Revur (prabhu-dell)
# Rishabh Raj (rishabhatdell)
# Sakshi Garg (sakshi-garg1)
# Shayna Finocchiaro (shaynafinocchiaro)
# Surya Prakash Gupta (suryagupta4)
# Bahubali Jain (bpjain2004)
# Don Khan (donatwork)
# Trevor Dawe (tdawe)

# for all files
* @abhi16394 @adarsh-dell @AkshaySainiDell @bpjain2004 @donatwork @tdawe

* @abhi16394 @adarsh-dell @AkshaySainiDell @atye @ashleyvjoy @bharathsreekanth @Deepak-Ghivari @EmilyKatdell @JacobGros @jooseppi-luna @khareRajshree @KshitijaKakde @kumarkgosa @mbasha-dell @mjsdell @prabhu-dell @rishabhatdell @sakshi-garg1 @shaynafinocchiaro @suryagupta4
18 changes: 9 additions & 9 deletions service/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func (s *service) CreateVolume(
// volume already exists, look it up by name
id, err = s.adminClients[systemID].FindVolumeID(name)
if err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
return nil, status.Errorf(codes.Internal, "%s", err.Error())
}
} else {
id = createResp.ID
Expand Down Expand Up @@ -1243,9 +1243,9 @@ func (s *service) ControllerPublishVolume(

sdcIPs, err := s.getSDCIPs(nodeID, systemID)
if err != nil {
return nil, status.Errorf(codes.NotFound, err.Error())
return nil, status.Errorf(codes.NotFound, "%s", err.Error())
} else if len(sdcIPs) == 0 {
return nil, status.Errorf(codes.NotFound, "received empty sdcIPs")
return nil, status.Errorf(codes.NotFound, "%s", "received empty sdcIPs")
}

externalAccess := s.opts.ExternalAccess
Expand Down Expand Up @@ -1284,7 +1284,7 @@ func (s *service) ControllerPublishVolume(

sdcID, err := s.getSDCID(nodeID, systemID)
if err != nil {
return nil, status.Errorf(codes.NotFound, err.Error())
return nil, status.Errorf(codes.NotFound, "%s", err.Error())
}

vc := req.GetVolumeCapability()
Expand Down Expand Up @@ -1356,7 +1356,7 @@ func (s *service) ControllerPublishVolume(

allowMultipleMappings, err = shouldAllowMultipleMappings(isBlock, am)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
return nil, status.Errorf(codes.InvalidArgument, "%s", err.Error())
}

if err := validateAccessType(am, isBlock); err != nil {
Expand All @@ -1365,7 +1365,7 @@ func (s *service) ControllerPublishVolume(
} else {
allowMultipleMappings, err = shouldAllowMultipleMappings(isBlock, am)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
return nil, status.Errorf(codes.InvalidArgument, "%s", err.Error())
}
}

Expand Down Expand Up @@ -1566,9 +1566,9 @@ func (s *service) ControllerUnpublishVolume(

sdcIPs, err := s.getSDCIPs(nodeID, systemID)
if err != nil {
return nil, status.Errorf(codes.NotFound, err.Error())
return nil, status.Errorf(codes.NotFound, "%s", err.Error())
} else if len(sdcIPs) == 0 {
return nil, status.Errorf(codes.NotFound, "received empty sdcIPs")
return nil, status.Errorf(codes.NotFound, "%s", "received empty sdcIPs")
}

// unexport for NFS
Expand All @@ -1594,7 +1594,7 @@ func (s *service) ControllerUnpublishVolume(

sdcID, err := s.getSDCID(nodeID, systemID)
if err != nil {
return nil, status.Errorf(codes.NotFound, err.Error())
return nil, status.Errorf(codes.NotFound, "%s", err.Error())
}

// check if volume is attached to node at all
Expand Down
2 changes: 1 addition & 1 deletion service/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ func (s *service) ExecuteAction(ctx context.Context, req *replication.ExecuteAct

client, err := s.verifySystem(localSystem)
if err != nil {
return nil, status.Errorf(codes.FailedPrecondition, err.Error())
return nil, status.Errorf(codes.FailedPrecondition, "%s", err.Error())
}

group, err := s.getReplicationConsistencyGroupByID(localSystem, protectionGroupID)
Expand Down
18 changes: 9 additions & 9 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,13 @@ func getArrayConfig(ctx context.Context) (map[string]*ArrayConnectionData, error
if err != nil {
Log.Errorf("Found error %v while checking stat of file %s ", err, ArrayConfigFile)
if os.IsNotExist(err) {
return nil, fmt.Errorf(fmt.Sprintf("File %s does not exist", ArrayConfigFile))
return nil, fmt.Errorf("File %s does not exist", ArrayConfigFile)
}
}

config, err := os.ReadFile(filepath.Clean(ArrayConfigFile))
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("File %s errors: %v", ArrayConfigFile, err))
return nil, fmt.Errorf("File %s errors: %v", ArrayConfigFile, err)
}

if string(config) != "" {
Expand All @@ -815,30 +815,30 @@ func getArrayConfig(ctx context.Context) (map[string]*ArrayConnectionData, error
config, _ = yaml.JSONToYAML(config)
err = yaml.Unmarshal(config, &creds)
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("Unable to parse the credentials: %v", err))
return nil, fmt.Errorf("Unable to parse the credentials: %v", err)
}

if len(creds) == 0 {
return nil, fmt.Errorf("no arrays are provided in vxflexos-creds secret")
return nil, fmt.Errorf("%s", "no arrays are provided in vxflexos-creds secret")
}

noOfDefaultArray := 0
for i, c := range creds {
systemID := c.SystemID
if _, ok := arrays[systemID]; ok {
return nil, fmt.Errorf(fmt.Sprintf("duplicate system ID %s found at index %d", systemID, i))
return nil, fmt.Errorf("duplicate system ID %s found at index %d", systemID, i)
}
if systemID == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for system name at index %d", i))
return nil, fmt.Errorf("invalid value for system name at index %d", i)
}
if c.Username == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for Username at index %d", i))
return nil, fmt.Errorf("invalid value for Username at index %d", i)
}
if c.Password == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for Password at index %d", i))
return nil, fmt.Errorf("invalid value for Password at index %d", i)
}
if c.Endpoint == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for Endpoint at index %d", i))
return nil, fmt.Errorf("invalid value for Endpoint at index %d", i)
}
// ArrayConnectionData
if c.AllSystemNames != "" {
Expand Down
8 changes: 4 additions & 4 deletions service/step_defs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2144,7 +2144,7 @@ func (f *feature) iCallListVolumesWith(maxEntriesString, startingToken string) e
default:
return fmt.Errorf(`want start token of "next", "none", "invalid", "larger", got %q`, st)
}
req = f.getControllerListVolumesRequest(int32(maxEntries), startingToken)
req = f.getControllerListVolumesRequest(int32(maxEntries), startingToken) // #nosec: G115 false positive
f.listVolumesRequest = req
}
log.Printf("Calling ListVolumes with req=%+v", f.listVolumesRequest)
Expand Down Expand Up @@ -2401,7 +2401,7 @@ func (f *feature) aControllerPublishedEphemeralVolume() error {
if err != nil {
err = os.MkdirAll(nodePublishSymlinkDir, 0o777)
if err != nil {
fmt.Printf("by-id: " + err.Error())
fmt.Printf("by-id: %s", err.Error())
}
}

Expand Down Expand Up @@ -2472,7 +2472,7 @@ func (f *feature) aControllerPublishedVolume() error {
if err != nil {
err = os.MkdirAll(nodePublishSymlinkDir, 0o777)
if err != nil {
fmt.Printf("by-id: " + err.Error())
fmt.Printf("by-id: %s", err.Error())
}
}

Expand Down Expand Up @@ -3667,7 +3667,7 @@ func (f *feature) iCallListSnapshotsWithMaxentriesAndStartingtoken(maxEntriesStr
return nil
}
ctx := new(context.Context)
req := &csi.ListSnapshotsRequest{MaxEntries: int32(maxEntries), StartingToken: startingTokenString}
req := &csi.ListSnapshotsRequest{MaxEntries: int32(maxEntries), StartingToken: startingTokenString} // #nosec: G115 false positive
f.listSnapshotsRequest = req
log.Printf("Calling ListSnapshots with req=%+v", f.listVolumesRequest)
f.listSnapshotsResponse, f.err = f.service.ListSnapshots(*ctx, req)
Expand Down
18 changes: 9 additions & 9 deletions test/integration/step_defs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,20 @@ func (f *feature) getArrayConfig() (map[string]*ArrayConnectionData, error) {
_, err := os.Stat(configFile)
if err != nil {
if os.IsNotExist(err) {
return nil, fmt.Errorf(fmt.Sprintf("File %s does not exist", configFile))
return nil, fmt.Errorf("File %s does not exist", configFile)
}
}

config, err := os.ReadFile(filepath.Clean(configFile))
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("File %s errors: %v", configFile, err))
return nil, fmt.Errorf("File %s errors: %v", configFile, err)
}

if string(config) != "" {
jsonCreds := make([]ArrayConnectionData, 0)
err := json.Unmarshal(config, &jsonCreds)
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("Unable to parse the credentials: %v", err))
return nil, fmt.Errorf("Unable to parse the credentials: %v", err)
}

if len(jsonCreds) == 0 {
Expand All @@ -158,19 +158,19 @@ func (f *feature) getArrayConfig() (map[string]*ArrayConnectionData, error) {
for i, c := range jsonCreds {
systemID := c.SystemID
if _, ok := arrays[systemID]; ok {
return nil, fmt.Errorf(fmt.Sprintf("duplicate system ID %s found at index %d", systemID, i))
return nil, fmt.Errorf("duplicate system ID %s found at index %d", systemID, i)
}
if systemID == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for system name at index %d", i))
return nil, fmt.Errorf("invalid value for system name at index %d", i)
}
if c.Username == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for Username at index %d", i))
return nil, fmt.Errorf("invalid value for Username at index %d", i)
}
if c.Password == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for Password at index %d", i))
return nil, fmt.Errorf("invalid value for Password at index %d", i)
}
if c.Endpoint == "" {
return nil, fmt.Errorf(fmt.Sprintf("invalid value for Endpoint at index %d", i))
return nil, fmt.Errorf("invalid value for Endpoint at index %d", i)
}
// ArrayConnectionData
if c.AllSystemNames != "" {
Expand Down Expand Up @@ -1126,7 +1126,7 @@ func (f *feature) expectErrorListSnapshotResponse() error {
if !strings.Contains(err.Error(), expected) {
return fmt.Errorf("Error %s does not contain the expected message: %s", err.Error(), expected)
}
fmt.Printf("got expected error " + err.Error())
fmt.Printf("got expected error: %s", err.Error())
return nil
}

Expand Down

0 comments on commit 03a963f

Please sign in to comment.