Merged
Conversation
Contributor
|
Thanks for the fix @perwestling , can you fix DCO and I'll approve/merge? |
Contributor
Author
First PR for me in this repo. I will look into the DCO tomorrow. Thanks |
This commit will use curl to get the SHA for latest version of dagger, only if user has requested to use 'latest' version. If requesting a specific version the curl call is avoided. This will help to alleviate issue with Error 429 if using a specific dagger-for-github version. Signed-off-by: u102348 (Per Westling) <per.westling1@saabgroup.com>
8219bb6 to
a20c137
Compare
Contributor
Author
|
@kpenfound Did a rebase + signoff, otherwise no changes. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit will use curl to get the SHA for latest version of dagger, only if user has requested to use 'latest' version. If requesting a specific version the curl call is avoided.
This will help to alleviate issue with Error 429 if using a specific dagger-for-github version.
This is a small change to existing action. The code change is exercised by the existing tests. The change is in the "skip installation if already installed" logic, and the existing tests already cover the relevant scenarios:
existing-install — pre-installs v0.18.17, then requests v0.18.16 → should override (tests the $version == $VERSION path)
latest-install — pre-installs v0.18.17, then requests "latest" → should override if latest is newer (tests the new lazy curl path)
The latest-install job is actually already exercising the new code path. It pre-installs an older version, then runs the action with version: "latest".
This change means it will now:
See dagger is installed → enter the check block
$VERSION is empty (since "latest" gets cleared) → run the curl to fetch latest
Compare the installed version against latest → override if different
So the existing latest-install test already validates the change.
One scenario that's harder to test is the "skip" case — where dagger is already at the latest version and the curl confirms it matches. That would require pre-installing whatever the current latest is, which is a moving target and would make the test brittle.