Fix cache-memory artifact upload path generation in threat-detection workflows#32733
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix daily firewall logs collector and reporter issue
Fix cache-memory artifact upload path generation in threat-detection workflows
May 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects cache-memory artifact upload path generation by removing the trailing /. suffix from emitted actions/upload-artifact paths, and updates related threat-detection integration expectations.
Changes:
- Emits cache-memory artifact upload paths as the cache directory directly.
- Updates threat-detection cache-memory test expectations for default and multi-cache workflows.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/cache.go |
Updates cache-memory upload-artifact path generation. |
pkg/workflow/cache_memory_threat_detection_test.go |
Adjusts expected generated workflow path strings in threat-detection integration tests. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
pkg/workflow/cache_memory_threat_detection_test.go:140
- This expectation also still matches the old broken value because
strings.Containsdoes not require the line to end here;path: /tmp/gh-aw/cache-memory-session/.would satisfy this string. Add a negative assertion for the/.path or switch these checks to exact generated YAML line comparisons for the upload-artifact steps.
"name: cache-memory-session\n include-hidden-files: true\n path: /tmp/gh-aw/cache-memory-session",
- Files reviewed: 2/2 changed files
- Comments generated: 2
| } | ||
| builder.WriteString(" include-hidden-files: true\n") | ||
| fmt.Fprintf(builder, " path: %s/.\n", cacheDir) | ||
| fmt.Fprintf(builder, " path: %s\n", cacheDir) |
| "name: cache-memory", | ||
| "include-hidden-files: true", | ||
| "path: /tmp/gh-aw/cache-memory/.", | ||
| "path: /tmp/gh-aw/cache-memory", |
Collaborator
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…wall-logs-collector-failure Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Daily Firewall Logs Collector and Reporter run failed after agent execution due to an invalid
actions/upload-artifactpath pattern (/tmp/gh-aw/cache-memory/.). This change corrects cache-memory artifact path emission so post-agent artifact upload no longer trips path validation.Root cause addressed
/.to cache directories.update_cache_memoryprocessing.Compiler output alignment
Code change (representative)