Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b69ad35

Browse filesBrowse files
committed
poetry: Bump cache primary key
1 parent 881ca6e commit b69ad35
Copy full SHA for b69ad35

File tree

Expand file treeCollapse file tree

3 files changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-2
lines changed

‎__tests__/cache-restore.test.ts

Copy file name to clipboardExpand all lines: __tests__/cache-restore.test.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
183183
expect(infoSpy).toHaveBeenCalledWith(
184184
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-20.04-Ubuntu-python-${pythonVersion}-${packageManager}-${fileHash}`
185185
);
186+
} else if (packageManager === 'poetry') {
187+
expect(infoSpy).toHaveBeenCalledWith(
188+
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-python-${pythonVersion}-${packageManager}-v2-${fileHash}`
189+
);
186190
} else {
187191
expect(infoSpy).toHaveBeenCalledWith(
188192
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-python-${pythonVersion}-${packageManager}-${fileHash}`

‎dist/setup/index.js

Copy file name to clipboardExpand all lines: dist/setup/index.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66141,7 +66141,8 @@ class PoetryCache extends cache_distributor_1.default {
6614166141
computeKeys() {
6614266142
return __awaiter(this, void 0, void 0, function* () {
6614366143
const hash = yield glob.hashFiles(this.patterns);
66144-
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
66144+
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
66145+
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
6614566146
const restoreKey = undefined;
6614666147
return {
6614766148
primaryKey,

‎src/cache-distributions/poetry-cache.ts

Copy file name to clipboardExpand all lines: src/cache-distributions/poetry-cache.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class PoetryCache extends CacheDistributor {
4646

4747
protected async computeKeys() {
4848
const hash = await glob.hashFiles(this.patterns);
49-
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
49+
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
50+
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
5051
const restoreKey = undefined;
5152
return {
5253
primaryKey,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.