-
Notifications
You must be signed in to change notification settings - Fork 367
Fix activity_report cache persistence when report step fails #27947
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -384,8 +384,9 @@ jobs: | |
| `) | ||
|
|
||
| yaml.WriteString(generateInstallCLISteps(actionMode, version, actionTag, resolver)) | ||
| yaml.WriteString(` - name: Cache activity report logs | ||
| uses: ` + getActionPin("actions/cache") + ` | ||
| yaml.WriteString(` - name: Restore activity report logs cache | ||
| id: activity_report_logs_cache | ||
| uses: ` + getActionPin("actions/cache/restore") + ` | ||
| with: | ||
| path: ./.cache/gh-aw/activity-report-logs | ||
| key: ${{ runner.os }}-activity-report-logs-${{ github.repository }}-${{ github.ref_name }}-${{ github.run_id }} | ||
|
|
@@ -406,6 +407,13 @@ jobs: | |
| setupGlobals(core, github, context, exec, io, getOctokit); | ||
| const { main } = require('${{ runner.temp }}/gh-aw/actions/run_activity_report.cjs'); | ||
| await main(); | ||
|
|
||
| - name: Save activity report logs cache | ||
| if: ${{ always() }} | ||
| uses: ` + getActionPin("actions/cache/save") + ` | ||
| with: | ||
| path: ./.cache/gh-aw/activity-report-logs | ||
| key: ${{ steps.activity_report_logs_cache.outputs.cache-primary-key }} | ||
|
Comment on lines
+411
to
+416
|
||
| `) | ||
|
|
||
| // Add close_agentic_workflows_issues job for workflow_dispatch with operation == 'close_agentic_workflows_issues' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -459,8 +459,9 @@ jobs: | |
| `) | ||
|
|
||
| yaml.WriteString(generateInstallCLISteps(actionMode, version, actionTag, resolver)) | ||
| yaml.WriteString(` - name: Cache activity report logs | ||
| uses: ` + getActionPin("actions/cache") + ` | ||
| yaml.WriteString(` - name: Restore activity report logs cache | ||
| id: activity_report_logs_cache | ||
| uses: ` + getActionPin("actions/cache/restore") + ` | ||
| with: | ||
| path: ./.cache/gh-aw/activity-report-logs | ||
| key: ${{ runner.os }}-activity-report-logs-` + repoSlug + `-${{ github.ref_name }}-${{ github.run_id }} | ||
|
|
@@ -482,6 +483,13 @@ jobs: | |
| setupGlobals(core, github, context, exec, io, getOctokit); | ||
| const { main } = require('${{ runner.temp }}/gh-aw/actions/run_activity_report.cjs'); | ||
| await main(); | ||
|
|
||
| - name: Save activity report logs cache | ||
| if: ${{ always() }} | ||
| uses: ` + getActionPin("actions/cache/save") + ` | ||
| with: | ||
| path: ./.cache/gh-aw/activity-report-logs | ||
| key: ${{ steps.activity_report_logs_cache.outputs.cache-primary-key }} | ||
|
Comment on lines
+487
to
+492
|
||
| `) | ||
|
|
||
| // Add validate_workflows job for workflow_dispatch/workflow_call with operation == 'validate' | ||
|
|
||
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.
With
if: ${{ always() }}, this save step will run even if the build or cache restore step failed/was skipped. In that scenario the referenced outputsteps.activity_report_logs_cache.outputs.cache-primary-keywill be empty, andactions/cache/savewill fail becausekeyis required—potentially replacing the original error. Gate this step on the restore step having run and emitting a non-empty primary key output (or provide a fallback key).