Open Az8th opened 7 months ago
@Az8th is the URL you are trying to input an on-prem url, or is it one of the *.visualstudio.com or dev.azure.com? Hosted urls are processed differently from non-hosted.
I'm assuming this an on-prem server, and if so the URL has ambiguity.
If this is the actual URL, meaning it an on-prem server, here's the issue: https://azdo.example.com/azdo/collection/project/_git/repository.
The root issue is that it is assuming the 'azdo' after the hostname is a project name or a collection name, not part of the organization connection URL, and as such we assume that it is an invalid format because there's too many segments ('azdo', 'collection', and 'project'). Since the hostname is not azure.com or visualstudio.com we can probably assume > 3 segments before the '_git' segment means the 'azdo' segment is part of the organization name and connection.
The problem comes in when 'collection' is omitted because it's optional, then we have an ambiguous situation: 'azdo/project/_git' could mean that 'azdo' is the collection name, or it could be part of the organization. I can fix the 3-segment situation you have provided, and assume in such a configuration that '/azdo' is part of the organization URL. I could do that and assume 'collection' is always present since it usually is, but we would then likely have a bug when collection is omitted. I suspect collection omissions in on-prem are rare, however, and in other parts of the url processing we assume it is there. So I can fix this by assuming collection is alwasy there, in which case an on-prem URL that has > 2 segments we assume everything before the collection/project/_git part is part of the organization/connection name.
Sorry, I left my reply unposted :/ I confirm that it is an on-prem URL.
Your solution seems good to me, I would add that knowing the URL type would remove the possibility of a misleading when the collection argument is not provided. It is possible to check if a project URL is valid thanks to the API, but I would rather suggest to add an "OnPrem" checkbox to the widget settings
Hello, is there any update or way we can help about this issue ?
Dev Home version
0.1201.442.0
Dev Home Azure Extension version
0.700.442.0
Windows build number
22621.3447
Other software
Azure DevOps Server 2022.1 (20231128.1)
Steps to reproduce the bug
Click on save
Expected result
Plugins should work properly and accept the URL
Actual result
The specified URL is not a repository URL.
orThe specified URL is not a query URL.
errors are raised.Included System Information
Thanks for adding Azure DevOps Server support !
Unfortunately, it seems that the URL input handling is too sensitive, as if anything is put between the third
/
andcollection
, it is considered an unvalid url, despite being otherwise.As any URL shoud be customizable (outside of the Azure DevOps API), I suggest to match this in the widget implementation.
Have a nice day !