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

Improve output on gradle check timeout #2913

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

andrross
Copy link
Member

@andrross andrross commented Nov 16, 2022

The result ends up being reported as 'null' when this script times out. Also the output never directly indicates that a timeout occurred, so this commit makes the output more explicit.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@andrross andrross requested a review from a team as a code owner November 16, 2022 17:32
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Merging #2913 (4b4c8ab) into main (565735b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2913   +/-   ##
=======================================
  Coverage   93.00%   93.00%           
=======================================
  Files         165      165           
  Lines        4518     4518           
=======================================
  Hits         4202     4202           
  Misses        316      316           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

The issue with this approach is, it is possible that we have running state = false, while seconds exceeds timeout value.

You would end up with a success test, but still failed due to timeout, as seconds will continue to count.

running=false
seconds=7200+
timeout=7200
results=success
return=timeout

My initial approach is to accurately compute the number of timepass, so I can control when to add up the time instead of letting it compute by itself.

I think we can definitely improve the output, but no need to change the structure of the time calculation.

Thanks.

@andrross
Copy link
Member Author

andrross commented Nov 17, 2022

I think we can definitely improve the output, but no need to change the structure of the time calculation.

@peterzhuamazon Good call out. I'm happy to change this back to the way it was, but let me know what you think of the updated approach I just published. It should fix the issue you mentioned. The reason I changed the time calculation is so that the script will print the accurate elapsed time instead of always being 30 seconds ahead.

@peterzhuamazon
Copy link
Member

I think we can definitely improve the output, but no need to change the structure of the time calculation.

@peterzhuamazon Good call out. I'm happy to change this back to the way it was, but let me know what you think of the updated approach I just published. It should fix the issue you mentioned. The reason I changed the time calculation is so that the script will print the accurate elapsed time instead of always being 30 seconds ahead.

I think this still needs some testing, as there are cases where timeout reached but then running state changed to false right after, still not safe.

I dont think the 30seconds ahead count is really a big issue tho.
Let's just merge the results changes without touching the time calculation for now.

Thanks,
Peter

The result ends up being reported as 'null' when this script times out.
The output never directly indicates that a timeout occurred, so this
commit makes the output more explicit.

Signed-off-by: Andrew Ross <[email protected]>
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.

4 participants