-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
container funcs to return dev friendly warnings #1319
Conversation
@@ -100,15 +100,15 @@ func fetchContainersFromAwsResource(resource jsonObj, hclBody *hclsyntax.Body, r | |||
} | |||
fileData, err := ioutil.ReadFile(fileLocation) | |||
if err != nil { | |||
zap.S().Errorf("error fetching containers from aws resource: %v", err) | |||
zap.S().Warnf("error fetching containers from aws resource: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is just a warning, we probably shouldn't return the control. Also the messages clearly says error
Codecov Report
@@ Coverage Diff @@
## master #1319 +/- ##
=======================================
Coverage 77.39% 77.39%
=======================================
Files 277 277
Lines 7813 7813
=======================================
Hits 6047 6047
Misses 1406 1406
Partials 360 360
|
@@ -126,7 +126,7 @@ func getContainersFromhclBody(hclBody *hclsyntax.Body) (results []output.Contain | |||
for _, arg := range funcExp.Args { | |||
re, diags := arg.Value(nil) | |||
if diags.HasErrors() { | |||
zap.S().Errorf("error fetching containers from aws resource: %v", getErrorMessagesFromDiagnostics(diags)) | |||
zap.S().Warnf("error fetching containers from aws resource: %v", getErrorMessagesFromDiagnostics(diags)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaurav-gogia let's change this msg as well, instead of error fetching container
make it failed to fetch the container
since we are making it a warning keeping the error message will create confusion. WDYT
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
No description provided.