Skip to content

visibleRule validation failing for custom extension #1023

Closed
@acheng-01

Description

@acheng-01

Environment

azure-pipelines-task-lib version: 4.4.0

Issue Description

My task.json follows the schema for visibleRule, but when uploading the .vsix into Marketplace, I keep receiving this error:
Task definition visible rule is invalid. It should be of format "A <validconditionhere> B".

Please see a portion of my task.json below. There seems to be other similar issues that weren't responded to in 90 days and went stale. Starting a new thread here. I've tried A == B, A=B as well, but nothing seems to be successful.

Expected behaviour

Successful publishing of the extension, with certain input fields hidden dependent on "auth_type".

Actual behaviour

The task builds, but publishing to Marketplace fails.

Steps to reproduce

  1. Implement "visibleRule": (some condition here for previous input variables, i.e. auth_type = msal)
  2. Build .vsix
  3. Upload packaged .vsix into Visual Studio Marketplace
  4. Receive Error

Logs

"inputs": [
    {
      "name": "profile",
      "type": "pickList",
      "label": "Upload Profile",
      "required": true,
      "defaultValue": "prod",
      "helpMarkDown": "Pick a profile configuration for your package upload. Defaults to prod.",
      "options": {
        "prod": "prod",
        "tuxdev": "tuxdev",
        "ppe": "ppe"
      }
    },
    {
      "name": "auth_type",
      "type": "pickList",
      "label": "Auth Type",
      "required": true,
      "defaultValue": "msal",
      "helpMarkDown": "Please choose the authentication type for your package upload. Defaults to msal.",
      "options": {
        "msal": "msal",
        "msi": "msi"
      }
    },
    {
      "name": "msal_SNIAuth",
      "type": "pickList",
      "label": "Subject Name Issuer Auth",
      "required": false,
      "helpMarkDown": "Please choose whether to use Subject Name Issue Auth. Leave blank if using msi.",
      "options": {
        "msal-sniauth": "True",
        "no-msal-sniauth": "False"
      },
      "visibleRule": "auth_type = msal"
    },

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