-
Notifications
You must be signed in to change notification settings - Fork 178
fix: replace hardcoded GCS cache keys with monthly-rotating dynamic keys #1297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
1302998
8be6e73
50e260a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,11 +39,17 @@ jobs: | |||||
| - name: 'Check gcloud CLI' | ||||||
| run: 'gcloud info' | ||||||
|
|
||||||
| - name: Generate cache key | ||||||
| id: cache-key | ||||||
| run: echo "key=gcs_cache_integration_tests_$(date +%Y%m)" >> "$GITHUB_OUTPUT" | ||||||
|
|
||||||
| - name: Restore GCS cache | ||||||
| uses: actions/cache/restore@v3 | ||||||
| with: | ||||||
| path: gcs_cache | ||||||
| key: gcs_cache_integration_tests_20240922 | ||||||
| key: ${{ steps.cache-key.outputs.key }} | ||||||
| restore-keys: | | ||||||
| gcs_cache_integration_tests_ | ||||||
|
Comment on lines
+51
to
+52
|
||||||
| restore-keys: | | |
| gcs_cache_integration_tests_ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,11 +35,17 @@ jobs: | |||||
| - name: 'Check gcloud CLI' | ||||||
| run: 'gcloud info' | ||||||
|
|
||||||
| - name: Generate cache key | ||||||
| id: cache-key | ||||||
| run: echo "key=gcs_cache_notebooks_$(date +%Y%m)" >> "$GITHUB_OUTPUT" | ||||||
|
|
||||||
|
Comment on lines
+38
to
+41
|
||||||
| - name: Restore GCS cache | ||||||
| uses: actions/cache/restore@v3 | ||||||
| with: | ||||||
| path: gcs_cache | ||||||
| key: gcs_cache_notebooks_20240922 | ||||||
| key: ${{ steps.cache-key.outputs.key }} | ||||||
| restore-keys: | | ||||||
| gcs_cache_notebooks_ | ||||||
|
Comment on lines
+47
to
+48
|
||||||
| restore-keys: | | |
| gcs_cache_notebooks_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step id
cache-keycontains a hyphen, which cannot be referenced via dot-notation in expressions.${{ steps.cache-key.outputs.key }}will be parsed incorrectly and the workflow may fail to evaluate the expression. Rename the step id to something likecache_key(and update references) or use bracket notation (steps['cache-key'].outputs.key).