-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
PrivateEndpoint & PrivateLinkService APIs update #6332
PrivateEndpoint & PrivateLinkService APIs update #6332
Conversation
Automation for azure-sdk-for-javaA PR has been created for you: |
Automation for azure-sdk-for-pythonEncountered a Subprocess error: (azure-sdk-for-python)
Command: ['/usr/local/bin/autorest', '/tmp/tmp6oded9o3/rest/specification/network/resource-manager/readme.md', '--keep-version-file', '--multiapi', '--no-async', '--python', '--python-mode=update', '--python-sdks-folder=/tmp/tmp6oded9o3/sdk/sdk', '[email protected]/[email protected]', '--version=preview'] AutoRest code generation utility [version: 2.0.4283; node: v10.15.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4385)
Loading AutoRest extension '@microsoft.azure/autorest.python' (4.0.70->4.0.70)
Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.44->2.3.44)
Processing batch task - {"tag":"package-2019-04"} .
<--- Last few GCs --->
[6124:0x271acc0] 88419 ms: Mark-sweep 1381.8 (1425.8) -> 1381.5 (1426.3) MB, 1306.4 / 0.0 ms (average mu = 0.091, current mu = 0.002) allocation failure scavenge might not succeed
[6124:0x271acc0] 90298 ms: Mark-sweep 1382.3 (1426.3) -> 1382.0 (1426.8) MB, 1861.3 / 0.0 ms (average mu = 0.048, current mu = 0.009) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x2d1d4c09e6e9 <JSObject>
0: builtin exit frame: stringify(this=0x2d1d4c091a21 <Object map = 0x3d7508d042a9>,0x3443456826f1 <undefined>,0x3443456826f1 <undefined>,0x1e94ae6cf639 <JSArray[8]>,0x2d1d4c091a21 <Object map = 0x3d7508d042a9>)
1: arguments adaptor frame: 1->3
2: IdentitySourceMapping [0x379522bcc999] [/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-cor...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x8dc510 node::Abort() [node]
2: 0x8dc55c [node]
3: 0xad9b5e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xad9d94 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xec7bf2 [node]
6: 0xec7cf8 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [node]
7: 0xed3dd2 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xed4704 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xed7371 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node]
10: 0xe9f655 [node]
11: 0xea6eca v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [node]
12: 0x11d69d0 v8::internal::IncrementalStringBuilder::IncrementalStringBuilder(v8::internal::Isolate*) [node]
13: 0xf99459 v8::internal::JsonStringifier::JsonStringifier(v8::internal::Isolate*) [node]
14: 0xba90ec v8::internal::Builtin_JsonStringify(int, v8::internal::Object**, v8::internal::Isolate*) [node]
15: 0x34c085a5bf7d |
Automation for azure-sdk-for-goA PR has been created for you: |
Automation for azure-sdk-for-jsEncountered a Subprocess error: (azure-sdk-for-js)
Command: ['/usr/local/bin/autorest', '/tmp/tmp5ozm8qja/rest/specification/network/resource-manager/readme.md', '--license-header=MICROSOFT_MIT_NO_VERSION', '--typescript', '--typescript-sdks-folder=/tmp/tmp5ozm8qja/azure-sdk-for-js', '[email protected]/[email protected]'] AutoRest code generation utility [version: 2.0.4283; node: v8.12.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4299)
Loading AutoRest extension '@microsoft.azure/autorest.typescript' (4.0.0->4.0.0)
Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.51->2.3.51)
<--- Last few GCs --->
[2604:0x406e860] 176978 ms: Mark-sweep 1404.6 (1490.2) -> 1404.6 (1490.7) MB, 1825.4 / 0.0 ms allocation failure GC in old space requested
[2604:0x406e860] 178611 ms: Mark-sweep 1404.6 (1490.7) -> 1404.6 (1455.2) MB, 1632.1 / 0.0 ms last resort GC in old space requested
[2604:0x406e860] 180201 ms: Mark-sweep 1404.6 (1455.2) -> 1404.6 (1451.2) MB, 1590.3 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x28613b0a5879 <JSObject>
1: readLineBreak(aka readLineBreak) [/node_modules/yaml-ast-parser/dist/src/loader.js:~300] [pc=0xc787dd49b22](this=0x201ac2c022d1 <undefined>,state=0x268433f59589 <State map = 0x5f20ff20081>)
2: readFlowCollection(aka readFlowCollection) [/node_modules/yaml-ast-parser/dist/src/loader.js:~596] [pc=0xc787dd41060](this=0x201ac2c022d1 <undefined>,state=0x268433f59589 <State map = 0x5f20ff20...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x8cbf4c [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewUninitializedFixedArray(int) [node]
6: 0xd7fc13 [node]
7: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [node]
8: 0xc787d7842fd |
Automation for azure-sdk-for-rubyNothing to generate for azure-sdk-for-ruby |
Can one of the admins verify this patch? |
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.
Left some comments.
I also ran validation tools on the API, could you please also take a look into below? Likely we can change this API (I believe we can while in preview).
There is a pair of warning related to missing scheme in response (inserted below). When I tested UpdatePrivateEndpointConnection previous time, it returned connection body if I remember correctly. Please re-check this fact and update with scheme value if so.
PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'PrivateLinkServices_UpdatePrivateEndpointConnection
200/201 Responses of long running operations must have a schema definition for return type.
...rk/resource-manager/Microsoft.Network/stable/2019-04-01/autoApprovedPrivateLinkServices.json
Outdated
Show resolved
Hide resolved
"paths": { | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility": { | ||
"post": { | ||
"operationId": "CheckPrivateLinkServiceVisibility", |
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.
Please check if this expected operation name (i.e. plain operation name instead of Class_Operation
form).
Current value would place this operation directly under INetworkManagementClient like CheckDnsNameAvailability
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.
Thanks for the suggestion, I was thinking that the cmdlet that under different path from private link service, should be a separate operation id. But since both you and Anton is suggested, I have already changed the operation id to merge them into private endpoint. This make code looks more neat. Thanks.
Given that two new APIs are related to PrivateLinkServices, maybe it would be better to add them to |
Could you please review my comment above (response schema related). Adding previously recorded traffic for more context (there is response body received from server):
|
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.
Comments for both 2019-04-01
and 2019-06-01
specification/network/resource-manager/Microsoft.Network/stable/2019-04-01/privateEndpoint.json
Show resolved
Hide resolved
specification/network/resource-manager/Microsoft.Network/stable/2019-04-01/privateEndpoint.json
Outdated
Show resolved
Hide resolved
...ication/network/resource-manager/Microsoft.Network/stable/2019-04-01/privateLinkService.json
Outdated
Show resolved
Hide resolved
...ication/network/resource-manager/Microsoft.Network/stable/2019-04-01/privateLinkService.json
Outdated
Show resolved
Hide resolved
@@ -306,7 +306,7 @@ | |||
}, | |||
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes": { | |||
"get": { | |||
"operationId": "AvailablePrivateEndpointTypes_List", | |||
"operationId": "PrivateEndpoints_ListAvailablePrivateEndpointTypes", |
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.
This kind of naming seems to trigger new warnings like this:
Per the Noun_Verb convention for Operation Ids, the noun 'PrivateEndpoints' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
Could you please consider naming operations w/o noun on the right side of underscore? E.g. PrivateEndpoints_ListAvailableTypes
or something like this.
Please also check the same for other operations.
Cmd to check locally:
azure-rest-api-specs\specification\network\resource-manager>autorest --azure-validator --openapi-type=arm
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.
Hi Evgeny, the AvailablePrivateEndpointType is a single noun. It's a single class type, different from privateEndpoint. So let's consider to still use 'PrivateEndpoints_ListAvailablePrivateEndpointTypes'. Thank you.
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.
I haven't noticed this earlier, but AvailablePrivateEndpointTypes.List
has already been published in Network SDK and is being used in Azure PowerShell. So changing it would be a breaking change and we wouldn't want that. Could you please revert this change?
Also, I think in this case we would also need to change PrivateEndpoints_ListPrivateEndpointAvailableTypesByResourceGroup
to AvailablePrivateEndpointTypes_ListByResourceGroup
to keep consistent naming with List
/ListByResourceGroup
pair.
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.
@number213 Thanks , that was my concern too. I have already revert it back and add _ListByResourceGroup.
9a07258
to
21db5c3
Compare
@KrisBash could you please give feedback from ARM's side? |
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.
looks fine, just one minor note.
"type": "string", | ||
"description": "Resource type." | ||
}, | ||
"resourceName": { |
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.
can we call this something else? providerNamespace? its not resource name. its the resourceType name of the onboarded service. resource name can be confusing.
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.
@ravbhatnagar Thanks for reviewing. I agreed with you. The name sounds inaccuracy. In design doc, it is called 'ServiceName' and in the NRP code it's 'ResouceName' , both are not good, but in order to works with NRP side correctly , I changed the name accordingly. So I guess we should leave it unless RP have changed.
Signing off from ARM side with one minor comment. Not blocking but good to fix |
What's up with the JS SDK failing? |
@tjprescott @number213 who can help look at the SDK issue? |
I think this is the step that was removed by @sergey-shandar (#6391). My guess is that it's deprecated and Network's release branch is out of sync with |
@bowen0106 can you try rebase your branch? |
…rt privateIp. Minor modify on readme.md file.
…ntType get null property.
…EndpointConnect. 2. Change opertaion id for opertaions that relative to private endpoint and private link service.
…body content that contains a private link service alias string. 2. Change both CheckPrivateLinkServiceVisibility/AutoApprovedPrivateLinkServices API to support for with/without ResourceGroup parameter.
69a6005
to
768782d
Compare
@shahabhijeet can you please with the go sdk generation? or point to someone who can help? |
@jhendrixMSFT will the right person who can help you with Go SDK related questions. |
The build errors are a known issue for network (not just Go is affected). I'm following up with the owners of the swagger-to-sdk job but for now the failures can be ignored. |
@AutorestCI regenerate azure-sdk-for-go |
1 similar comment
@AutorestCI regenerate azure-sdk-for-go |
Encountered an unknown error
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/bot_framework.py", line 105, in manage_comment
response = getattr(self.handler, orderstr)(webhook_data.issue, *split_text)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/restbot.py", line 54, in regenerate
return self.rebuild(issue, repotag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/restbot.py", line 36, in rebuild
self.sdk_default_base
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 310, in generate_sdk_from_git_object
sdk_repo.git.push('origin', branch_name, set_upstream=True)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git push --set-upstream origin restapi_auto_6332
stderr: 'To https://github.com/Azure/azure-sdk-for-go.git
! [rejected] restapi_auto_6332 -> restapi_auto_6332 (fetch first)
error: failed to push some refs to 'https://AutorestCI:[email protected]/Azure/azure-sdk-for-go.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.' |
@jhendrixMSFT who's the owner of the swagger to sdk job? we really need this PR to merge ASAP so we can start our work on AKS private clusters which is scheduled to go in preview in 6 weeks. |
This was resolved yesterday by @lmazuel. Regardless you can still merge the PR. |
* Adds base for updating Microsoft.Network from version stable/2019-04-01 to version 2019-06-01 * Updates readme * Updates API version in new specs and examples * Add PrivateIPAddressVersion in LoadBalancerFrontendIpConfiguration pr… (#6164) * Add PrivateIPAddressVersion in LoadBalancerFrontendIpConfiguration properties. * Fixed LB examples * Fix examples in 2019-06-01 * Remove API version number in privateIPAddressVersion description. * Add privateIPAddressVersion in LoadBalancer examples. * Add privateIPAddressVersion in 2019-06-01 API version. * Update specs to avoid readOnly in the request body (#6228) * typo: netowork May double word the (#6206) * Update cipher suites (#6213) * removing resource group name from PrepareNetworkPoliciesRequest (#6232) * Add exception for property "Conditon" in Network's webapplicationfirewall.json (#6335) * Extend long-running ops fixes to new API version; Suppression (#6336) * Update long-running for new API version * Add suppression for new API * Updated examples to have valid bodies for live put (#6349) * More examples fix after live testing (#6382) * Improved more examples after live testing * Fix validations * Improve descriptions in Network to align with Swagger guidelines (#6350) * Improve descriptions in Network to align with Swagger guidelines * Fix for CI * More examples improvements (#6444) * Add PATCH to Azure Firewall supported operations (#6486) * Add PATCH to Azure Firewall supported operations * Name the parameter how validation expects it * Patch is not a long running operation, so update the specs accordingly * PrivateEndpoint & PrivateLinkService APIs update (#6332) * Add two properties on Subnet for privateIp. Add two new APIs to support privateIp. Minor modify on readme.md file. * Fix some issue found by Model Validation. * Merge all apis relative to private end point / private link service to its json file. * Fix a typo name from design spec that casue GetAvailablePrivateEndpointType get null property. * Change AutoApprovedPrivateLinkService structure to fit with NRP side. * Delete suppress for merged APIs in readme.md. * 1. Change value to PrivateEndpointConnection when calling put PrivateEndpointConnect. 2. Change opertaion id for opertaions that relative to private endpoint and private link service. * Minor fix for model validation. * Revert opertion id changes for AvailablePrivateEndpointType to previous name. * 1. Change CheckPrivateLinkServiceVisibility API, the input now has a body content that contains a private link service alias string. 2. Change both CheckPrivateLinkServiceVisibility/AutoApprovedPrivateLinkServices API to support for with/without ResourceGroup parameter. * Improve Network's examples (#6493) * Removed read-only props from VPNGW example * Fixed LoadBalancer examples: * "outboundRules" array isn't returned for "Basic" SKU load balancer * added example for external LB with outboundRules * added missing read-only properties * Replace "regionName" in examples with real location * Fixed incorrect descriptions in LoadBalancer: child resource doesn't have to have a unique name within resource group, but within a set of similar resource on parent load balancer * chore: jsonfmt network (#6592) * Adding VpnSiteLink and VpnSiteLinkConnection properties. (#6528) * Added VpnSiteLink/VpnSiteLinkConnection operations. * Sdk changes for vpn site link. * Fixing error. * Fixing more comments. * Fixing json error. * Fixing json files. * Fixing comments. * Fixing more issues. * Fixing more errors. * Fixing more error. * Prettify JSON in VpnConnectionGet.json * Resolving more comments. * Fixing typo. * Adding type in examples of put. * Removing Child resource type. * chore: jsonfmt network-may * Fix incorrect examples
* Adds base for updating Microsoft.Network from version stable/2019-04-01 to version 2019-06-01 * Updates readme * Updates API version in new specs and examples * Add PrivateIPAddressVersion in LoadBalancerFrontendIpConfiguration pr… (Azure#6164) * Add PrivateIPAddressVersion in LoadBalancerFrontendIpConfiguration properties. * Fixed LB examples * Fix examples in 2019-06-01 * Remove API version number in privateIPAddressVersion description. * Add privateIPAddressVersion in LoadBalancer examples. * Add privateIPAddressVersion in 2019-06-01 API version. * Update specs to avoid readOnly in the request body (Azure#6228) * typo: netowork May double word the (Azure#6206) * Update cipher suites (Azure#6213) * removing resource group name from PrepareNetworkPoliciesRequest (Azure#6232) * Add exception for property "Conditon" in Network's webapplicationfirewall.json (Azure#6335) * Extend long-running ops fixes to new API version; Suppression (Azure#6336) * Update long-running for new API version * Add suppression for new API * Updated examples to have valid bodies for live put (Azure#6349) * More examples fix after live testing (Azure#6382) * Improved more examples after live testing * Fix validations * Improve descriptions in Network to align with Swagger guidelines (Azure#6350) * Improve descriptions in Network to align with Swagger guidelines * Fix for CI * More examples improvements (Azure#6444) * Add PATCH to Azure Firewall supported operations (Azure#6486) * Add PATCH to Azure Firewall supported operations * Name the parameter how validation expects it * Patch is not a long running operation, so update the specs accordingly * PrivateEndpoint & PrivateLinkService APIs update (Azure#6332) * Add two properties on Subnet for privateIp. Add two new APIs to support privateIp. Minor modify on readme.md file. * Fix some issue found by Model Validation. * Merge all apis relative to private end point / private link service to its json file. * Fix a typo name from design spec that casue GetAvailablePrivateEndpointType get null property. * Change AutoApprovedPrivateLinkService structure to fit with NRP side. * Delete suppress for merged APIs in readme.md. * 1. Change value to PrivateEndpointConnection when calling put PrivateEndpointConnect. 2. Change opertaion id for opertaions that relative to private endpoint and private link service. * Minor fix for model validation. * Revert opertion id changes for AvailablePrivateEndpointType to previous name. * 1. Change CheckPrivateLinkServiceVisibility API, the input now has a body content that contains a private link service alias string. 2. Change both CheckPrivateLinkServiceVisibility/AutoApprovedPrivateLinkServices API to support for with/without ResourceGroup parameter. * Improve Network's examples (Azure#6493) * Removed read-only props from VPNGW example * Fixed LoadBalancer examples: * "outboundRules" array isn't returned for "Basic" SKU load balancer * added example for external LB with outboundRules * added missing read-only properties * Replace "regionName" in examples with real location * Fixed incorrect descriptions in LoadBalancer: child resource doesn't have to have a unique name within resource group, but within a set of similar resource on parent load balancer * chore: jsonfmt network (Azure#6592) * Adding VpnSiteLink and VpnSiteLinkConnection properties. (Azure#6528) * Added VpnSiteLink/VpnSiteLinkConnection operations. * Sdk changes for vpn site link. * Fixing error. * Fixing more comments. * Fixing json error. * Fixing json files. * Fixing comments. * Fixing more issues. * Fixing more errors. * Fixing more error. * Prettify JSON in VpnConnectionGet.json * Resolving more comments. * Fixing typo. * Adding type in examples of put. * Removing Child resource type. * chore: jsonfmt network-may * Fix incorrect examples
Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Contribution checklist:
ARM API Review Checklist
Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.
Please follow the link to find more details on API review process.