Unverified Commit 1a78ace1 authored by Shubham Tiwari's avatar Shubham Tiwari Committed by GitHub
Browse files

Updated the GHES warning message (#925)

* changed the error message

* format

* review comment
parent 1bc650b0
Loading
Loading
Loading
Loading
+2 −2
Changes for __tests__/actionUtils.test.ts: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -277,8 +277,8 @@ test("isCacheFeatureAvailable for ac enabled", () => {
test("isCacheFeatureAvailable for ac disabled on GHES", () => {
    jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);

    const message =
        "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.";
    const message = `Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`;
    const infoMock = jest.spyOn(core, "info");

    try {
+2 −1
Changes for dist/restore/index.js: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -38452,7 +38452,8 @@ exports.getInputAsInt = getInputAsInt;
function isCacheFeatureAvailable() {
    if (!cache.isFeatureAvailable()) {
        if (isGhes()) {
            logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.");
            logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`);
        }
        else {
            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
+2 −1
Changes for dist/save/index.js: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -38452,7 +38452,8 @@ exports.getInputAsInt = getInputAsInt;
function isCacheFeatureAvailable() {
    if (!cache.isFeatureAvailable()) {
        if (isGhes()) {
            logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.");
            logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`);
        }
        else {
            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
+2 −1
Changes for src/utils/actionUtils.ts: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -81,7 +81,8 @@ export function isCacheFeatureAvailable(): boolean {
    if (!cache.isFeatureAvailable()) {
        if (isGhes()) {
            logWarning(
                "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not."
                `Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`
            );
        } else {
            logWarning(