-
Notifications
You must be signed in to change notification settings - Fork 206
Support CF visual recognition instances #391
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
Support CF visual recognition instances #391
Conversation
… default to the non-iam visual recognition url
| { | ||
| ApiKey = apiKey; | ||
| Url = url; | ||
| Url = !string.IsNullOrEmpty(url) ? url : "https://gateway-a.watsonplatform.net/visual-recognition/api"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's obvious, but why are we setting to https://gateway-a.watsonplatform.net/visual-recognition/api? How are we making sure that iam user will not end here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set the gateway-a endpoint here If they authenticate with the old apikey. I guess we can try to stop IAM users from putting their iam apikey here. What do you think? Maybe check the length of the apikey and error if it is not the correct length? We have documentation to authenticate using IAM as well but I am open to suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we are, but we don't always use the url and use the default urls. We want to make sure that if they authenticate with apikey that the url goes to gateway-a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but yes if you use the url provided in the credentials it should work either way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great. i am approving
|
Hey @mamoonraja can you review this one more time? I had to add more commits to this. I revised the description. |

Summary
This pull request removes apikey specific checks in the Visual Recognition abstraction. We set the endpoint of the visual recognition service if the user authenticates using apikey. Additionally, the default iamurl was revised to use the non region specific url. Finally, I added duplicated tests to run on CF and RC instances in Assistant and Visual Recognition. I commented out classifier creation and deletion in Visual Recognition because we are having issues with "ghost" classifiers. All tests pass locally.