microsoft / microsoft/azure-devops-extension-sdk
Custom picklist values in Pipeline Task
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 159
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have created an extension that adds an Azure Pipelines Task. The inputs for the task contain a picklist and it's being populated by using sourceDefinitions. This has always worked fine but roughly around August 2022 it has stopped working.
The definition of the task looks like this:
"inputs": [
{
"name": "workItemType",
"type": "picklist",
"label": "WorkItem Type",
"defaultValue": "",
"required": true,
"helpMarkDown": "The type of workitems to update, e.g. User Story, Task or Bug. You can use a comma-separated string to supply multiple values."
}
],
"sourceDefinitions": [
{
"target": "workItemType",
"endpoint": "/$(system.teamProject)/_apis/wit/workItemTypes?api-version=1.0",
"selector": "jsonpath:$.value[*].name",
"authKey": "tfs:teamfoundation"
}
]
If I try to populate the dropdown in the UI, it will execute a request to https://bluebasher-sandbox.visualstudio.com/_apis/distributedtask/endpoint
With the following payload:
{
"url": "/TestWiki/_apis/wit/workItemTypes?api-version=1.0",
"selector": "jsonpath:$.value[*].name",
"connectionId": "tfs:00025394-6065-48CA-87D9-7F5672854EF7",
"scope": "f9bd23c4-e6b5-4e71-96c7-d4daa63f7943",
"taskId": "7164116a-ed17-48be-9c53-b440b2b1dd2e",
"keySelector": ""
}
And it returns this error:
{
"$id": "1",
"innerException": null,
"message": "No service connection found with identifier tfs:00025394-6065-48CA-87D9-7F5672854EF7.",
"typeName": "Microsoft.TeamFoundation.DistributedTask.WebApi.EndpointNotFoundException, Microsoft.TeamFoundation.DistributedTask.WebApi",
"typeKey": "EndpointNotFoundException",
"errorCode": 0,
"eventide": 3000
}
So it seems to me that somewhere the authkey tfs:teamfoundation is being replaced by an actual (internal?) Service Connection, which does not exists anymore?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Pipeline Task picklist request using the shown sourceDefinitions payload and trace how authKey "tfs:teamfoundation" becomes the connectionId sent to the endpoint. Done means the work item type values populate without the EndpointNotFoundException; the issue names no repository files or tests to start from.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100