Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow task types to be "disabled" #102477

Closed
alexr00 opened this issue Jul 14, 2020 · 2 comments
Closed

Allow task types to be "disabled" #102477

alexr00 opened this issue Jul 14, 2020 · 2 comments
Assignees
Labels
api api-finalization api-proposal feature-request Request for new features or functionality on-testplan tasks Task system issues
Milestone

Comments

@alexr00
Copy link
Member

alexr00 commented Jul 14, 2020

There are some cases where a task type is not useful. In this case, the task type shouldn't be surfaced anywhere. One way to accomplish this would be to add a when property to task definitions. We can also add three built in contexts: ShellExecutionTasksSupported, ProcessExecutionTasksSupported, and CustomExecutionTasksSupported.

@alexr00 alexr00 added this to the July 2020 milestone Jul 14, 2020
@alexr00 alexr00 self-assigned this Jul 14, 2020
@alexr00
Copy link
Member Author

alexr00 commented Jul 14, 2020

Example of the current contribution point:

    "taskDefinitions": [
      {
        "type": "typescript",
        "required": [
          "tsconfig"
        ],
        "properties": {
          "tsconfig": {
            "type": "string",
            "description": "%taskDefinition.tsconfig.description%"
          },
          "option": {
            "type": "string"
          }
        }
      }
    ],

Proposal is simply to add a when:

    "taskDefinitions": [
      {
        "type": "typescript",
        "required": [
          "tsconfig"
        ],
        "properties": {
          "tsconfig": {
            "type": "string",
            "description": "%taskDefinition.tsconfig.description%"
          },
          "option": {
            "type": "string"
          }
        },
        "when": "ShellExecutionTasksSupported"
      }
    ],

This would provide further benefits too. The typescript task provider could add a context for when there's a tsconfig file, and include that in the when.

alexr00 added a commit that referenced this issue Jul 15, 2020
@alexr00
Copy link
Member Author

alexr00 commented Jul 29, 2020

This is now finalized.

@alexr00 alexr00 closed this as completed Jul 29, 2020
@alexr00 alexr00 added the feature-request Request for new features or functionality label Aug 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization api-proposal feature-request Request for new features or functionality on-testplan tasks Task system issues
Projects
None yet
Development

No branches or pull requests

1 participant