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 — Cache on ghes by tiwarishub · Pull Request #363 · actions/setup-python Conversation
|
|
Few CI checks are failing but I believe this is failing on master so I think it ok to ignore it? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| throw new Error( | ||
| 'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.' | ||
| ); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same here: we don't want an issue with the cache service to block otherwise successful runs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Despite the conversation on the case above, I think this still stands as a place where we should warn instead of fail.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Make sense. I will update the PR
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think we should consider using warnings instead of errors for caching failures.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Brian Cristante <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| throw new Error( | ||
| 'Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.' | ||
| ); |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to throw an error here?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As per the previous code, we were throwing an error in the GHES scenario https://github.com/actions/setup-python/blob/main/src/setup-python.ts#L15. Now we don't want to change end-user behaviour and this condition is similar to that that where workflow is running on GHES and workflow has explicitly asked for the cache using cache option but it has not enabled the cache. we had similar discussion here #363 (comment)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| { | ||
| "name": "setup-python", | ||
| "version": "2.2.2", | ||
| "version": "2.2.3", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could you please change it to the planning version of the setup-python action?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@dmitry-shibanov, Sorry I am not aware of the planned version. Could please share what is planned version.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it should be 3.0.1 or 3.1.0 to be consistent with the setup-python action releases: https://github.com/actions/setup-python/releases/tag/v3.0.0
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
True, even I found this to be wired that package.json has 2.2.2 and released tag 3.0.0 which we generally keep the same. So I thought this is already followed to keep them not in sync. Shall I fix this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ); | ||
| } else { | ||
| core.warning( | ||
| 'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.' |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this message accurate? It looks like cache.isFeatureAvailable() just looks for whether an environment variable is set.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If my understanding is correct, I would say something like
| 'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.' | |
| 'This runner is not configured to use the cache service. Caching will be skipped.' |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
yes, this env var is only set when cache service is present otherwise this var will not be set. This else condition is for dotcom scenario so ideally this scenario should never occur because AC is always there in dotcom. But just to cover corner scenario i have added this
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ok I understand better now https://github.com/actions/runner/blob/408d6c579c36f0eb318acfdafdcbafc872696501/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs
How about:
| 'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.' | |
| 'The runner was not able to contact the cache service. Caching will be skipped.' |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Okay. Let me update the PR with changes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All issues we noticed were referenced :) Everything seems ok now :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* upstream/main: (33 commits) Fix virtual-env toolcache links Updated @actions/cache (actions#382) ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (actions#379) Cache hit output (actions#373) Add pyton-version to setup PyPy output (actions#365) Rework pipenv caching test (actions#375) Update README.md to fix setup-python version in example (actions#368) dist fix (actions#367) Cache on ghes (actions#363) Update dist Use `\n` instead of `os.EOL` Update dist Initialise pyproject.toml Build and format Remove console.log Remove unused file Reduce test matrix Parse values from poetry Release Add more tests ...
* initial changes * updated version * format check * refactored code * updated test cases * Update src/utils.ts Co-authored-by: Brian Cristante <[email protected]> * Update utils.ts * Update utils.test.ts * review comments * dist update * Review comment * update version * updated version Co-authored-by: Brian Cristante <[email protected]>
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.