-
Notifications
You must be signed in to change notification settings - Fork 11
Add AssessmentState file and max auto assessment interval #150
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #150 +/- ##
==========================================
+ Coverage 88.01% 88.15% +0.14%
==========================================
Files 86 86
Lines 12084 12227 +143
==========================================
+ Hits 10636 10779 +143
Misses 1448 1448
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
assessment_state = self.runtime.patch_assessor.read_assessment_state() | ||
with open(self.runtime.patch_assessor.assessment_state_file_path, 'r') as file_handle: | ||
assessment_state_from_file = json.loads(file_handle.read())["assessmentState"] | ||
self.assessment_state_equals(assessment_state, assessment_state_from_file) |
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.
Another way to validate write_assessment_state(), updated an existing AssessmentState.json will be to compare the lastHeartbeat before and after write_assessment_state(), i.e:
- Read AssessmentState before line 79 i.e. before write_assessment_state()
- Call write_assessment_state()
- Read the file
- compare lastHeartbeat between step 1 and 3, should not be the same
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.
Ben is aware of what to do here. Ack
Adds an AssessmentState.json file with details about when the last assessment ran. Also includes a 6 hour minimum delay between auto assessment runs.