Skip to content

Installing extension on Azure DevOps Server fails with error message on Azure DevOps Server 2019 #1109

@kiranblackduck

Description

@kiranblackduck

When uploading our extension to Azure DevOps Server 2019, we encounter an error stating: "Task definition input 'scanType' and Task definition input 'product1ApplicationName' must belong to the same group as they are dependent inputs for Task with ID."

Our requirement is to place the product1ApplicationName input in the productScanOptions group instead of the scanConfiguration group. This error occurs only in Azure DevOps Server 2019, not in Azure DevOps Services.Upon investigation, removing the visibleRule: "scanType = product1" from the product1ApplicationName input allows the extension to upload successfully to the Server marketplace.

However, when switching between scanType options (e.g., product2 ) in the classic editor, the product1ApplicationName value persists in the YAML output (visible via "View YAML"), requiring it to be reset manually to an empty value which is happening in the azure services with we add visiblerule at input level.

{ "$schema": "https://raw.githubusercontent.com/Microsoft/azure-pipelines-task-lib/master/tasks.schema.json", "id": "uuid", "name": "Demo", "friendlyName": "", "description": "", "helpMarkDown": "", "category": "Utility", "author": "", "version": { "Major": 2, "Minor": 1, "Patch": 0 }, "instanceNameFormat": "Demo", "groups": [ { "name": "scanConfiguration", "displayName": "Scan Configuration", "isExpanded": true }, { "name": "productScanOptions", "displayName": "Scan Options", "isExpanded": false, "visibleRule": "scanType = product1" } { "name": "product2ScanOptions", "displayName": "Scan Options", "isExpanded": false, "visibleRule": "scanType = product1" } ], "inputs": [ { "name": "scanType", "type": "pickList", "label": "Product", "required": true, "helpMarkDown": "Select Required Product", "defaultValue": "", "options": { "": "Select", "product1": "product1", "product2": "product2" }, "groupName": "scanConfiguration" }, { "name": "product1ApplicationName", "type": "string", "label": "product1 Application", "defaultValue": "", "required": false, "helpMarkDown": "Application name in product1 Server. If not provided, Azure repository name will be set as default value.", "visibleRule": "scanType = product1", "groupName": "productScanOptions" }, { "name": "product2ApplicationName", "type": "string", "label": "product2 Application", "defaultValue": "", "required": false, "helpMarkDown": "Application name in product2 Server. If not provided, Azure repository name will be set as default value.", "visibleRule": "scanType = product2", "groupName": "product2ScanOptions" } ] }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions