Description
VS Code shows a false validation error for a valid Azure Pipelines task in azure-pipelines.yml.
The pipeline runs successfully in Azure DevOps, but in the editor I get errors like:
PublishCodeCoverageResults is deprecated
String does not match the pattern of "^PublishCodeCoverageResults@1$"
The task in the YAML is:
- task: PublishCodeCoverageResults@2
condition: and(always(), eq(variables.conditionRulePR, true))
inputs:
summaryFileLocation: '$(Agent.TempDirectory)/changed_only_report/Cobertura.xml'
pathToSources: '$(buildContextDirectory)'
failIfCoverageEmpty: false
Why this looks wrong
The tooltip/schema info shows PublishCodeCoverageResults@2 as an allowed value, but validation still reports that the task must match ^PublishCodeCoverageResults@1$.
So the schema/validation appears to be internally inconsistent.
Environment
• VS Code: latest
• Red Hat YAML extension installed
• Azure Pipelines extension was uninstalled, but the issue still reproduces
• File language mode: YAML
• The current file is still associated with Azure Pipelines YAML pipelines definition
Minimal repro:
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: 'coverage.xml'
pathToSources: '.'
failIfCoverageEmpty: false
Expected behavior
PublishCodeCoverageResults@2 should not be marked as deprecated or invalid.
Actual behavior
The editor highlights valid YAML in red and reports a false validation error.
Description
VS Code shows a false validation error for a valid Azure Pipelines task in
azure-pipelines.yml.The pipeline runs successfully in Azure DevOps, but in the editor I get errors like:
PublishCodeCoverageResults is deprecatedString does not match the pattern of "^PublishCodeCoverageResults@1$"The task in the YAML is:
Why this looks wrong
The tooltip/schema info shows PublishCodeCoverageResults@2 as an allowed value, but validation still reports that the task must match ^PublishCodeCoverageResults@1$.
So the schema/validation appears to be internally inconsistent.
Environment
• VS Code: latest
• Red Hat YAML extension installed
• Azure Pipelines extension was uninstalled, but the issue still reproduces
• File language mode: YAML
• The current file is still associated with Azure Pipelines YAML pipelines definition
Minimal repro:
Expected behavior
PublishCodeCoverageResults@2 should not be marked as deprecated or invalid.
Actual behavior
The editor highlights valid YAML in red and reports a false validation error.