Skip to content

Remove empty network.go file#3569

Merged
pelikhan merged 2 commits into
mainfrom
copilot/remove-empty-network-file
Nov 10, 2025
Merged

Remove empty network.go file#3569
pelikhan merged 2 commits into
mainfrom
copilot/remove-empty-network-file

Conversation

Copilot AI commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

The file pkg/workflow/network.go contained only a package declaration with no functions or types. Network functionality already exists in dedicated files.

Changes

  • Removed pkg/workflow/network.go
  • Updated .github/workflows/schema-consistency-checker.md to reference actual network implementation files:
    • engine.go - NetworkPermissions type
    • domains.go - GetAllowedDomains function
    • engine_network_hooks.go - network hook generation
    • engine_firewall_support.go - firewall support

Resolves #3435

Original prompt

This section details on the original issue you should resolve

<issue_title>[task] Address empty network.go file - remove or consolidate network functionality</issue_title>
<issue_description>## Objective
Resolve the empty network.go file by either removing it or consolidating network-related functionality into it.

Context

The file pkg/workflow/network.go exists but contains no functions (0 functions). Network-related functionality is scattered across other files:

  • engine_network_hooks.go - Network hook generation
  • engine_firewall_support.go - Firewall checking

Part of issue #3435.

Approach

1. Verify network.go is truly empty

  • Check if the file contains only types/structs or is completely empty
  • Review git history to understand original intent

2. Decide on resolution strategy

Option A: Remove the file

  • If the file is completely empty and has no clear purpose
  • Remove from codebase
  • Update any imports (if any exist)

Option B: Consolidate network functionality

  • If there are network-related types or constants that should live here
  • Move appropriate network-related functionality from other files
  • Rename to clarify purpose (e.g., network_types.go if only types)

Option C: Repurpose for network utilities

  • Move network-related helper functions here
  • Create a cohesive network utilities file

3. Recommended approach

Start with Option A (removal) unless the file contains important type definitions or there's a clear need for network utilities consolidation.

Files to Modify

Remove:

  • pkg/workflow/network.go (if empty)

Update (if applicable):

  • Any files with imports to network.go
  • Update package documentation if network.go provided important context

Acceptance Criteria

AI generated by Plan Command for #3435</issue_description>

Comments on the Issue (you are @copilot in this section)

@pelikhan remove

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove or consolidate functionality in network.go Remove empty network.go file Nov 10, 2025
Copilot AI requested a review from pelikhan November 10, 2025 14:35
@pelikhan pelikhan marked this pull request as ready for review November 10, 2025 15:55
Copilot AI review requested due to automatic review settings November 10, 2025 15:55
@pelikhan pelikhan merged commit 564bfa8 into main Nov 10, 2025
6 checks passed
@pelikhan pelikhan deleted the copilot/remove-empty-network-file branch November 10, 2025 15:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors network-related code by removing the monolithic pkg/workflow/network.go file and splitting its functionality into four more focused files. The documentation is updated to reflect this new code organization.

Key Changes

  • Removed pkg/workflow/network.go as part of a code organization refactoring
  • Updated documentation to reference the four new files that now handle network-related functionality
  • Improved code organization by separating concerns into focused files (types, domain handling, hooks, firewall support)

Reviewed Changes

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

File Description
pkg/workflow/network.go Removed the monolithic network.go file as part of refactoring
.github/workflows/schema-consistency-checker.md Updated documentation to reference the four new files that replace network.go: engine.go (types), domains.go (allowlist functions), engine_network_hooks.go (hook generation), and engine_firewall_support.go (firewall checking)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants