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

Fall back to install_and_cache_pkgs.sh if restore_pkg.sh fails #144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

torsknod2
Copy link

@torsknod2 torsknod2 commented Jan 12, 2025

  • Changed post-cache-action.sh to fall back to install_and_cache_pkgs.sh if restore_pkgs.sh fails
  • Ensure restore_pkgs.sh also fails if substituted commands fail

@torsknod2 torsknod2 force-pushed the FallBack2InstallAndCachePkgIfRestorePkgFails branch from 25a0e17 to e40d1ce Compare January 12, 2025 16:00
@torsknod2 torsknod2 changed the title Fall back to install_and_cache_pkg.sh if restore_pkg.sh fails Fall back to install_and_cache_pkgs.sh if restore_pkg.sh fails Jan 12, 2025
@torsknod2 torsknod2 marked this pull request as ready for review January 12, 2025 17:42
@awalsh128
Copy link
Owner

One concern is unexpected behavior and silent fails that extend the time of execution and doesn't leverage the action. What scenarios do you think this would be helpful?

@torsknod2
Copy link
Author

torsknod2 commented Jan 14, 2025

@awalsh128 Whyever I had the issue that I had a cache hit, but the content restore did not work.
This is why I came to the idea to have a fallback for such situations.

After having that I noticed that the restore exits with 0 even with the error during restoring from the cache when files are missing.
Because of that I added the trap.

Unfortunately I was never able to really root-cause it, because I found no way to download the files from the cache to my local machine when workflows failed.

@awalsh128
Copy link
Owner

Do you have possible some old logs I could look at, or maybe the list of packages and version you were at? Also how long ago was it. The cache package has seen an upgrade.

@torsknod2
Copy link
Author

@awalsh128 I am on a business trip now until end of the week, so I have only the phone to access my personal stuff.
The runs with the actions are used in here https://github.com/torsknod2/MDSpanTest/actions/workflows/ci.yml .
The most recent ones use my fork, but a bit older runs use yours.
Best is to filter for a branch starting with number 2.

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.

2 participants