hanneswidrig/azure-devops-pull-request-center

API To new for Azure Devops Server 2019

Closed this issue · 7 comments

Hello Hannes, thank you for enabling on premisis installations! Unfortunately it seems that theAzure API used by your plugin is fairly recent and not supported by our server (on Premisis is apparently always lagging behind the cloud). I am not an Admin, but at out company we use Azure Devops "Dev17.M153.5" which I believe to be the 2019 Server. Eitherway after your Plugin was installed It signals an error and the response comes back with the following. Although I am not an expert, do you think you could easily downgrade this (my hope would be that changing the version of the azure dev library that you use would be enough.

{$id: "1", innerException: null,…}
$id: "1"
errorCode: 0
eventId: 3000
innerException: null
message: "The requested REST API version of 5.2 is out of range for this server. The latest REST API version this server supports is 5.1."
typeKey: "VssVersionOutOfRangeException"
typeName: "Microsoft.VisualStudio.Services.WebApi.VssVersionOutOfRangeException, Microsoft.VisualStudio.Services.WebApi"

You're right. Microsoft's documentation is terrible for extensions. I set demands to api-version/3.0, its actually api-version/5.2 at runtime.

5.1 should now be used instead, please verify it now works as of 1.2.8.

Hello,
I am unfamiliar with node and buildtools for javascript. However, I am afraid it is not quite working yet.

I noticed that I got the same error message as above and the debugger showed me that the file https://tfs-staging.mycompany.com/_apis/public/gallery/publisher/hannes-widrig/extension/pull-request-center/1.2.8/assetbyname/build/static/node_modules/azure-devops-extension-api/Git/GitClient.js contains the following code on line 3108:

                    return [2 /*return*/, this.beginRequest({
                            apiVersion: "5.2-preview.1",

From googling I found this: https://github.com/microsoft/azure-devops-node-api the readme implies the following

TFS Version Node API VERSION
Azure DevOps Server vNext 8.0.0
Azure DevOps Server 2019 7.0.0

However, this is not their extension API,.... not sure why there are different APIs,...

Digging through the revisions for the extension APIs I found that relase 1.153.2 is littered with apiVersion: "5.1-preview.1" (https://github.com/microsoft/azure-devops-extension-api/blob/5d41b8510424bd9086bc3f3c52ff922716ddeb6f/src/Git/GitClient.ts#L3108)

This means that for some reason the Plugin does not contain the API Version that is specified? I tried clearing my browser cache to no avail, and pointing it directly at the GitClient.ts I get an odd exception:

{"$id":"1","innerException":null,"message":"The extension 'hannes-widrig.pull-request-center' doesn't contain the requested asset type 'build/static/node_modules/azure-devops-extension-api/Git/GitClient.js' in version '1.2.8'.","typeName":"Microsoft.VisualStudio.Services.Gallery.WebApi.ExtensionAssetNotFoundException, Microsoft.VisualStudio.Services.Gallery.WebApi","typeKey":"ExtensionAssetNotFoundException","errorCode":0,"eventId":3000}

Is there any more meaningfull input I can gather? I also tried with an InternetExplorer but that did not work (neither with yours nor with a installed Plugin working in ohter Browsers, go figure Microsoft...), and with firefox which I have not used in a while.

Is there a way to run Azure DevOps Server locally? I will explore, it might be a build / caching issue that contributed to 5.2 still being referenced.

Edit: Looks like I forgot to regenerate a yarn.lock file, will attempt again and push 1.2.9.

Fingers crossed it actually references 1.153.2 now in 1.2.9.

Is there a way to run Azure DevOps Server locally?

I am afraid it is costly (https://azure.microsoft.com/en-us/pricing/details/devops/server/), I do not know the details, as I am an employee that is using it for development (I do not work in the IT-Infrastructure-Department). Not sure if that is what your question aimed at.

I will explore, it might be a build / caching issue that contributed to 5.2 still being referenced.

Edit: Looks like I forgot to regenerate a yarn.lock file, will attempt again and push 1.2.9.

I requested an update and will get back to you as soon as it is installed and tested. (Now with the company's IT-Infrastructure department)

Hello Hannes,
thanks for your help with this, it did the trick, The tabs now load in Azure DevOps Server2019.
Thank you, for your support