Add DeploymentGroup to runsOn in task.json #21366
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have got one ticket from the customer for PublishCodeCoverageResult task issue. Incident-656029979 Details - IcM
Repro steps:
The issue can be reproduced with the following steps.
Start creating a classic build pipeline.
Add "Publish Code Coverage Results" task.
Right click of the task and select [Create task group]. Then, specify [Name] and then click [Create] button to save.
Go to [Trask groups] page and select the saved task group.
Add "Publish Test Results" task.
Change the version of "Publish Code Coverage Results" task to 1.
Click [Save] button.
Go to [Trask groups] page and select the saved task group.
Change the version of "Publish Code Coverage Results" task to 2.
Click [Save] button. ---> The error occurs.
'Meta task ' RunsOn value: 'Agent, DeploymentGroup', doesn't match with child task 'PublishCodeCoverageResults' RunsOn value: 'Agent'. Provide valid value and try again.'
I think the problem is here.
azure-pipelines-tasks/Tasks/PublishCodeCoverageResultsV2/task.json at master · microsoft/azure-pipelines-tasks
"runsOn": [
"Agent"
],
It does not have DeploymentGroups runs on option as other tasks (even the V1 of this task has this).
Context
Describe the context or motivation for this PR. Include links to any related Azure DevOps Work Items or GitHub issues.
📌 How to link to ADO Work Items
Task Name
PublishCodeCoverageResultsV2
Description
The incident involved a failure when saving task groups that include the PublishCodeCoverageResults task due to an incorrect 'RunsOn' value. Specifically, the meta task's 'RunsOn' value included 'Agent, DeploymentGroup', which did not match the child task's 'RunsOn' value of 'Agent', causing persistent errors until the problematic task was removed and re-added. This issue was identified as a new bug and tracked under Bug 2299479.
Saving task groups fails with an error indicating a mismatch in the 'RunsOn' value between the meta task and the PublishCodeCoverageResults child task.
The root cause was identified as a new bug where the 'RunsOn' value of the meta task did not correctly align with the child PublishCodeCoverageResults task, leading to save failures in task groups.
Risk Assessment (Low / Medium / High)
Low
Change Behind Feature Flag (Yes / No)
No
Checklist