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

Improve Network's examples #6493

Merged
merged 4 commits into from
Jul 9, 2019

Conversation

anton-evseev
Copy link
Contributor

  • Responses for LoadBalancer with Basic SKU don't have outboundRules property so removed it from examples
  • Added missing read-only properties like type and etag to LoadBalancer's examples & specs
  • Removed read-only fields from VPN Gateway's example for PUT

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:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@AutorestCI
Copy link

AutorestCI commented Jun 28, 2019

Automation for azure-sdk-for-python

Encountered a Subprocess error: (azure-sdk-for-python)

Command: ['/usr/local/bin/autorest', '/tmp/tmpt8w7tzlu/rest/specification/network/resource-manager/readme.md', '--keep-version-file', '--multiapi', '--no-async', '--python', '--python-mode=update', '--python-sdks-folder=/tmp/tmpt8w7tzlu/sdk/sdk', '[email protected]/[email protected]', '--version=preview']
Finished with return code -6
and output:

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.4387)
   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 --->

[23097:0x3f14cc0]    88015 ms: Mark-sweep 1381.7 (1425.3) -> 1381.4 (1425.8) MB, 3403.1 / 0.0 ms  (average mu = 0.106, current mu = 0.005) allocation failure scavenge might not succeed
[23097:0x3f14cc0]    90392 ms: Mark-sweep 1382.2 (1425.8) -> 1381.9 (1426.3) MB, 2374.2 / 0.0 ms  (average mu = 0.059, current mu = 0.001) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x0ee4ad99e6e9 <JSObject>
    0: builtin exit frame: stringify(this=0x0ee4ad991a21 <Object map = 0x2b878db042a9>,0x1bb3380826f1 <undefined>,0x1bb3380826f1 <undefined>,0x11775cbce8c9 <JSArray[7]>,0x0ee4ad991a21 <Object map = 0x2b878db042a9>)

    1: arguments adaptor frame: 1->3
    2: IdentitySourceMapping [0x3551e19754d1] [/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: 0x11d6b25 v8::internal::IncrementalStringBuilder::Extend() [node]
13: 0xf9b348 v8::internal::JsonStringifier::SerializeString(v8::internal::Handle<v8::internal::String>) [node]
14: 0xf9f7cf v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
15: 0xfa0626 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
16: 0xfa1719 v8::internal::JsonStringifier::Stringify(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node]
17: 0xba9121 v8::internal::Builtin_JsonStringify(int, v8::internal::Object**, v8::internal::Isolate*) [node]
18: 0x205e8da5bf7d

@AutorestCI
Copy link

AutorestCI commented Jun 28, 2019

Automation for azure-sdk-for-go

Nothing to generate for azure-sdk-for-go

@AutorestCI
Copy link

AutorestCI commented Jun 28, 2019

Automation for azure-sdk-for-ruby

Nothing to generate for azure-sdk-for-ruby

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

* "outboundRules" array isn't returned for "Basic" SKU load balancer
* added example for external LB with outboundRules
* added missing read-only properties
@AutorestCI
Copy link

AutorestCI commented Jun 28, 2019

Automation for azure-sdk-for-java

Nothing to generate for azure-sdk-for-java

@anton-evseev anton-evseev marked this pull request as ready for review June 28, 2019 11:43
@anton-evseev
Copy link
Contributor Author

Please ignore error in NetworkValidation, it's not related to this PR, it failed due to NuGet not being able to resolve dependencies. I've already reported this error to SDK & Azure PowerShell teams.

D:\a\1\s\Out\azure-powershell\src\Network\Network\Network.csproj : error NU1605: Detected package downgrade: Microsoft.Rest.ClientRuntime from 2.3.20 to 2.3.19. Reference the package directly from the project to select a different version.  [D:\a\1\s\Out\azure-powershell\src\Network\Network.sln]

@tjprescott
Copy link
Member

@number213 what about your JS SDK issue?

@anton-evseev
Copy link
Contributor Author

@tjprescott doesn't look like error is related to changes in PR.

INFO:swaggertosdk.autorest_tools:  Error: Unable to resolve package 'foo@@microsoft.azure/autorest.typescript'. 
ERROR:swaggertosdk.autorest_tools:Command '['/usr/local/bin/autorest', '/git-restapi/specification/network/resource-manager/readme.md', '--license-header=MICROSOFT_MIT_NO_VERSION', '--typescript', '--typescript-sdks-folder=/tmp/tmph_u9ld91/azure-sdk-for-js', '[email protected]/autorest.typescript']' returned non-zero exit status 1.

I think this is the step that was removed by @sergey-shandar (#6391)

…have to have a unique name within resource group, but within a set of similar resource on parent load balancer
@tjprescott
Copy link
Member

/azurepipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@tjprescott
Copy link
Member

@number213 it is still failing. @sergey-shandar it is okay to merge this with the JS SDK failing?

@kpajdzik
Copy link
Contributor

kpajdzik commented Jul 8, 2019

@number213 it is still failing. @sergey-shandar it is okay to merge this with the JS SDK failing?

Yes, go ahead. Are spell checker failures unrelated?

@anton-evseev
Copy link
Contributor Author

@kpajdzik yes, failures are because spellchecker's config with exceptions in this branch is out of sync with master, this PR doesn't introduce any new errors

@tjprescott tjprescott merged commit d3acd59 into Azure:network-may-release Jul 9, 2019
sergey-shandar pushed a commit that referenced this pull request Jul 16, 2019
* 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
celikcigdem pushed a commit to celikcigdem/azure-rest-api-specs that referenced this pull request Jul 17, 2019
* 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
@anton-evseev anton-evseev deleted the example-fix branch July 26, 2019 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants