Skip to content

Fix cache-memory artifact upload path generation in threat-detection workflows#32733

Merged
pelikhan merged 4 commits into
mainfrom
copilot/aw-daily-firewall-logs-collector-failure
May 17, 2026
Merged

Fix cache-memory artifact upload path generation in threat-detection workflows#32733
pelikhan merged 4 commits into
mainfrom
copilot/aw-daily-firewall-logs-collector-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

The Daily Firewall Logs Collector and Reporter run failed after agent execution due to an invalid actions/upload-artifact path 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

    • Updated cache-memory artifact upload generation to stop appending /. to cache directories.
    • This affects threat-detection flows where cache-memory is uploaded for downstream update_cache_memory processing.
  • Compiler output alignment

    • Updated threat-detection integration test expectations to match the corrected emitted paths for default and multi-cache configurations.
  • Code change (representative)

    // before
    fmt.Fprintf(builder, "          path: %s/.\n", cacheDir)
    
    // after
    fmt.Fprintf(builder, "          path: %s\n", cacheDir)

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
Copilot AI requested a review from pelikhan May 17, 2026 03:54
@pelikhan pelikhan marked this pull request as ready for review May 17, 2026 03:54
Copilot AI review requested due to automatic review settings May 17, 2026 03:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.Contains does 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

Comment thread pkg/workflow/cache.go
}
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",
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

Copilot AI and others added 2 commits May 17, 2026 04:04
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…wall-logs-collector-failure

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 17, 2026

@copilot merge main and recompile

Done in 2b6d968: merged main into this branch and ran make recompile. The workflow lockfiles are up to date (including daily-firewall-report.lock.yml with the corrected cache-memory artifact path).

@pelikhan pelikhan merged commit acf99c8 into main May 17, 2026
@pelikhan pelikhan deleted the copilot/aw-daily-firewall-logs-collector-failure branch May 17, 2026 04:20
@github-actions github-actions Bot mentioned this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Daily Firewall Logs Collector and Reporter failed

3 participants