-
Notifications
You must be signed in to change notification settings - Fork 167
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
API version for TfsRelease service should be configurable #113
Comments
It should not be configurable, cause the API could return different information in a different structure which has to be handled in the code. |
Maybe we can switch it to an older API version. So we are compatible to the on-premise TFS and VSTS. Could you try this and make a PR? |
I was just going to write the same thing. I had mentioned this before for the Tfs service as well. You can default back to whatever version you guys want to support when no version is specified, but since you're allowing to pass along any query string one could want, it does not make sense to hard code the version in my opinion. Currently only 4.0-preview is out for TFS which does not allow me to use the release part of the monitor. |
The problem is that if a newer api version is defined the response could be invalid, too. We can make it configurable, but we need to keep a default value for it. If anyone changes the api version it is not guaranteed that the service will work. |
Yes, exactly. Have a fallback for when it's not specified but allow to overwrite it. Just like you guys did for the collection in the Tfs service: Collection name. Defaults to DefaultCollection. |
@search8 what version of TFS are you running, because as far as I've been able to tell, this particular API is currently only available in VSTS. |
We are running TFS 2018 update 1. 4.0-preview works for the release api. I just verified that again. |
It only seems to work with version 4.0-preview when you add the Collection to the api path as well, even though the specification does not mention that (it also seems to be for VSTS only). https://www.visualstudio.com/en-us/docs/integrate/api/rm/definitions I got it to work like that:
Currently only the time calculations seem to be off. It tells me "finished a few seconds ago" even though it was 2 days and it says it ran for "2017 years, 2 months, 22 days, 8 hours, 39 minutes, and 58s". That should probably be an easy fix. |
As far as the dates go I think I'll have to use "lastModifiedOn" for finishedAt and "startedOn" for startedAt. All the other dates are not set for one reason or another (queuedOn) or not even available (completedOn). Not sure how compatible that will be with VSTS. Maybe I'll just push the changes to my fork instead of creating a pull request. |
If you send me a link then I can check it. I have a VSTS account. You can create one for free, too, if you want to. |
Currently the API verison for TfsRelease service is fixed in the code.
As this might change, and TFS On-Prem has a lower API version it would be nice to be able to configure it.
The text was updated successfully, but these errors were encountered: