Skip to content

Commit

Permalink
invalidate broken cache of v1.16.1 (#190)
Browse files Browse the repository at this point in the history
This will invalidate all caches because v1.16.1 does not work with old caches but fails with hard to understand errors.
  • Loading branch information
eifinger authored Mar 1, 2024
1 parent aad0cd7 commit 1877640
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions dist/save-cache/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/save-cache/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/setup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/setup/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/restore-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {IS_MAC, getLinuxInfo, getMacOSInfo} from './utils'

export const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'
export const STATE_CACHE_MATCHED_KEY = 'cache-matched-key'
const CACHE_VERSION = '1'
const CACHE_DEPENDENCY_PATH = 'requirements**.lock'
const workingDirInput = core.getInput('working-directory')
const workingDir = workingDirInput ? `/${workingDirInput}` : ''
Expand Down Expand Up @@ -56,8 +57,8 @@ async function computeKeys(
: ''
const osInfo = IS_MAC ? await getMacOSInfo() : await getLinuxInfo()
const prefix = cachePrefix ? `${cachePrefix}-` : ''
const primaryKey = `${prefix}setup-rye-${process.env['RUNNER_OS']}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}-${dependencyPathHash}`
const restoreKey = `${prefix}setup-rye-${process.env['RUNNER_OS']}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}`
const primaryKey = `${prefix}setup-rye-${CACHE_VERSION}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}-${dependencyPathHash}`
const restoreKey = `${prefix}setup-rye-${CACHE_VERSION}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}`
return {primaryKey, restoreKey}
}

Expand Down

0 comments on commit 1877640

Please sign in to comment.