Skip to content

Commit

Permalink
For testing the lint failures (#1087)
Browse files Browse the repository at this point in the history
  • Loading branch information
LikithaVemulapalli authored Nov 19, 2024
1 parent 498fc02 commit 4188819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Set up golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: latest
args: --timeout=5m
skip-cache: true

Expand Down
10 changes: 5 additions & 5 deletions pkg/monitor/sqsevent/sqs-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,29 +363,29 @@ func (m SQSMonitor) getNodeInfo(instanceID string) (*NodeInfo, error) {
if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidInstanceID" {
msg := fmt.Sprintf("Invalid instance id %s provided", instanceID)
log.Warn().Msg(msg)
return nil, skip{fmt.Errorf(msg)}
return nil, skip{fmt.Errorf("%s", msg)}
}
if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidInstanceID.NotFound" {
msg := fmt.Sprintf("No instance found with instance-id %s", instanceID)
log.Warn().Msg(msg)
return nil, skip{fmt.Errorf(msg)}
return nil, skip{fmt.Errorf("%s", msg)}
}
if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidInstanceID.Malformed" {
msg := fmt.Sprintf("Malformed instance-id %s", instanceID)
log.Warn().Msg(msg)
return nil, skip{fmt.Errorf(msg)}
return nil, skip{fmt.Errorf("%s", msg)}
}
if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidInstanceID.NotLinkable" {
msg := fmt.Sprintf("Instance-id %s not linkable", instanceID)
log.Warn().Msg(msg)
return nil, skip{fmt.Errorf(msg)}
return nil, skip{fmt.Errorf("%s", msg)}
}
return nil, err
}
if len(result.Reservations) == 0 || len(result.Reservations[0].Instances) == 0 {
msg := fmt.Sprintf("No reservation with instance-id %s", instanceID)
log.Warn().Msg(msg)
return nil, skip{fmt.Errorf(msg)}
return nil, skip{fmt.Errorf("%s", msg)}
}

instance := result.Reservations[0].Instances[0]
Expand Down

0 comments on commit 4188819

Please sign in to comment.