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

Named DiagnosticSettings #1641

Merged
merged 7 commits into from
Sep 16, 2017
Merged

Named DiagnosticSettings #1641

merged 7 commits into from
Sep 16, 2017

Conversation

vcanaa
Copy link
Contributor

@vcanaa vcanaa commented Sep 6, 2017

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

@sergey-shandar sergey-shandar added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Sep 8, 2017
@sergey-shandar
Copy link
Contributor

@ravbhatnagar please, have a look. It's a new API version.

Copy link
Contributor

@ravbhatnagar ravbhatnagar left a comment

Choose a reason for hiding this comment

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

@vcanaa - please take a look

"DiagnosticSettingsCategories"
],
"operationId": "DiagnosticSettingsCategory_Get",
"description": "Gets the diagnostic settings category for the specified resource.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please indicate some of the typical values resourceUri could take to help customers understand this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is explicit in the example with a logic app.

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 too difficult to add it to the description? SDK users rely on description, API docs rely on description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any change in the description breaks the generation, so it requires more work that touches all our classes. I created a task on us to fix that.

},
"DiagnosticSettingsCategory": {
"properties": {
"categoryType": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this an enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I consider Enum bad practice when serialization is involved. If we introduce a new type, customers will be forced to update the sdk or the serialization will break.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes and that is the recommendation. Enum will make your API more usable. Else how will someone know when you support new types? When you support new types, you add the enum value and increment the APi version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like enums in serialization, but I am taking this feedback since more people seem to like them.

"readOnly": true,
"description": "Azure resource type"
},
"location": {
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 there should be location or tags here. Isnt this a proxy resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a proxy resource, but these are populated anyway when the request comes back. Also the resource class is shared by everything. It has been that way for a long time.

I believe we could have another class for proxy resource, but I prefer addressing that in a different release.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get an ACK in email with a workitem that this will be addressed in the next release? Apologies, but this is the only way to get the APIs cleaned up across Azure plat. I wont remember this comment in a few months and no one else on your team will :). So it will most likely be missed in the next rev also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a task for this

@ravbhatnagar ravbhatnagar added ReadyForSDKReview and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Sep 12, 2017
@ravbhatnagar
Copy link
Contributor

Discussed over email and there are workitems created to address the feedback. Approving for now.

@ravbhatnagar ravbhatnagar added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Sep 13, 2017
"tags" : null,
"properties" : {
"storageAccountId" : "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
"serviceBusRuleId" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey",
Copy link
Contributor

Choose a reason for hiding this comment

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

The response model DiagnosticSettings doesn't have ServiceBusRuleId property and no additional properties are accepted.

"parameters": {
"resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
"api-version": "2017-05-01-preview",
"parameters": {
Copy link
Contributor

@sergey-shandar sergey-shandar Sep 13, 2017

Choose a reason for hiding this comment

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

Error: parameter name is missing.

@@ -0,0 +1,271 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Operations API should be implemented.

@@ -0,0 +1,499 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Operations API should be implemented.

@sergey-shandar
Copy link
Contributor

@ravbhatnagar a new commit has a new file specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json. It looks like we need your approval again.

@sergey-shandar sergey-shandar added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review labels Sep 13, 2017
Copy link
Contributor

@sergey-shandar sergey-shandar left a comment

Choose a reason for hiding this comment

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

Preliminary comments. I haven't looked the new operation api file yet, I'm waiting for ARM review.

@ravbhatnagar
Copy link
Contributor

Looks good. @sergey-shandar @veronicagg - FYI that the operations API and the response could be converted to a linter rule since its standard.

@sergey-shandar
Copy link
Contributor

@vcanaa let me know when it's ready for review. It's hard to review a moving target :-)

@vcanaa
Copy link
Contributor Author

vcanaa commented Sep 13, 2017

This is ready for review.

@sergey-shandar
Copy link
Contributor

sergey-shandar commented Sep 13, 2017

@vcanaa thank you :-) I'm reviewing the code. It will take a while since it's big and we have a lot of other PRs for Ignite.

@sergey-shandar sergey-shandar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Sep 13, 2017
@vcanaa
Copy link
Contributor Author

vcanaa commented Sep 15, 2017

I was not sure if you were waiting for the sdk PR or not until a saw a new tag ReadyForSdkReview. So I sent a new PR for the sdk now.

@vcanaa
Copy link
Contributor Author

vcanaa commented Sep 15, 2017

I renamed the spec to:
[Monitor] Adding Operations API and making DiagnosticSettings ProxyOnly resource

So it is more informative.

@azuresdkciprbot
Copy link

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/monitor/resource-manager/readme.md
Before the PR: Warning(s): 23 Error(s): 10
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues

Send feedback and make AutoRest Linter Azure Bot smarter day by day!

Thanks for your co-operation.

@azuresdkciprbot
Copy link

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/monitor/resource-manager/readme.md
Before the PR: Warning(s): 23 Error(s): 10
After the PR: Warning(s): 26 Error(s): 9

AutoRest Linter Guidelines | AutoRest Linter Issues

Send feedback and make AutoRest Linter Azure Bot smarter day by day!

Thanks for your co-operation.

"operation":"Operations read",
"description":"Reading operations"
},
"properties":{
Copy link
Contributor

Choose a reason for hiding this comment

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

The "properties" property is not allowed according to "Operation" definition.

@@ -0,0 +1,22 @@
{
"parameters" : {
"resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
Copy link
Contributor

@sergey-shandar sergey-shandar Sep 16, 2017

Choose a reason for hiding this comment

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

The parameter resourceUri starts with a forward slash and the path template: /{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name} contains a forward slash before the parameter starts. This will cause double forward slashes in the request url. Thus making it incorrect. Please rectify the example.'

"name":"WorkflowRuntime",
"location":"eastus",
"tags":null,
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

tag and location aren't allowed in #/definitions/DiagnosticSettingsCategoryResource

"value": [
{
"id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting",
"type":"microsoft.logic/workflows",
Copy link
Contributor

Choose a reason for hiding this comment

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

The parameter resourceUri starts with a forward slash and the path template: /{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name} contains a forward slash before the parameter starts. This will cause double forward slashes in the request url. Thus making it incorrect. Please rectify the example.'

"type":"microsoft.logic/workflows",
"name":"mysetting",
"location":"eastus",
"tags":null,
Copy link
Contributor

Choose a reason for hiding this comment

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

tag and location aren't allowed in #/definitions/DiagnosticSettingsCategoryResource.

"type":"microsoft.insights/diagnosticSettingsCategories",
"name":"WorkflowRuntime",
"location":"eastus",
"tags":null,
Copy link
Contributor

Choose a reason for hiding this comment

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

tag and location aren't allowed in #/definitions/DiagnosticSettingsCategoryResource.

"name":"mysetting",
"location":"",
"tags":null,
"properties": {
Copy link
Contributor

@sergey-shandar sergey-shandar Sep 16, 2017

Choose a reason for hiding this comment

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

tag and location shouldn't be in response, according to model definition.

"name":"mysetting",
"location":"eastus",
"tags":null,
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

tag and location shouldn't be in the response according to DiagnosticSettingsResource

}
],
"properties": {
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add description.

Copy link
Contributor

@sergey-shandar sergey-shandar left a comment

Choose a reason for hiding this comment

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

Currently, the main problem is models which don't have tag and location as properties but examples do have them.

Copy link
Contributor

@sergey-shandar sergey-shandar left a comment

Choose a reason for hiding this comment

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

As an exception.

@sergey-shandar sergey-shandar merged commit bc5e15f into Azure:current Sep 16, 2017
@AutorestCI
Copy link

No modification for AutorestCI/azure-sdk-for-node

@AutorestCI
Copy link

@AutorestCI
Copy link

@vcanaa vcanaa deleted the current2 branch September 18, 2017 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review ReadyForSDKReview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants