Skip to content

Conversation

@jpayne3506
Copy link
Contributor

@jpayne3506 jpayne3506 commented Jul 10, 2025

Reason for Change:

We only need to run code coverage on PR(s) merging to master as release/* branches are frozen to feature development and would only see a fix if it has already been merged to master as well.

Issue Fixed:

Requirements:

Notes:

Copilot AI review requested due to automatic review settings July 10, 2025 16:16
@jpayne3506 jpayne3506 requested a review from a team as a code owner July 10, 2025 16:16
@jpayne3506 jpayne3506 requested a review from aggarwal0009 July 10, 2025 16:16
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 aims to control code coverage publication based on the PR’s target branch and surface that branch in the pipeline logs.

  • Introduces a commented-out condition to skip coverage reporting for non-master PRs.
  • Adds an echo of the PR target branch name to pipeline output for debugging.

Reviewed Changes

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

File Description
.pipelines/templates/run-unit-tests.yaml Added a commented-out branch check above coverage task
.pipelines/pipeline.yaml Echoes the PR’s targetBranchName in the environment stage
Comments suppressed due to low confidence (2)

.pipelines/templates/run-unit-tests.yaml:98

  • Remove or clarify this commented-out condition. If you intend to gate coverage reports by branch, uncomment, test, and document the logic, or delete the placeholder to avoid confusion.
 # - ${{ if not(contains(variables['System.PullRequest.targetBranchName'], 'master')) }}: 

.pipelines/pipeline.yaml:56

  • [nitpick] If this echo is only for debugging, add a comment explaining its use or remove it before merging to keep pipeline logs focused.
 echo $(System.PullRequest.targetBranchName) 
@jpayne3506 jpayne3506 force-pushed the jpayne3506/code-block branch 2 times, most recently from 04d585c to 7ffa102 Compare July 10, 2025 16:30
@jpayne3506 jpayne3506 force-pushed the jpayne3506/code-block branch from 7ffa102 to 0d11a2f Compare July 10, 2025 16:33
@jpayne3506 jpayne3506 self-assigned this Jul 10, 2025
@jpayne3506 jpayne3506 added fix Fixes something. ci Infra or tooling. release/latest Change affects latest release train needs-backport Change needs to be backported to previous release trains release/1.6 Change affects 1.6 release train labels Jul 10, 2025
@rbtr
Copy link
Collaborator

rbtr commented Jul 10, 2025

in other words, i only care about code coverage before a change has merged. if it's merged and we're releasing, coverage is not relevant.

@jpayne3506 jpayne3506 enabled auto-merge July 10, 2025 16:45
@jpayne3506
Copy link
Contributor Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).
@rbtr rbtr changed the title ci: only check for code coverage ci: only check for code coverage at merge, not release Jul 10, 2025
@jpayne3506 jpayne3506 added this pull request to the merge queue Jul 10, 2025
rbtr pushed a commit that referenced this pull request Jul 10, 2025
Merged via the queue into master with commit 4eca0c2 Jul 10, 2025
14 of 15 checks passed
@jpayne3506 jpayne3506 deleted the jpayne3506/code-block branch July 10, 2025 23:33
NihaNallappagari pushed a commit to NihaNallappagari/azure-container-networking that referenced this pull request Sep 4, 2025
sivakami-projects pushed a commit that referenced this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Infra or tooling. fix Fixes something. needs-backport Change needs to be backported to previous release trains release/latest Change affects latest release train release/1.6 Change affects 1.6 release train

3 participants