-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add specs for Available Service Aliases #7362
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
Add specs for Available Service Aliases #7362
Conversation
Automation for azure-sdk-for-pythonEncountered a Subprocess error: (azure-sdk-for-python)
Command: ['/usr/local/bin/autorest', '/tmp/tmpfxdl44do/rest/specification/network/resource-manager/readme.md', '--keep-version-file', '--multiapi', '--no-async', '--python', '--python-mode=update', '--python-sdks-folder=/tmp/tmpfxdl44do/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.4399)
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-06"} .
<--- Last few GCs --->
[6422:0x4254cc0] 70556 ms: Mark-sweep 1379.3 (1425.3) -> 1379.2 (1425.8) MB, 1134.4 / 0.0 ms (average mu = 0.187, current mu = 0.066) allocation failure scavenge might not succeed
[6422:0x4254cc0] 72175 ms: Mark-sweep 1380.1 (1425.8) -> 1380.0 (1426.3) MB, 1423.5 / 0.0 ms (average mu = 0.151, current mu = 0.120) allocation failure GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0xfaee06dbe1d]
Security context: 0x0953fd09e6e9 <JSObject>
1: newScalar [0x288c9296bfc9] [/node_modules/yaml-ast-parser/dist/src/yamlAST.js:~38] [pc=0xfaee0b13116](this=0x26605ac855a9 <Object map = 0x3b05907d9289>,v=0x0e47248826f1 <undefined>)
2: arguments adaptor frame: 0->1
3: readDoubleQuotedScalar(aka readDoubleQuotedScalar) [0x26605ac85d29] [/node_modules/yaml-ast-parser/dist/src/loader.js:~530] [pc=...
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: 0xea07f4 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node]
11: 0x11402db v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node]
12: 0xfaee06dbe1d |
|
Can one of the admins verify this patch? |
Automation for azure-sdk-for-goNothing to generate for azure-sdk-for-go |
avijitgupta
left a comment
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.
Approved.
|
@ryansbenson please review 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.
All fields beyond id, name, type should be inside a 'properties' envelope.
How is resourceName different than name? is there a more descriptive field name you could pick which is self describing?
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.
All fields beyond id, name, type should be inside a 'properties' envelope.
This isn't azure resource but service alias data. Not sure if that should adhere to resource's conventions of nesting properties.
How is resourceName different than name
Resource name is fully-qualified name like /services/Azure/ManagedInstance when name is just resource name without slashes (e.g. servicesAzureManagedInstance)
@avijitgupta should be able to provide more information
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.
Not looking at the name or content of the request, only at the format. This is a Get request on a URL which should be an azure resource. When we do this, it should follow the convention of an azure resource.
"/services/Azure/ManagedInstance" isn't a azure resource name, so it will cause some confusion. Is there a different name we can call it?
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.
@ryansbenson
Below is the logic on the server.
this.Name = resourceName.Replace("/", string.Empty);
this.ResourceName = resourceName;
this.Id = string.Format("/subscriptions/{0}/resourceGroup/{1}/providers/Microsoft.Network/AvailableServiceAliases/{2}", subscriptionId, groupName, this.Name);
this.Type = "Microsoft.Network/AvailableServiceAliases";
Name is the azure resource name which does not have any '/' (it follows the ceonvention of azure resource)
ResourceName is another property which is the alias which the customer is expected to use. Don't expect it to cause confusion.
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.
@ryansbenson one extra thing - this API is already live so we can't change property names or object structure
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.
@avijitgupta - With no change, when a user is told to "Use the resource name to ___", both could be valid interpretations. Why don't you call it "ResourceAlias"? Also, the Id should also include the /location/{location}/ part of the path (the ID should be Get-able).
@number213 - Your RP manifest doesn't have a route for locations/availableServiceAliases yet, so there can't be production traffic going to this path in your service. These reviews are in place to force consistency and catch issues like this before they go live.
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 is precedence set with other network APIs with properties outside of the properties body. Though this isn't compliant and will cause issues across ARM tooling, this is understood by the network team.
With regard to resourceName being confusing - it was agreed that a new name, something like 'alias' or 'resourceAlias', should be used but will be changed in a future API version.
In Testing, Please Ignore[Logs] (Generated from 52d1455, Iteration 2)
|
464d464 to
52d1455
Compare
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.