Error: Cache service responded with 404 on GHES
Closed this issue ยท 7 comments
Version
redhat-actions/openshift-tools-installer@v1
Tested on Github Entreprise Server 3.0 (on premise Github)
Describe the bug
With any tools being installed, the installation will crash with Error: Cache service responded with 404
Steps to reproduce, workflow links, screenshots
Using such a configuration:
- name: Install CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
helm: latest
oc: latest
will end up with such a crash:
Installing helm matching version "latest"
Installing oc matching version "latest"
๐ Searching for the latest version of helm
Download directory for helm is https://mirror.openshift.com/pub/openshift-v4/clients/helm/
Latest release of helm is 3.5.0
Current operating system is linux
Current architecture is amd64
Selecting helm-linux-amd64.tar.gz
Using GITHUB_WORKSPACE for storage
๐ CLIs will be downloaded to /usr/local/actions-runner/_work/anthony-mai/anthony-mai/openshift-bin
Added /usr/local/actions-runner/_work/anthony-mai/anthony-mai/openshift-bin to PATH
Checking the cache for helm 3.5.0...
Error: Error: Cache service responded with 404
๐ Searching for the latest version of oc
Download directory for oc is https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
Latest release of oc is 4.7.10
Selecting openshift-client-linux-4.7.10.tar.gz
Checking the cache for oc 4.7.10...
Error: Error: Cache service responded with 404
โ Failed to install helm and oc.
Workaround
If you set the environment variable named CLI_INSTALLER_SKIP_CACHE to true, crahs won't occur (but cache won't be leveraged though...)
env:
CLI_INSTALLER_SKIP_CACHE: true
I think this is just not supported on GHES and you will not be able to use the caching feature. actions/cache#505
... in which case, it would make sense for this action to skip the cache by default if it's running on GHE. I wonder if there's API to detect that.
closing pending anything further we can do.
hello @tetchel - thanks for the reply.
I wonder if there's API to detect that.
There seems to be, but it's pretty basic: https://github.com/actions/cache/blob/main/src/utils/actionUtils.ts#L5
closing pending anything further we can do.
okee makes sense, I see you updated the documentation per 3d239ae , so all is fine I guess.
thanks
it also won't crash anymore, it will just log a bunch of warnings.
good to know about that env var GITHUB_SERVER_URL
https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
I looked in the ${{ github }}
context and it wasn't there, I should have checked the env vars list too.