-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support caching with use-installer
when version
not specified
#76
Labels
Comments
Closed
hoffa
changed the title
Support caching with
Support caching with Mar 4, 2023
use-installer
when version not specifieduse-installer
when version
not specified
Noticed that we easily parse the latest release tag using |
3 tasks
We've now support caching with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
With #73 merged, SAM CLI is cached when
use-installer
is enabled andversion
is specified.For example:
This is beneficial for self-hosted runners that don't get a fresh machine at every workflow run.
Issue
When
version
is not specified (i.e. it uses the latest available version), it currently does not cache:setup-sam/lib/setup.js
Lines 137 to 144 in b42eb7a
setup-sam/lib/setup.js
Lines 154 to 159 in b42eb7a
Proposal
Ideally, it would do something like this when
version
is not specified:Challenges
version
field in PyPI (e.g.curl https://pypi.org/pypi/aws-sam-cli/json | jq -r .info.version
), there's no guarantee the GitHub release for that version will always exist at the same time (they're separate assets, so there can be a brief delay during releases). If we use the GitHub release directly, there's no robust way of getting the version (but could parse the title or tag).Alternatives
check-latest
fromactions/setup-go
andactions/setup-python
? GitHub-hosted runners already include SAM CLI (see e.g. https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md), so perhaps by default if it finds SAM CLI is installed, it could immediately return? Might require a new major version, as it no longer installs latest version by default. Might not be a reliable way to ensure pre-installed version is functioning well. The waycheck-latest
works seems to be a little different; it's because the version can be a range, and so instead of picking whatever fits in the range from the cache, it ensures the latest version is used.The text was updated successfully, but these errors were encountered: