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

[feat] add timeout and ability to cat debug logs #245

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

Ryang20718
Copy link
Contributor

@Ryang20718 Ryang20718 commented May 30, 2024

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:

End to End test to ensure timeout + logs work image
End to End test to ensure timeout works image
  • Add Regression test (not entirely sure I can run this workflow) May need some help here!

@Ryang20718 Ryang20718 force-pushed the user/ryang/timeout_and_logging branch 2 times, most recently from c567f02 to 226e456 Compare May 31, 2024 00:50
@Ryang20718 Ryang20718 force-pushed the user/ryang/timeout_and_logging branch from 226e456 to 321704b Compare May 31, 2024 00:55
@@ -419,6 +419,49 @@ jobs:
npm install
./action_tests/assert.js all-hold-the-line-no-upload-id

pull_request_expect_trunk_check_timeout:
Copy link
Contributor Author

@Ryang20718 Ryang20718 May 31, 2024

Choose a reason for hiding this comment

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

This is not tested (since I can't run CI). Let me know if I should add a test elsewhere!

@Ryang20718 Ryang20718 marked this pull request as ready for review May 31, 2024 01:05
action.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@det det left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@det det merged commit 86b68ff into trunk-io:main Jun 25, 2024
37 of 40 checks passed
github-merge-queue bot pushed a commit to chezmoi-sh/atlas that referenced this pull request Jun 25, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [trunk-io/trunk-action](https://github.com/trunk-io/trunk-action) |
action | patch | `v1.1.15` -> `v1.1.16` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/trunk-io/trunk-action/badge)](https://securityscorecards.dev/viewer/?uri=github.com/trunk-io/trunk-action)
|

---

### Release Notes

<details>
<summary>trunk-io/trunk-action (trunk-io/trunk-action)</summary>

###
[`v1.1.16`](https://github.com/trunk-io/trunk-action/releases/tag/v1.1.16)

[Compare
Source](https://github.com/trunk-io/trunk-action/compare/v1.1.15...v1.1.16)

##### What's Changed

- \[feat] add timeout and ability to cat debug logs by
[@&#8203;Ryang20718](https://github.com/Ryang20718) in
[trunk-io/trunk-action#245

##### New Contributors

- [@&#8203;Ryang20718](https://github.com/Ryang20718) made their first
contribution in
[trunk-io/trunk-action#245

**Full Changelog**:
trunk-io/trunk-action@v1...v1.1.16

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/atlas).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
renovate bot added a commit to DelineaXPM/github-workflows that referenced this pull request Jul 18, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Type | Update |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | [`b4ffde6`
->
`692973e`](https://github.com/actions/checkout/compare/b4ffde6...692973e)
| action | digest |
|
[akhilmhdh/contributors-readme-action](https://github.com/akhilmhdh/contributors-readme-action)
| [`v2.3.6` ->
`v2.3.10`](https://github.com/akhilmhdh/contributors-readme-action/compare/v2.3.6...v2.3.10)
| action | patch |
|
[amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request)
| [`e9fabac` ->
`0723387`](https://github.com/amannn/action-semantic-pull-request/compare/e9fabac...0723387)
| action | digest |
|
[elgohr/go-vulncheck-action](https://github.com/elgohr/go-vulncheck-action)
| [`7221c71` ->
`e73217f`](https://github.com/elgohr/go-vulncheck-action/compare/7221c71...e73217f)
| action | digest |
| [github/codeql-action](https://github.com/github/codeql-action) |
[`c2dc671` ->
`e113c55`](https://github.com/github/codeql-action/compare/c2dc671...e113c55)
| action | digest |
| [trunk-io/trunk-action](https://github.com/trunk-io/trunk-action) |
[`v1.1.11` ->
`v1.1.16`](https://github.com/trunk-io/trunk-action/compare/v1.1.11...v1.1.16)
| action | patch |
| [trunk-io/trunk-action](https://github.com/trunk-io/trunk-action) |
[`6522858` ->
`86b68ff`](https://github.com/trunk-io/trunk-action/compare/6522858...86b68ff)
| action | digest |

---

### Release Notes

<details>
<summary>akhilmhdh/contributors-readme-action
(akhilmhdh/contributors-readme-action)</summary>

###
[`v2.3.10`](https://github.com/akhilmhdh/contributors-readme-action/releases/tag/v2.3.10):
Contributors-Readme-Action v2.3.10

[Compare
Source](https://github.com/akhilmhdh/contributors-readme-action/compare/v2.3.9...v2.3.10)

1. Fixed missing `tbody`
[#&#8203;68](https://github.com/akhilmhdh/contributors-readme-action/issues/68)
2. Updated readme with the new github action permission in yaml
[#&#8203;63](https://github.com/akhilmhdh/contributors-readme-action/issues/63)

###
[`v2.3.9`](https://github.com/akhilmhdh/contributors-readme-action/releases/tag/v2.3.9):
Contributors-Readme-Action v2.3.9

[Compare
Source](https://github.com/akhilmhdh/contributors-readme-action/compare/v2.3.8...v2.3.9)

#### What's Changed

- Update README.md by [@&#8203;KPCOFGS](https://github.com/KPCOFGS) in
[akhilmhdh/contributors-readme-action#76
- Fix null name, no capitalize & introduce eslint fix command by
[@&#8203;melroy89](https://github.com/melroy89) in
[akhilmhdh/contributors-readme-action#77

#### New Contributors

- [@&#8203;KPCOFGS](https://github.com/KPCOFGS) made their first
contribution in
[akhilmhdh/contributors-readme-action#76
- [@&#8203;melroy89](https://github.com/melroy89) made their first
contribution in
[akhilmhdh/contributors-readme-action#77

###
[`v2.3.8`](https://github.com/akhilmhdh/contributors-readme-action/releases/tag/v2.3.8):
Contributors-Readme-Action v2.3.8

[Compare
Source](https://github.com/akhilmhdh/contributors-readme-action/compare/v2.3.7...v2.3.8)

Removed check for push to enable manual run

###
[`v2.3.7`](https://github.com/akhilmhdh/contributors-readme-action/releases/tag/v2.3.7):
Contributors-Readme-Action v2.3.7

[Compare
Source](https://github.com/akhilmhdh/contributors-readme-action/compare/v2.3.6...v2.3.7)

#### What's Changed

- Update node12 -> node18 by
[@&#8203;jessebot](https://github.com/jessebot) in
[akhilmhdh/contributors-readme-action#59
- Bump json5 from 2.2.0 to 2.2.3 by
[@&#8203;dependabot](https://github.com/dependabot) in
[akhilmhdh/contributors-readme-action#61
- Bump minimatch from 3.0.4 to 3.1.2 by
[@&#8203;dependabot](https://github.com/dependabot) in
[akhilmhdh/contributors-readme-action#56
- Bump [@&#8203;actions/core](https://github.com/actions/core) from
1.6.0 to 1.9.1 by [@&#8203;dependabot](https://github.com/dependabot)
in
[akhilmhdh/contributors-readme-action#54
- refactor: update set-output deprecated command by
[@&#8203;dtcMLOps](https://github.com/dtcMLOps) in
[akhilmhdh/contributors-readme-action#74

#### New Contributors

- [@&#8203;jessebot](https://github.com/jessebot) made their first
contribution in
[akhilmhdh/contributors-readme-action#59
- [@&#8203;dtcMLOps](https://github.com/dtcMLOps) made their first
contribution in
[akhilmhdh/contributors-readme-action#74

</details>

<details>
<summary>trunk-io/trunk-action (trunk-io/trunk-action)</summary>

###
[`v1.1.16`](https://github.com/trunk-io/trunk-action/releases/tag/v1.1.16)

[Compare
Source](https://github.com/trunk-io/trunk-action/compare/v1.1.15...v1.1.16)

##### What's Changed

- \[feat] add timeout and ability to cat debug logs by
[@&#8203;Ryang20718](https://github.com/Ryang20718) in
[trunk-io/trunk-action#245

##### New Contributors

- [@&#8203;Ryang20718](https://github.com/Ryang20718) made their first
contribution in
[trunk-io/trunk-action#245

**Full Changelog**:
trunk-io/trunk-action@v1...v1.1.16

###
[`v1.1.15`](https://github.com/trunk-io/trunk-action/releases/tag/v1.1.15)

[Compare
Source](https://github.com/trunk-io/trunk-action/compare/v1.1.14...v1.1.15)

##### What's Changed

- Adds inputs/outputs to the upgrade action
([#&#8203;241](https://github.com/trunk-io/trunk-action/issues/241))
- Attempts to install the correct pnpm version in setup-ci
action([#&#8203;243](https://github.com/trunk-io/trunk-action/issues/243))

**Full Changelog**:
trunk-io/trunk-action@v1.1.14...v1.1.15

###
[`v1.1.14`](https://github.com/trunk-io/trunk-action/releases/tag/v1.1.14)

[Compare
Source](https://github.com/trunk-io/trunk-action/compare/v1.1.13...v1.1.14)

##### What's Changed

- Adds a `signoff` option to add a Signed-Off-By line to the commits
created by the upgrade action
([#&#8203;238](https://github.com/trunk-io/trunk-action/issues/238))

**Full Changelog**:
trunk-io/trunk-action@v1.1.13...v1.1.14

###
[`v1.1.13`](https://github.com/trunk-io/trunk-action/releases/tag/v1.1.13)

[Compare
Source](https://github.com/trunk-io/trunk-action/compare/v1.1.12...v1.1.13)

##### What's Changed

- Continues on failure to install node packages, if user doesn't have a
trunk.yaml
([#&#8203;236](https://github.com/trunk-io/trunk-action/issues/236))

**Full Changelog**:
trunk-io/trunk-action@v1.1.12...v1.1.13

###
[`v1.1.12`](https://github.com/trunk-io/trunk-action/releases/tag/v1.1.12)

[Compare
Source](https://github.com/trunk-io/trunk-action/compare/v1.1.11...v1.1.12)

##### What's Changed

- Adds an action to install trunk: `trunk-io/trunk-action/install@v1`
([#&#8203;234](https://github.com/trunk-io/trunk-action/issues/234))

**Full Changelog**:
trunk-io/trunk-action@v1.1.11...v1.1.12

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/DelineaXPM/github-workflows).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants