Consolidate agent job artifact uploads into single step#8835
Conversation
- Create generateUnifiedArtifactUpload function to upload all artifacts in one step - Collect all artifact paths throughout main job generation - Replace individual upload calls with path collection - Unified upload runs with if: always(), continue-on-error: true, and if-no-files-found: ignore - Consolidated: prompt, aw_info, MCP logs, firewall logs, agent stdio, cache-memory, repo-memory, safe-outputs assets, git patches - Note: Safe-outputs raw/sanitized uploads remain separate as they're used by dependent jobs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot keep repo-memory and cache-memory artifacts separate |
- Updated TestPromptUploadArtifact to check for unified upload - Updated TestCacheMemoryWithThreatDetection for multiple cache scenarios - Updated TestGitPatchGeneration to verify patch in unified upload - Updated TestMCPLogsUpload to check for MCP logs in unified upload - Updated TestStepOrderingValidation to check agent-artifacts upload - Updated TestAwInfoTmpPath to verify aw_info in unified upload - All unit tests now passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Restored generateRepoMemoryArtifactUpload() call - Restored generateCacheMemoryArtifactUpload() call - Removed repo-memory and cache-memory from unified upload - Updated tests to expect separate upload steps - All tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 5e28108. Repo-memory and cache-memory now have separate upload steps: - name: Upload cache-memory data as artifact
uses: actions/upload-artifact@...
if: always()
with:
name: cache-memory
path: /tmp/gh-aw/cache-memory
# ... other steps ...
- name: Upload agent artifacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@...
with:
name: agent-artifacts
path: |
/tmp/gh-aw/aw-prompts/prompt.txt
/tmp/gh-aw/aw_info.json
/tmp/gh-aw/mcp-logs/
/tmp/gh-aw/sandbox/firewall/logs/
/tmp/gh-aw/agent-stdio.logThe unified upload now includes: prompt, aw_info, MCP logs, SafeInputs logs, firewall logs, agent stdio, safe-outputs assets, and git patches. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
Smoke Test Results: Copilot Safe Inputs✅ File Writing: Created Overall Status: FAIL (1/3 tests passed)
|
|
Smoke test results:
|
Smoke Test Results✅ All tests passed
|
Copilot Engine Smoke Test ResultsRecent PRs: #8838 (Import neutral tools), #8840 (Security fix) ✅ GitHub MCP - Retrieved 2 merged PRs Status: PASS cc: @pelikhan (PR author/assignee)
|
Smoke Test Results
Overall Status: FAIL Playwright MCP and safeinputs-gh tools are not configured in this workflow environment.
|
Smoke Test Results - Claude EngineLast 2 Merged PRs:
Test Results: Overall Status: PASS (5/6 tests passed)
|
|
PRs: [security-fix] Fix hardcoded credentials false positive in copilot execution (Alert #440); Add test coverage for importing neutral tools (edit, web-fetch, web-search, safety-prompt, timeout, startup-timeout)
|
|
@copilot make sure artifact flattening works in the download logs command |
- Added flattenUnifiedArtifact() to handle nested tmp/gh-aw/ structure - Unified artifact contains files with full paths (/tmp/gh-aw/*) - When downloaded, creates agent-artifacts/tmp/gh-aw/ nesting - Flattening moves files from nested path to root output directory - Preserves directory structure (aw-prompts/, mcp-logs/, etc.) - Added comprehensive tests for unified artifact flattening - All existing flatten tests continue to pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 1a63a46. Added The unified artifact contains files with full paths like The flattening function moves these files to the root output directory, preserving subdirectory structures, so the final result is: Added comprehensive tests to verify the flattening works correctly. |
Refactor agent job artifact uploads into single step
Implementation Complete ✅
compiler_yaml_artifacts.goand related filescompiler_yaml_main_job.goto call unified function onceif: always()andcontinue-on-error: trueif-no-files-found: ignorefor all pathsSummary of Changes
New Unified Upload Function:
generateUnifiedArtifactUpload()incompiler_yaml_artifacts.goif: always()andcontinue-on-error: trueif-no-files-found: ignoreArtifacts Consolidated into Unified Upload:
/tmp/gh-aw/aw-prompts/prompt.txt(prompt)/tmp/gh-aw/aw_info.json(workflow info)/tmp/gh-aw/mcp-logs/(MCP server logs)/tmp/gh-aw/safe-inputs/logs/(SafeInputs logs)/tmp/gh-aw/sandbox/firewall/logs/(firewall logs)/tmp/gh-aw/agent-stdio.log(agent stdio)/tmp/gh-aw/safeoutputs/assets/(safe-outputs assets)/tmp/gh-aw/aw.patch(git patches)Preserved Separate Uploads:
safe-outputartifact) - Required for dependent jobsagent-outputartifact) - Required for dependent jobsArtifact Flattening for Downloads:
flattenUnifiedArtifact()inpkg/cli/logs_download.goagent-artifacts/tmp/gh-aw/structure created by GitHub Actionsaw-prompts/,mcp-logs/)downloadRunArtifacts()workflowlogs_flatten_test.goTest Updates:
TestFlattenUnifiedArtifactto verify download flatteningBenefits:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Changeset
actions/upload-artifactsteps into a single "Upload agent artifacts" step with consistent error handling; preserve separate uploads for safe-outputs raw/sanitized, repo-memory, and cache-memory. Updated tests to cover the new unified upload behavior.