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

test(uat): log rotation with minimum log level setting #215

Closed
wants to merge 2 commits into from
Closed

Conversation

MikeDombo
Copy link
Member

Issue #, if available:

Description of changes:

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.

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

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

Comparison is base (ad0abce) 84.79% compared to head (e6cb9fa) 85.24%.

Files Patch % Lines
...m/aws/greengrass/logmanager/LogManagerService.java 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   84.79%   85.24%   +0.45%     
==========================================
  Files          13       13              
  Lines        1052     1057       +5     
  Branches      109      110       +1     
==========================================
+ Hits          892      901       +9     
+ Misses        100       97       -3     
+ Partials       60       59       -1     
Flag Coverage Δ
integration 70.38% <90.00%> (+1.66%) ⬆️
unit 85.24% <90.00%> (+0.45%) ⬆️

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

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

Copy link

github-actions bot commented Nov 16, 2023

Unit Tests Coverage Report

File Coverage Lines Branches
All files 78% 84% 71%
com.aws.greengrass.logmanager.services.DiskSpaceManagementService 80% 90% 70%
com.aws.greengrass.logmanager.CloudWatchLogsUploader 90% 97% 83%
com.aws.greengrass.logmanager.LogManagerService 69% 82% 55%
com.aws.greengrass.logmanager.LogManagerService$CurrentProcessingFileInformation 79% 89% 68%
com.aws.greengrass.logmanager.PositionTrackingBufferedReader 86% 87% 86%
com.aws.greengrass.logmanager.CloudWatchAttemptLogsProcessor 88% 89% 86%
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 70% 85% 56%
com.aws.greengrass.logmanager.model.LogFile 85% 78% 92%
com.aws.greengrass.logmanager.model.LogFileGroup 69% 75% 64%

Minimum allowed coverage is 65%

Generated by 🐒 cobertura-action against e6cb9fa

Copy link

github-actions bot commented Nov 16, 2023

Integration Tests Coverage Report

File Coverage Lines Branches
All files 70% 77% 62%
com.aws.greengrass.logmanager.services.DiskSpaceManagementService 82% 95% 70%
com.aws.greengrass.logmanager.CloudWatchLogsUploader 44% 46% 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 67% 73% 61%
com.aws.greengrass.logmanager.util.ConfigUtil 66% 61% 71%
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 80% 85% 75%
com.aws.greengrass.logmanager.model.LogFile 45% 49% 42%
com.aws.greengrass.logmanager.model.LogFileGroup 71% 81% 60%

Minimum allowed coverage is 58%

Generated by 🐒 cobertura-action against e6cb9fa

@MikeDombo MikeDombo force-pushed the uat-1 branch 5 times, most recently from d31eeb9 to d7b14d6 Compare November 16, 2023 15:55
List<LogFile> deletableFiles = group.getProcessedLogFiles();
deletableFiles.addAll(group.getLogFiles());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy question, group.getLogFiles distinct from group.getProcessedLogFiles? seems like we dont want duplicates in delteableFiles

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, they're distinct. Even if we duplicate it won't matter as deletion is safe if the file is deleted already.

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.

2 participants