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

ci: re-run failed test steps with debug logging enabled #1189

Merged
merged 6 commits into from
Dec 13, 2023

Conversation

JKRhb
Copy link
Member

@JKRhb JKRhb commented Dec 11, 2023

This PR introduces a retry mechanism with enabled debug logging for failed CI testing steps as discussed in #1184 (comment).

@JKRhb JKRhb force-pushed the retry-failed-tests branch from 364d74a to c26c563 Compare December 11, 2023 09:22
@JKRhb JKRhb mentioned this pull request Dec 11, 2023
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (be1fd88) 76.66% compared to head (b60a0b5) 76.64%.
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1189      +/-   ##
==========================================
- Coverage   76.66%   76.64%   -0.02%     
==========================================
  Files          80       80              
  Lines       16813    16821       +8     
  Branches     1618     1619       +1     
==========================================
+ Hits        12890    12893       +3     
- Misses       3893     3898       +5     
  Partials       30       30              

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

@JKRhb
Copy link
Member Author

JKRhb commented Dec 11, 2023

Enabling debug logging on a second try does seem to work :) See this run for example: https://github.com/eclipse-thingweb/node-wot/actions/runs/7165425102/job/19507350139?pr=1189

@JKRhb JKRhb force-pushed the retry-failed-tests branch from e0cf7c6 to c26c563 Compare December 11, 2023 09:36
@JKRhb JKRhb marked this pull request as ready for review December 11, 2023 09:36
@relu91
Copy link
Member

relu91 commented Dec 11, 2023

Should we go for test:only the second time? or do we want always the coverage? even for debugging?

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

That may become very handy!

@JKRhb
Copy link
Member Author

JKRhb commented Dec 11, 2023

Should we go for test:only the second time? or do we want always the coverage? even for debugging?

Hmm, I would assume that if the retry should succeed using the test:only script. this would cause the codecov step to fail instead 🤔 However, always failing the retry eventually to signal that something went wrong might be the right approach here anyway, I suppose?

@relu91
Copy link
Member

relu91 commented Dec 11, 2023

However, always failing the retry eventually to signal that something went wrong might be the right approach here anyway, I suppose?

Yes, I think we should always fail if we re-try... but maybe not because the coverage step should fail... we should signal it better. Is it possible to configure the action to fail if it re-tries?

@JKRhb JKRhb force-pushed the retry-failed-tests branch from 220fcab to 8e73dd9 Compare December 11, 2023 21:18
@JKRhb
Copy link
Member Author

JKRhb commented Dec 11, 2023

However, always failing the retry eventually to signal that something went wrong might be the right approach here anyway, I suppose?

Yes, I think we should always fail if we re-try... but maybe not because the coverage step should fail... we should signal it better. Is it possible to configure the action to fail if it re-tries?

This should now be incorporated :) "Unfortunately", the MQTT tests have not been failing anymore so the behavior in this specific case could not really be tested by me so far. However, after triggering a "manual" the updated action step (more or less) showed the correct behavior.

Update: I now managed to successfully test the expected behavior in this workflow run (with a slightly adjusted workflow file): https://github.com/eclipse-thingweb/node-wot/actions/runs/7173674190/job/19533532357?pr=1189

@JKRhb JKRhb force-pushed the retry-failed-tests branch from 2f6514e to 6595d90 Compare December 11, 2023 21:43
@JKRhb
Copy link
Member Author

JKRhb commented Dec 12, 2023

Hmm, as the failed CI run shows, the current approach does not work for Windows yet and needs to be slightly adjusted...

@relu91 relu91 merged commit 3af996d into eclipse-thingweb:master Dec 13, 2023
12 checks passed
@JKRhb JKRhb deleted the retry-failed-tests branch December 13, 2023 17:37
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