Enabling actions/cache for GHES based on presence of AC service#774
Enabling actions/cache for GHES based on presence of AC service#774tiwarishub merged 23 commits intomainfrom
Conversation
src/restore.ts
Outdated
| utils.logWarning( | ||
| "Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details" | ||
| ); | ||
| if (!cache.isAvailable()) { |
There was a problem hiding this comment.
Rename isAvailable to isFeatureAvailable otherwise it is looks like we are talking about a cache item being available.
src/save.ts
Outdated
| "Something is going wrong with ArtifactCache service which supports cache actions. Please check https://www.githubstatus.com/ for any ongoing issue in actions." | ||
| ); | ||
| } | ||
| utils.setCacheHitOutput(false); |
There was a problem hiding this comment.
Do we need this during save?
src/save.ts
Outdated
| if (!cache.isAvailable()) { | ||
| if (utils.isGhes()){ | ||
| utils.logWarning( | ||
| "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if ArtifactCache service is enabled or not." | ||
| ); | ||
| } | ||
| else{ | ||
| utils.logWarning( | ||
| "Something is going wrong with ArtifactCache service which supports cache actions. Please check https://www.githubstatus.com/ for any ongoing issue in actions." | ||
| ); | ||
| } |
There was a problem hiding this comment.
Looks like big enough repeated code and can think about moving to utils
There was a problem hiding this comment.
moved to function
README.md
Outdated
|
|
||
| ## Changelog schedule and history | ||
|
|
||
| | Status | Version | Date | Highlights | |
There was a problem hiding this comment.
Add to this changelog with version number which can be updated when publishing.
Also move this changelog to a separate file named CHANGELOG
There was a problem hiding this comment.
Created a file with the name RELEASE.md because found this nomenclature is used toolkit as well.
__tests__/save.test.ts
Outdated
| "Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details" | ||
| }); | ||
|
|
||
| test("save on ghes without AC available should no=op", async () => { |
|
How do we update both version actions/cache@v2 and actions/cache@v3 ? |
| @@ -0,0 +1,7 @@ | |||
| # Releases | |||
|
|
|||
| ### 3.0.0 | |||
There was a problem hiding this comment.
we support actions/cache@v2 as well. We could add the latest version of v2 here in the list.
There was a problem hiding this comment.
Yes that i will update on when i will raise PR for actions/cache@v2
There was a problem hiding this comment.
I think we will only support v3 for ghes 3.5 as that has runner with node 16. @ashwinsangem do we support v2 on 3.5?
There was a problem hiding this comment.
We won't support v2 in GHES 3.5 as the minimum runner version is updated to node16. Full discussion here.
There was a problem hiding this comment.
okay, then we will not port these changes on v2 version.
I am planning to create a release branch |
This PR enables
actions/cachein GHES based on the presence of the Actions cache service in the GHES instance. It checks the presence of the GHES instance using the recent toolkit changes published in 2.0.0 actions/toolkit#1028. This same presence can also be applied to the dotcom scenario.When AC service is not present

When AC service is present

Linked items: https://github.com/github/c2c-actions/issues/4065