Conversation
97eaa3e to
2738558
Compare
2738558 to
49376fb
Compare
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR adds a git-diff–based gating mechanism to the Azure DevOps pipeline so that expensive E2E stages (Cilium and Windows) can be skipped when changes are limited to specific areas of the repo.
Changes:
- Added a script to determine whether Windows and/or Cilium E2Es should run based on files changed vs the target branch.
- Added a pipeline template step that runs the script and exports
RunWindowsTests/RunCiliumTestsas output variables. - Updated multiple E2E stage templates and the main pipeline to conditionally run (and delete) clusters based on those outputs.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
hack/scripts/check-changed-files.sh |
Computes changed files vs merge-base and emits RUN_WINDOWS_TESTS / RUN_CILIUM_TESTS. |
.pipelines/templates/git-diff-check.yaml |
Runs the diff check script and sets ADO output variables for downstream stage conditions. |
.pipelines/pipeline.yaml |
Wires in the diff-check step and splits delete stages to align with conditional execution. |
.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml |
Gates Cilium cluster creation + E2E stages on RunCiliumTests. |
.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml |
Gates Cilium overlay E2Es on RunCiliumTests. |
.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml |
Gates Cilium overlay-with-hubble E2Es on RunCiliumTests. |
.pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e2e-job-template.yaml |
Gates Cilium nodesubnet E2Es on RunCiliumTests. |
.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-job-template.yaml |
Gates Cilium dualstack overlay E2Es on RunCiliumTests. |
.pipelines/singletenancy/aks/e2e-job-template.yaml |
Gates Windows AKS cluster creation on RunWindowsTests. |
.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml |
Gates Windows dualstack overlay cluster creation on RunWindowsTests. |
.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml |
Adds Windows gating for Azure overlay cluster creation (currently inverted in the diff). |
.pipelines/singletenancy/azure-cni-overlay-stateless/azure-cni-overlay-stateless-e2e-job-template.yaml |
Gates stateless Windows overlay cluster creation on RunWindowsTests. |
.pipelines/singletenancy/aks-swift/e2e-job-template.yaml |
Moves the tag-match condition to the stage level for AKS Swift E2Es. |
Comments suppressed due to low confidence (2)
.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml:40
- This condition gates only the cluster creation stage on
RunWindowsTests, but the downstream E2E stage has no corresponding condition and may still run if the create stage is skipped. Add the sameRunWindowsTestsgate to the E2E stage (or explicitly check the dependency stage result) to avoid running E2Es without a created cluster.
- stage: ${{ parameters.clusterName }}
displayName: ${{ parameters.displayName }} - Create Cluster
condition: or(
eq('${{ parameters.os }}', 'linux'),
and(eq('${{ parameters.os }}', 'windows'), eq(dependencies.setup.outputs['env.GitDiffCheck.RunWindowsTests'], 'true'))
)
dependsOn:
- ${{ parameters.dependsOn }}
- setup
pool:
.pipelines/singletenancy/azure-cni-overlay-stateless/azure-cni-overlay-stateless-e2e-job-template.yaml:31
RunWindowsTestsgating is applied to the create-cluster stage, but the E2E stage that depends on it has no corresponding condition and may still run when the create stage is skipped. Add the same gate to the E2E stage (or explicitly check dependency stage result) to avoid running E2Es without a created cluster.
- stage: ${{ parameters.clusterName }}
displayName: ${{ parameters.displayName }} - Create Cluster
condition: eq(dependencies.setup.outputs['env.GitDiffCheck.RunWindowsTests'], 'true')
dependsOn:
- ${{ parameters.dependsOn }}
- setup
pool:
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
dc46a5e to
582e532
Compare
582e532 to
6c7050c
Compare
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jpayne3506
left a comment
There was a problem hiding this comment.
Talked to @QxBytes offline. We could have leveraged path filters + multiple pipelines to get the same result, but didn't want to deal with image generation and additional dependencies.
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Reason for Change:
Does not run cilium e2es if we only modify
cni/ipam/ornetwork/Does not run windows e2es if we only modify
linuxortestfiles (still runs windows e2es)Issue Fixed:
Requirements:
Notes:
If this is triggered in the merge queue, the PR is not classified as Pull Request and might not have target branch set, in which case it might diff against master instead of the branch it will merge into. I have made a change to detect the source branch if it is in the merge queue and extract the target branch that way, but even if it doesn't detect that it just means we might run more tests than necessary. If there are no files changed, should run all tests. If branch is refs/tag (tagged run) we also run all tests.