Select Azure DevOps organization associated with repository hangs
VanessaRussell opened this issue · 11 comments
Whenever I open a yml file that I've associated with the Azure Pipelines extension, I will receive this popup asking me to select the Azure DevOps organization that is associated with my repository for better IntelliSense:
Clicking on the Select organization button will open the command palette; however, nothing seems to happen no matter how long I leave it spinning. I've also tried directly typing in the name of the organization and pressing Enter; but, it had no effect. This leads me to believe that the feature is bugged.
Is this an ADO repo or a repo from some other Git provider (GitHub, etc.)?
Can you also go to the Output pane (Ctrl+Shift+U), select the "Azure Pipelines" log, and paste its contents here?
It is indeed an internal MS ADO repo.
That said, it seems something has changed in the background as I no longer get the Select Azure DevOps Organization prompt when opening an yml pipeline file. Without the prompt popping up, I don't know how to attempt to select an ADO Organization to get you the requested output logs as the option does not seem to be within the command palette.
Interesting, if you're in an ADO repo, the detection should happen silently :) (because it can figure out what organization it needs from the Git URL!).
Since you're not seeing this anymore, that's a good sign it was able to perform the schema detection properly this time. You can test this out by seeing if internal tasks have warning squigglies (bad) or descriptions on hover (good).
I don't think we can investigate this further at the moment, so I'm going to close this - but if you start seeing the prompt again, or the squigglies are showing up, we can re-open :).
Since you're not seeing this anymore, that's a good sign it was able to perform the schema detection properly this time. You can test this out by seeing if internal tasks have warning squigglies (bad) or descriptions on hover (good).
@50Wliu , clarifying question about this statement:
Are you saying that I would not be seeing these yellow squiggles if the extension had correctly determined the ADO organization? Both of these pipelines work as intended when ran as the tasks are currently available within the organization.
EDIT:
I left the first yml file open, closed VS Code, and reopened VS Code which caused the following to be outputted:
I got the popup notification again today. Nothing seems to be in the Azure Pipelines output log though:
Still same VSCode and extension versions as noted here: #538 (comment)
@VanessaRussell, we released a new version this week that should have much-improved logging; would you mind trying again? Sorry for the hassle 😅.
From the Azure Pipelines output:
(9/21/2023, 2:38:00 PM) [SchemaDetection] Detecting schema for workspace folder NotificationSystem
(9/21/2023, 2:38:06 PM) [SchemaDetection] Found remote URL for NotificationSystem: ScrubbedByVanessa
(9/21/2023, 2:38:06 PM) [SchemaDetection] NotificationSystem is an Azure repo
(9/21/2023, 2:38:07 PM) [SchemaDetection] Error auto-detecting schema for workspace folder NotificationSystem: TypeError: Cannot read properties of undefined (reading 'authenticatedUser')
(9/21/2023, 2:38:07 PM) [SchemaDetection] Using hardcoded schema for workspace folder NotificationSystem: /c:/Users/VanessaAlias/.vscode/extensions/ms-azure-devops.azure-pipelines-1.228.0/service-schema.json
(9/21/2023, 2:38:07 PM) [ExtensionActivated] Extension has been activated!
(9/21/2023, 2:38:10 PM) [SchemaDetection] Detecting schema for workspace folder NotificationSystem
(9/21/2023, 2:38:11 PM) [SchemaDetection] Found remote URL for NotificationSystem: ScrubbedByVanessa
(9/21/2023, 2:38:11 PM) [SchemaDetection] NotificationSystem is an Azure repo
(9/21/2023, 2:38:11 PM) [SchemaDetection] Error auto-detecting schema for workspace folder NotificationSystem: TypeError: Cannot read properties of undefined (reading 'authenticatedUser')
(9/21/2023, 2:38:11 PM) [SchemaDetection] Using hardcoded schema for workspace folder NotificationSystem: /c:/Users/VanessaAlias/.vscode/extensions/ms-azure-devops.azure-pipelines-1.228.0/service-schema.json
From the Azure Pipelines Language output:
getSchemaForResource
resource: file:///c%3A/Repos/NotificationSystem/.pipelines/templates/pipelines/BuildProjectTemplate.yml
this.customSchemaProvider: yes
getSchemaForResource
resource: file:///c%3A/Repos/NotificationSystem/.pipelines/templates/pipelines/BuildProjectTemplate.yml
this.customSchemaProvider: yes
loadSchema
getSchemaForResource
resource: file:///c%3A/Repos/NotificationSystem/.pipelines/templates/pipelines/BuildProjectTemplate.yml
this.customSchemaProvider: yes
loadSchema
getSchemaForResource
resource: file:///c%3A/Repos/NotificationSystem/.pipelines/templates/pipelines/BuildProjectTemplate.yml
this.customSchemaProvider: yes
loadSchema
I tried open/close VS Code a few times and didn't get the popup asking to select the ADO Repo which makes sense since the logs indicate that it is identifying it correctly.
(9/21/2023, 2:38:07 PM) [SchemaDetection] Error auto-detecting schema for workspace folder NotificationSystem: TypeError: Cannot read properties of undefined (reading 'authenticatedUser')
Woo, something to go off of! Thanks, I'll see if I can make any progress on why you're hitting an error.
On a hunch...what happens if you navigate to https://app.vssps.visualstudio.com/_apis/connectiondata in your browser? You should get a JSON blob back with - crucially - an authenticatedUser
object.
I get this JSON blob. I've removed the values to post publicly. Feel free to reach out on Teams if the values matter 🙂
{
"authenticatedUser": {
"id": "",
"descriptor": "",
"subjectDescriptor": "",
"providerDisplayName": "",
"isActive": true,
"properties": {
"Account": {
"$type": "",
"$value": ""
}
},
"resourceVersion": 0,
"metaTypeId": 0
},
"authorizedUser": {
"id": "",
"descriptor": "",
"subjectDescriptor": "",
"providerDisplayName": "",
"isActive": true,
"properties": {
"Account": {
"$type": "",
"$value": ""
}
},
"resourceVersion": 0,
"metaTypeId": 0
},
"instanceId": "",
"deploymentId": "",
"deploymentType": "",
"locationServiceData": {
"serviceOwner": "",
"defaultAccessMappingMoniker": "",
"lastChangeId": 0,
"lastChangeId64": 0
}
}
I have the same issue. I'm also able to retrieve the authenticatedUser
object.
(9/29/2023, 11:57:17 AM) [SchemaDetection] Detecting schema for workspace folder myRepo
(9/29/2023, 11:57:18 AM) [SchemaDetection] Found remote URL for myRepo: https://myADOurl/org/project/_git/myRepo
(9/29/2023, 11:57:18 AM) [SchemaDetection] myRepo has no remote URL or is not an Azure repo
(9/29/2023, 11:57:18 AM) [SchemaDetection] Prompting for organization for myRepo
(9/29/2023, 11:57:18 AM) [SchemaDetection] Using hardcoded schema for workspace folder myRepo: /c:/Users/myUser/.vscode/extensions/ms-azure-devops.azure-pipelines-1.228.0/service-schema.json
Version: 1.82.2 (user setup)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:55:25.390Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22000
Extension version v1.228.0
Same issue here, same extension version as user systobe above (v1.228.0)
VSCode version:
Version: 1.91.1 (system setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.19045