-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] add timeout and ability to cat debug logs (#245)
There may be times where the trunk action is unresponsive and is hung in CI. To understand whether this is a linter or trunk cli issue, we'll need logs to confirm. This PR adds the following optional inputs `timeout-seconds` and `cat-trunk-debug-logs` which will wrap the trunk check action with the unix `timeout` command should the user supply an argument for `timeout-seconds` Should the user specify `cat-trunk-debug-logs: true`, the trunk action will also cat out cli & daemon logs from `.trunk/logs/` Unfortunately, `timeout-minutes` doesn't work in `composite-actions` see actions/runner#1979 and https://github.com/orgs/community/discussions/50481 **Test Plan**: <details> <summary>End to End test to ensure timeout + logs work</summary> <img width="1873" alt="image" src="https://github.com/trunk-io/trunk-action/assets/31294356/27ca9a1b-fe54-4e73-928e-63625d1f934e"> </details> <details> <summary>End to End test to ensure timeout works </summary> <img width="1878" alt="image" src="https://github.com/trunk-io/trunk-action/assets/31294356/8fb7351a-11c0-4e83-9490-864c6ecdafc0"> </details> - [ ] Add Regression test (not entirely sure I can run this workflow) May need some help here!
- Loading branch information
1 parent
6eac1bb
commit 86b68ff
Showing
2 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters