Skip to content

Conversation

@sivakami-projects
Copy link
Contributor

@sivakami-projects sivakami-projects commented Nov 10, 2025

Reason for Change:

Added a new stage to the long running cluster to create and delete pn, pni and pod objects repeatedly.
Long running test cluster pipeline

Requirements:

Notes:

@sivakami-projects sivakami-projects marked this pull request as ready for review November 10, 2025 22:36
@sivakami-projects sivakami-projects requested a review from a team as a code owner November 10, 2025 22:36
Copilot finished reviewing on behalf of sivakami-projects November 10, 2025 22:38
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 adds a new long-running test stage to the SwiftV2 pipeline that repeatedly creates and deletes PodNetwork (pn), PodNetworkInstance (pni), and Pod objects to test the datapath over extended periods.

Key changes:

  • New Ginkgo test suite that runs indefinitely, cycling through resource creation and deletion every 35 minutes
  • Helper functions for Azure resource queries and Kubernetes operations
  • Pipeline configuration updates to run the new test stage with unlimited timeout
  • Refactored VNet creation scripts to use loops and dynamic cluster naming

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/integration/swiftv2/longRunningCluster/datapath_test.go New test suite for long-running datapath tests with resource lifecycle management
test/integration/swiftv2/longRunningCluster/datapath.go Helper functions to create Kubernetes resources from templates
test/integration/swiftv2/helpers/az_helpers.go New helper functions for Azure CLI operations and Kubernetes resource management
test/integration/manifests/swiftv2/long-running-cluster/*.yaml Kubernetes resource templates for PodNetwork, PodNetworkInstance, and Pods
hack/aks/Makefile New targets for delegated subnet creation and dummy cluster provisioning
go.mod & go.sum Updated Go version and dependencies, removed version pinning for Ginkgo/Gomega
.pipelines/swiftv2-long-running/template/long-running-pipeline-template.yaml New test stage with unlimited timeout
.pipelines/swiftv2-long-running/scripts/create_vnets.sh Refactored to use loops and create delegation clusters dynamically
.pipelines/swiftv2-long-running/scripts/create_aks.sh Added kubeconfig export for test consumption
.pipelines/swiftv2-long-running/pipeline.yaml Updated default VM size

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

Comment on lines 45 to 46
for {
iteration++
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The infinite loop lacks any graceful termination mechanism or error handling for catastrophic failures. If the test encounters repeated failures, it will continue indefinitely. Consider adding a context with cancellation or a maximum iteration count to allow controlled shutdown.

Copilot uses AI. Check for mistakes.
- Implemented scheduled pipeline running every 1 hour with persistent infrastructure
- Split test execution into 2 jobs: Create (with 20min wait) and Delete
- Added 8 test scenarios across 2 AKS clusters, 4 VNets, different subnets
- Implemented two-phase deletion strategy to prevent PNI ReservationInUse errors
- Added context timeouts on kubectl commands with force delete fallbacks
- Resource naming uses RG name as BUILD_ID for uniqueness across parallel setups
- Added SkipAutoDeleteTill tags to prevent automatic resource cleanup
- Conditional setup stages controlled by runSetupStages parameter
- Auto-generate RG name from location or allow custom names for parallel setups
- Added comprehensive README with setup instructions and troubleshooting
- Node selection by agentpool labels with usage tracking to prevent conflicts
- Kubernetes naming compliance (RFC 1123) for all resources
@sivakami-projects sivakami-projects force-pushed the sv2-long-running-pipeline branch from e690c0f to b07b697 Compare November 22, 2025 23:53
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