Skip to content
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

fix: catch ClosedByInterruptException and handle it at debug/info #212

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

MikeDombo
Copy link
Member

Issue #, if available:

Description of changes:
Handle ClosedByInterruptException instead of only IOException to avoid unhelpful logs at too high of a level.

Why is this change necessary:

How was this change tested:

Any additional information or context required to review the change:

Checklist:

  • Updated the README if applicable
  • Updated or added new unit tests
  • Updated or added new integration tests
  • Updated or added new end-to-end tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (e18e5cf) 86.35% compared to head (8b3e8d7) 85.03%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
- Coverage   86.35%   85.03%   -1.32%     
==========================================
  Files          13       13              
  Lines        1033     1049      +16     
  Branches      106      108       +2     
==========================================
  Hits          892      892              
- Misses         87       99      +12     
- Partials       54       58       +4     
Flag Coverage Δ
integration 68.44% <0.00%> (-1.84%) ⬇️
unit 85.03% <6.25%> (-1.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../aws/greengrass/logmanager/model/LogFileGroup.java 75.82% <0.00%> (ø)
...m/aws/greengrass/logmanager/LogManagerService.java 86.61% <33.33%> (-0.36%) ⬇️
...a/com/aws/greengrass/logmanager/model/LogFile.java 75.34% <0.00%> (-3.23%) ⬇️
...ass/logmanager/CloudWatchAttemptLogsProcessor.java 85.71% <0.00%> (-4.46%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Unit Tests Coverage Report

File Coverage Lines Branches
All files 77% 84% 71%
com.aws.greengrass.logmanager.services.DiskSpaceManagementService 71% 83% 60%
com.aws.greengrass.logmanager.CloudWatchLogsUploader 90% 97% 83%
com.aws.greengrass.logmanager.LogManagerService 68% 81% 55%
com.aws.greengrass.logmanager.LogManagerService$CurrentProcessingFileInformation 79% 89% 68%
com.aws.greengrass.logmanager.PositionTrackingBufferedReader 86% 87% 86%
com.aws.greengrass.logmanager.CloudWatchAttemptLogsProcessor 87% 88% 87%
com.aws.greengrass.logmanager.util.ConfigUtil 85% 85% 85%
com.aws.greengrass.logmanager.util.CloudWatchClientFactory 53% 53% 0%
com.aws.greengrass.logmanager.model.CloudWatchAttemptLogInformation 100% 100% 0%
com.aws.greengrass.logmanager.model.EventType 100% 100% 0%
com.aws.greengrass.logmanager.model.ComponentType 100% 100% 0%
com.aws.greengrass.logmanager.model.ProcessingFiles 68% 80% 56%
com.aws.greengrass.logmanager.model.LogFile 85% 78% 92%
com.aws.greengrass.logmanager.model.LogFileGroup 70% 75% 64%

Minimum allowed coverage is 65%

Generated by 🐒 cobertura-action against 8b3e8d7

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Integration Tests Coverage Report

File Coverage Lines Branches
All files 67% 76% 59%
com.aws.greengrass.logmanager.services.DiskSpaceManagementService 47% 55% 40%
com.aws.greengrass.logmanager.CloudWatchLogsUploader 42% 42% 41%
com.aws.greengrass.logmanager.LogManagerService 81% 93% 70%
com.aws.greengrass.logmanager.LogManagerService$CurrentProcessingFileInformation 46% 55% 37%
com.aws.greengrass.logmanager.PositionTrackingBufferedReader 72% 82% 63%
com.aws.greengrass.logmanager.CloudWatchAttemptLogsProcessor 70% 74% 66%
com.aws.greengrass.logmanager.util.ConfigUtil 48% 61% 35%
com.aws.greengrass.logmanager.util.CloudWatchClientFactory 100% 100% 0%
com.aws.greengrass.logmanager.model.CloudWatchAttemptLogInformation 100% 100% 0%
com.aws.greengrass.logmanager.model.EventType 100% 100% 0%
com.aws.greengrass.logmanager.model.ComponentType 100% 100% 0%
com.aws.greengrass.logmanager.model.ProcessingFiles 76% 85% 68%
com.aws.greengrass.logmanager.model.LogFile 40% 46% 34%
com.aws.greengrass.logmanager.model.LogFileGroup 64% 74% 53%

Minimum allowed coverage is 58%

Generated by 🐒 cobertura-action against 8b3e8d7

@MikeDombo MikeDombo merged commit 614be25 into main Oct 5, 2023
6 of 8 checks passed
@MikeDombo MikeDombo deleted the logs branch October 5, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants