Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Adding Text Analytics module (Cognitive Services) #557

Merged
merged 13 commits into from
Sep 28, 2018
Merged

Adding Text Analytics module (Cognitive Services) #557

merged 13 commits into from
Sep 28, 2018

Conversation

neilpeterson
Copy link
Member

@krancour coming back around to this. This PR adds the Cognitive Services Text Analytics API to OSBA. I had initially submitted a related PR many months back, however that was delayed due to an ongoing refactor of the broker.

Here is the initial PR - #463

I've refactored to align with the current state of the broker.

One recommendation in the initial PR was to shrink this down into a single plan and specify the tier with a provisioning parameter. I am cool with this, but have not done so yet. One of plan properties is Free. Text Analytics has a free tier, and then several others. If using a single plan however would you suggest I use the Free property.

Thanks a bunch for checking this out.

Tests

Here are the results of make test-service-lifecycles:

2018/08/23 23:44:52 ----> creating resource group "test-6652437c-e49b-47f3-943d-b6eaafe0e640"
2018/08/23 23:44:55 ----> created resource group "test-6652437c-e49b-47f3-943d-b6eaafe0e640"
=== RUN   TestServices
2018/08/23 23:44:55 ----> testing in resource group "test-6652437c-e49b-47f3-943d-b6eaafe0e640"
2018/08/23 23:44:55 Running tests for modules: [textanalytics]
=== RUN   TestServices/lifecycle
=== RUN   TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-free
=== PAUSE TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-free
=== RUN   TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s0
=== PAUSE TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s0
=== RUN   TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s1
=== PAUSE TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s1
=== RUN   TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s2
=== PAUSE TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s2
=== RUN   TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s3
=== PAUSE TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s3
=== RUN   TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s4
=== PAUSE TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s4
=== CONT  TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-free
2018/08/23 23:44:55 ----> TestServices/lifecycle/textanalytics/text-analytics-free: starting
=== CONT  TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s4
2018/08/23 23:44:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s4: starting
=== CONT  TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s3
2018/08/23 23:44:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s3: starting
=== CONT  TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s2
2018/08/23 23:44:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s2: starting
=== CONT  TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s1
2018/08/23 23:44:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s1: starting
=== CONT  TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s0
2018/08/23 23:44:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s0: starting
2018/08/23 23:45:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s3: in progress
2018/08/23 23:45:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s4: in progress
2018/08/23 23:45:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s1: in progress
2018/08/23 23:45:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s2: in progress
2018/08/23 23:45:55 ----> TestServices/lifecycle/textanalytics/text-analytics-free: in progress
2018/08/23 23:45:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s0: in progress
2018/08/23 23:46:31 ----> TestServices/lifecycle/textanalytics/text-analytics-s1: completed
2018/08/23 23:46:32 ----> TestServices/lifecycle/textanalytics/text-analytics-free: completed
2018/08/23 23:46:32 ----> TestServices/lifecycle/textanalytics/text-analytics-s0: completed
2018/08/23 23:46:33 ----> TestServices/lifecycle/textanalytics/text-analytics-s3: completed
2018/08/23 23:46:46 ----> TestServices/lifecycle/textanalytics/text-analytics-s4: completed
2018/08/23 23:46:55 ----> TestServices/lifecycle/textanalytics/text-analytics-s2: in progress
2018/08/23 23:47:14 ----> TestServices/lifecycle/textanalytics/text-analytics-s2: completed
--- PASS: TestServices (139.27s)
    --- PASS: TestServices/lifecycle (0.00s)
        --- PASS: TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s1 (96.44s)
        --- PASS: TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-free (96.87s)
        --- PASS: TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s0 (97.35s)
        --- PASS: TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s3 (98.58s)
        --- PASS: TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s4 (111.62s)
        --- PASS: TestServices/lifecycle/TestServices/lifecycle/textanalytics/text-analytics-s2 (139.26s)
PASS
2018/08/23 23:47:14 ----> deleting resource group "test-6652437c-e49b-47f3-943d-b6eaafe0e640"
2018/08/23 23:47:16 ----> deleted resource group "test-6652437c-e49b-47f3-943d-b6eaafe0e640"
ok      github.com/Azure/open-service-broker-azure/tests/lifecycle      143.266s

@jeremyrickard
Copy link
Contributor

jeremyrickard commented Sep 18, 2018

@neilpeterson I've gone through this and I like the addition, thanks!

While running CI, it seems there is an issue w/ the vendored code. Could you ensure that the dep config/vendor is updated? make verify-vendored-code will help verify that

@neilpeterson
Copy link
Member Author

@jeremyrickard - thanks. I've run make dep which seems to have cleared up the issue.

I'm not super familiar with package management in Go, if I've done something incorrect here, I apologize :). If so, can you provide a pointer?

Thanks

Description: "The (new or existing) resource group with which" +
" to associate new resources.",
},
"name": &service.StringPropertySchema{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make parameter name user-specified? In other modules, the name of the server, database, and so on, is generated randomly and is not configurable for users. I'm not familiar with textanalytics, please tell me if there is any special concern to do this. If not, could you make name randomly generated just like other modules?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this @norshtein . The parameter was actually unused and has been removed.

@neilpeterson
Copy link
Member Author

@jeremyrickard @norshtein @zhongyi-zhang I've address all noted issues. If you need me to do anything else, please let me know.

Thanks

zhongyi-zhang
zhongyi-zhang previously approved these changes Sep 24, 2018
Copy link
Contributor

@zhongyi-zhang zhongyi-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

norshtein
norshtein previously approved these changes Sep 25, 2018
Copy link
Member

@norshtein norshtein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@norshtein
Copy link
Member

Since new merged PR has modified the Gopkg.lock, I'm afraid you have to run make dep again to solve the vendored code issue, sorry for inconvenience. Also, please have a look on lint issue, thanks!

@neilpeterson
Copy link
Member Author

Thanks @norshtein - I've run make dep and have also fixed up the lint issues.

@zhongyi-zhang zhongyi-zhang merged commit 9597a22 into Azure:master Sep 28, 2018
@zhongyi-zhang
Copy link
Contributor

@neilpeterson thanks for the contribution! This service is a good first experimental service of that a bunch of Cognitive Services in OSBA.

@neilpeterson
Copy link
Member Author

@zhongyi-zhang - thanks a bunch for your help on this one.

@neilpeterson neilpeterson deleted the rename-module-to-text-analytics branch September 28, 2018 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants