Skip to content

Introduce Azure Traffic Manager 2018-04-01 API version with new features#3162

Closed
ttlcgl wants to merge 4 commits intoAzure:masterfrom
ttlcgl:master
Closed

Introduce Azure Traffic Manager 2018-04-01 API version with new features#3162
ttlcgl wants to merge 4 commits intoAzure:masterfrom
ttlcgl:master

Conversation

@ttlcgl
Copy link
Contributor

@ttlcgl ttlcgl commented May 30, 2018

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@AutorestCI
Copy link

AutorestCI commented May 30, 2018

Automation for azure-sdk-for-python

A PR has been created for you:
Azure/azure-sdk-for-python#2666

@AutorestCI
Copy link

AutorestCI commented May 30, 2018

Automation for azure-sdk-for-node

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-node#2829

@AutorestCI
Copy link

AutorestCI commented May 30, 2018

Automation for azure-libraries-for-java

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
AutorestCI/azure-libraries-for-java#137

@sergey-shandar sergey-shandar self-assigned this May 30, 2018
@sergey-shandar sergey-shandar added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 30, 2018
@sergey-shandar
Copy link
Contributor

@ravbhatnagar new API version for traffic manager.

@AutorestCI
Copy link

AutorestCI commented May 30, 2018

Automation for azure-sdk-for-ruby

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

Command: ['/usr/local/bin/autorest', '/tmp/tmpssly65g4/rest/specification/trafficmanager/resource-manager/readme.md', '--multiapi', '--ruby', '--ruby-sdks-folder=/tmp/tmpssly65g4/sdk', '--use=@microsoft.azure/autorest.ruby@3.0.20', '--version=preview']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4280; node: v8.11.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/root/.autorest/@microsoft.azure_autorest-core@2.0.4280/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4280)
   Loading AutoRest extension '@microsoft.azure/autorest.ruby' (3.0.20->3.0.20)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.1.22->2.1.22)
Processing batch task - {"tag":"package-2015-11"} .
Processing batch task - {"tag":"package-2017-03"} .
Processing batch task - {"tag":"package-2017-05"} .
Processing batch task - {"tag":"package-2017-09-preview-only"} .
Processing batch task - {"tag":"package-2018-02"} .
FATAL: System.NullReferenceException: CodeModel doesn't have api-version set, specs in code model have mismatching api-versions.
   at AutoRest.Ruby.Azure.CodeGeneratorRba.<Generate>d__6.MoveNext() in C:\work\oneautorest\autorest.ruby\src\azure\CodeGeneratorRba.cs:line 52
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at AutoRest.Ruby.Program.<ProcessInternal>d__3.MoveNext() in C:\work\oneautorest\autorest.ruby\src\Program.cs:line 112
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NewPlugin.<Process>d__15.MoveNext()
FATAL: ruby/generate - FAILED
FATAL: Error: Plugin ruby reported failure.
Process() cancelled due to exception : Plugin ruby reported failure.
Failure during batch task - {"tag":"package-2018-02"} -- Error: Plugin ruby reported failure..
  Error: Plugin ruby reported failure.

@AutorestCI
Copy link

AutorestCI commented May 30, 2018

Automation for azure-sdk-for-go

Nothing to generate for azure-sdk-for-go

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

Partial review since @sergey-shandar will be taking over this one

"profileName": "azsmnet6386",
"endpointType": "ExternalEndpoints",
"endpointName": "azsmnet7187",
"api-version": "2017-05-01"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should verify whether the versions mentioned in these examples match with the version number in the directory path here.

@@ -0,0 +1,67 @@
{
"parameters": {
"subscriptionId": "e68d4145-c9ae-4667-925d-c51c8d88ad73",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we recommend not exposing production style subscriptionids

@ttlcgl
Copy link
Contributor Author

ttlcgl commented May 31, 2018

@sergey-shandar
Thanks Sergey for remarks. I've replaced explicit subscription ID with placeholder and I've fixed all API versions in examples for stable\2018-04-01 version. I've added two separate commits for each remark for easier review.

@dsgouda dsgouda removed their assignment Jun 4, 2018
"swagger": "2.0",
"info": {
"title": "TrafficManagerManagementClient",
"version": "2018-03-01"
Copy link
Contributor

Choose a reason for hiding this comment

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

folder name is 2018-04-01 but the version here is still 2018-03-01. Do you intend to add the APIs in a newer APi-version or existing?

Copy link
Contributor

Choose a reason for hiding this comment

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

That was in error. Fixed in #3360

}
}
},
"put": {
Copy link
Contributor

Choose a reason for hiding this comment

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

PUT on a collection is not allowed/supported by ARM. Please include the instancename in the URL.
It should be /subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/{metricKeyName}. If it does not really have a name, you can put a default or current as the segment. The pattern wont work for ARM in the current shape. Check other resource types in this spec for reference.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should be /subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default

}
}
},
"delete": {
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as above.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same

},
"UserMetricsProperties": {
"properties": {
"key": {
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this key indicate and how is it used? is it considered a secret? Is it readOnly that the service generates for the user or something which needs to be provided by the user.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not a secret. Is it essentially a unique ID that is shared knowledge between the subscription and Microsoft. It is read-only. They "PUT" to create (or refresh) a key, and then we create it for them.

}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it at subscription scope or should it live at resource group scope?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is at subscription scope.

@ravbhatnagar
Copy link
Contributor

@tatlicioglu - please take a look at the comments and feel free to set something up if there are questions.

- tag: package-2017-05
- tag: package-2017-09-preview-only
- tag: package-2018-02
- tag: package-2018-03
Copy link
Contributor

Choose a reason for hiding this comment

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

@tatlicioglu where are these tags (2018-02, 2018-03) come from? Ruby is failing because of the tags.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is supposed to be part of the PR. Omitted them from the new PR (#3361)

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay I figured this out. readme.md was missed from this PR. Adding in 3361.

@sergey-shandar sergey-shandar mentioned this pull request Jul 5, 2018
10 tasks
@allencal
Copy link
Contributor

allencal commented Jul 5, 2018

I have created a new PR #3361 since I did not have auth to update Mehmet's PR. The two PR's cross-reference one another now. All above comments have been addressed in 3361.

@sergey-shandar
Copy link
Contributor

sergey-shandar commented Jul 9, 2018

See #3361

@AutorestCI
Copy link

AutorestCI commented Jul 9, 2018

Automation for azure-sdk-for-java

A PR has been created for you:
Azure/azure-sdk-for-java#2197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants