Skip to content
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

Wimortl/sql #116

Merged
merged 13 commits into from
Aug 22, 2019
Merged

Wimortl/sql #116

merged 13 commits into from
Aug 22, 2019

Conversation

WilliamMortlMicrosoft
Copy link
Contributor

What this PR does / why we need it:
sql server client

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • [ X] this PR contains tests

William Mortl and others added 9 commits August 20, 2019 11:03
* improve tests with parallel execution and rm sleep

* fix the tests to run on kindcluster
* feat: implement keyvault controller

* Ace's KV changes with updates

* Added an event for the final successful provisioning

* Updated changes based on the PR comments

* removing unwanted file

* making resource group name the one in the keyvault yaml

Co-authored-by: Ace Eldeib <alexeldeib@gmail.com>
Copy link
Contributor

@jananivMS jananivMS left a comment

Choose a reason for hiding this comment

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

Looks good. Had a few comments, main thing is to make the SDK calls async

pkg/resourcemanager/sqlclient/endtoend_test.go Outdated Show resolved Hide resolved
pkg/resourcemanager/sqlclient/sqlclient_godsk.go Outdated Show resolved Hide resolved
pkg/resourcemanager/sqlclient/sqlclient_godsk.go Outdated Show resolved Hide resolved
@WilliamMortlMicrosoft
Copy link
Contributor Author

New test output:

Williams-MBP:sqlclient wmortl$ go test
2019/08/21 15:50:21 creating resource group 'azure-samples-go-SQLCreateDeleteTest-S9Tsa' on location: eastus2
2019/08/21 15:50:27 sql server created
sql server created
2019/08/21 15:50:29 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:30 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:32 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:33 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:35 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:36 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:37 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:39 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:40 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:41 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:42 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:44 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:45 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:47 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:48 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:50 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:51 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:52 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:54 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:55 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:56 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:50:58 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:51:00 waiting for sql server to be ready...
waiting for sql server to be ready...
2019/08/21 15:51:01 sql server ready
sql server ready
2019/08/21 15:51:03 db created
db created
2019/08/21 15:51:36 db deleted
db deleted
2019/08/21 15:51:36 sql server deleted
sql server deleted
2019/08/21 15:51:36 deleting resources
PASS
ok github.com/Azure/azure-service-operator/pkg/resourcemanager/sqlclient 80.602s

@WilliamMortlMicrosoft
Copy link
Contributor Author

@frodopwns I fixed the small stuff

@jananivMS all async changes are in

@frodopwns frodopwns changed the base branch from master to azure-sql August 22, 2019 16:19
Copy link
Contributor

@frodopwns frodopwns left a comment

Choose a reason for hiding this comment

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

let's merge this and address any other issues with a new pr

Copy link
Contributor

@jananivMS jananivMS left a comment

Choose a reason for hiding this comment

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

LGTM

return false, fmt.Errorf("cannot create sql server: %v", err)
}

return true, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Will, I am going to approve this for now, but we should discuss about if we should change this to return the result (gotten from future.Result) which would confirm that the async operation is in progress.

@WilliamMortlMicrosoft WilliamMortlMicrosoft merged commit 11217bb into Azure:azure-sql Aug 22, 2019
API Management automation moved this from In Review to Done Aug 22, 2019
Porges added a commit that referenced this pull request May 11, 2021
The support for signal handling was already hooked up but we didn’t check for cancellation anywhere.

With this change we check for cancellation:

* During JSON Schema loading: for each HTTP request or file open.
* While cleaning the output directory: once per file or directory to be cleaned, also while walking the tree.
* While converting the JSON AST: once per handler.
* While emitting the output files: once per package.

The JSON Schema library doesn’t support cancellation so this is implemented there by supplying a filesystem implementation that supports cancellation; there is no way to supply an implementation for the HTTP requests so instead we add cancellation to the global HTTP transport (in `gen.go`). We should try and push a change upstream to either add cancellation overall or allow overriding the HTTP client/transport.

Fixes #116.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants