GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — Fix save-always/post-if with an output by ruffsl · Pull Request #6 · runs-on/cache Conversation
|
|
Shoot, cherry-picking over the orginal PR didn't work (as compared to when applied to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
737fccf to
399e3b6
Compare
|
Just noticed the However is also looks like the @crohr , any interest in updating v4 branch to track the prerequisite patches from upstream, E.g: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
V4 branch has more commits (mine) for handling s3 backend. I will pick the changes from upstream, most likely this week or next! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ruffsl I'd like the changes to merged upstream before proceeding, so that I do not diverge from upstream. Is your issue not solvable through the use of the dedicated |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Eh, sort of. We have a lot of separate cache calls, so this would effectively double all those steps.
No prob. But could we still at least pull in the current head of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ruffsl v4 has been updated with the latest fixes from upstream. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
399e3b6 to
5168c70
Compare
|
Dang. I rebased from the head of v4 on this repo, then rebuilt the patch, but can't get the same fix working. It's odd in that the diff of the npm build look the same, but perhaps this fork has affected the control flow?
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Once such local change I can readily spot between the two diffs is this: --- https://raw.githubusercontent.com/bearfriend/cache/3a22487daddcfa2ebf7238869de052504cc6dc4b/dist/restore/index.js +++ https://raw.githubusercontent.com/botsandus/cache/98f0c46be05ee2b67a1c04787e1448b4537ac39b/dist/restore/index.js @@ -1,4 +1,4 @@ -function restoreImpl(stateProvider) { +function restoreImpl(stateProvider, earlyExit) { return __awaiter(this, void 0, void 0, function* () { core.setOutput(constants_1.Outputs.SaveAlways, core.getInput(constants_1.Inputs.SaveAlways) || "false"); try { @@ -20,7 +20,14 @@ const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive); const failOnCacheMiss = utils.getInputAsBool(constants_1.Inputs.FailOnCacheMiss); const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); - const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive); + let cacheKey; + if (canSaveToS3) { + core.info("The cache action detected a local S3 bucket cache. Using it."); + cacheKey = yield custom.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }); + } + else { + cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive); + } if (!cacheKey) { if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); @@ -45,6 +52,9 @@ } catch (error) { core.setFailed(error.message); + if (earlyExit) { + process.exit(1); + } } }); } @crohr , any suggestions? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looks like this'll be a wontfix from upstream:
@crohr , I've now indeed gone back to that approach using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.