Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Plan: Remove AWF Cleanup Steps

  • Remove pre-execution cleanup step generation (generateAWFCleanupStep)
  • Remove post-execution cleanup step generation (generateAWFPostExecutionCleanupStep)
  • Remove calls to cleanup step functions in GetInstallationSteps and GetCleanupStep
  • Update or remove tests that validate cleanup steps in firewall_args_test.go
  • Build and test changes
  • Recompile workflows to remove cleanup steps from lock files
  • Recompile test workflow to remove cleanup steps

Changes Made

Code Changes

  1. Removed generateAWFCleanupStep function - Deleted the function that generated the pre-execution "Cleanup any existing awf resources" step
  2. Removed generateAWFPostExecutionCleanupStep function - Deleted the function that generated the post-execution "Cleanup awf resources" step
  3. Updated GetInstallationSteps - Removed the call to generateAWFCleanupStep and the unused cleanupScript variable
  4. Updated GetCleanupStep - Simplified to always return an empty step with a comment explaining that cleanup steps have been removed

Test Changes

  1. Removed TestCleanupScriptWorkspacePath - Deleted the entire test function from firewall_args_test.go as it tested functionality that no longer exists
  2. Removed TestCleanupScriptWorkspaceIntegration - Deleted the integration test from firewall_args_integration_test.go that verified cleanup steps in compiled workflows

Workflow Lock Files

All workflow lock files have been recompiled and the cleanup steps have been removed:

  • Removed "Cleanup any existing awf resources" (pre-execution)
  • Removed "Cleanup awf resources" (post-execution)
  • Updated 16 main workflow lock files
  • Updated test workflow lock file (.github/workflows/tests/test-firewall-default.lock.yml)

Verification

  • ✅ All unit tests pass
  • ✅ Code builds successfully
  • ✅ Formatting and linting pass
  • ✅ Cleanup steps no longer appear in any compiled workflows
  • ✅ Test workflow also updated
Original prompt

Delete the "Cleanup any existing awf resources" steps from being generated (and the code that generates them)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pelikhan
Copy link
Contributor

pelikhan commented Nov 6, 2025

@copilot and the "Cleanup awf resources" step

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove cleanup steps for existing AWF resources Remove AWF cleanup steps from workflow generation Nov 6, 2025
Copilot AI requested a review from pelikhan November 6, 2025 02:34
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review November 6, 2025 02:40
Copilot AI review requested due to automatic review settings November 6, 2025 02:40
Copy link
Contributor Author

Copilot AI commented Nov 6, 2025

@copilot and the "Cleanup awf resources" step

The test workflow also had cleanup steps. Recompiled it in commit 0b221cb to remove both "Cleanup any existing awf resources" and "Cleanup awf resources" steps.

Copilot AI requested a review from pelikhan November 6, 2025 02:42
Copy link
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 removes AWF (agentic workflow firewall) cleanup step functionality from the Copilot engine. The cleanup steps were previously executed both before (pre-execution) and after (post-execution) the workflow, but are no longer needed.

Key changes:

  • Removed cleanup step generation functions (generateAWFCleanupStep and generateAWFPostExecutionCleanupStep)
  • Removed cleanup step invocations from installation and cleanup phases
  • Removed associated tests for cleanup script workspace path handling
  • Updated all compiled workflow lock files to reflect the removal of cleanup steps

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

File Description
pkg/workflow/copilot_engine.go Removed cleanup step generation functions and their invocations from installation and cleanup methods
pkg/workflow/firewall_args_test.go Removed tests for cleanup script workspace path validation
pkg/workflow/firewall_args_integration_test.go Removed integration tests for cleanup script workspace path handling
.github/workflows/*.lock.yml Updated compiled workflow files to remove cleanup steps from installation and post-execution phases
Comments suppressed due to low confidence (1)

pkg/workflow/copilot_engine.go:1

  • [nitpick] The awfVersion variable can be simplified by extracting it inline. Consider refactoring to awfInstall := generateAWFInstallationStep(getVersionOrEmpty(firewallConfig)) or extracting the version directly in the function call for better readability.
package workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit c5330cf into main Nov 6, 2025
39 of 43 checks passed
@pelikhan pelikhan deleted the copilot/remove-awf-resources-steps branch November 6, 2025 02:43
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.

2 participants