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

chore: Install tools if cache restore fails #5394

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Conversation

moduli
Copy link
Collaborator

@moduli moduli commented Dec 23, 2024

This PR updates the unit test workflow to resolve an error when the cache restores to fail. Here is an example run: https://github.com/hashicorp/boundary/actions/runs/12439588543/job/34735079491.

When the cache fails to restore, the pipeline does not have access to the tparse tool, resulting in the error

Run nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e
go test "./..." -tags="" -v -json -cover -timeout 40m | tparse -follow
/bin/sh: 1: tparse: not found

This PR adds a step to install tools if the restore happens to fail.

@moduli moduli added the pr/no-milestone Ignores the Milestone Check label Dec 23, 2024
@moduli moduli marked this pull request as ready for review December 23, 2024 19:10
@moduli moduli requested a review from a team as a code owner December 23, 2024 19:10
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

Ah, great thinking!

ddebko
ddebko previously approved these changes Dec 23, 2024
On occasion, the cache restore fails, causing the test pipeline to fail due to not having tparse. This adds a failsafe in the event that there's something wrong with the cache restore.
@moduli moduli dismissed stale reviews from ddebko and johanbrandhorst via d25270e December 23, 2024 19:24
@moduli moduli force-pushed the moduli-install-tools branch from f2369b0 to d25270e Compare December 23, 2024 19:24
Copy link
Collaborator Author

@moduli moduli left a comment

Choose a reason for hiding this comment

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

Needed to also put it on the test-race workflow

@moduli moduli merged commit 157c305 into main Dec 23, 2024
62 of 64 checks passed
@moduli moduli deleted the moduli-install-tools branch December 23, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-milestone Ignores the Milestone Check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants