Skip to content

Conversation

@jpiyali
Copy link
Member

@jpiyali jpiyali commented Jan 31, 2018

…space for api version 2015-05-01

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

This commit was treated and no generation was made for Azure/azure-sdk-for-go

@AutorestCI
Copy link

This commit was treated and no generation was made for Azure/azure-sdk-for-python

@lmazuel lmazuel added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jan 31, 2018
@lmazuel lmazuel requested a review from ravbhatnagar January 31, 2018 22:31
@lmazuel
Copy link
Member

lmazuel commented Jan 31, 2018

Tagging @ravbhatnagar since new file in "stable" folder

@lmazuel
Copy link
Member

lmazuel commented Jan 31, 2018

  • Please fix all PR_only=true CI issue
  • Please plug this file in the Readme

@AutorestCI
Copy link

AutorestCI commented Feb 6, 2018

Automation for azure-sdk-for-python

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-python#2022

@Azure Azure deleted a comment from AutorestCI Feb 6, 2018
@Azure Azure deleted a comment from AutorestCI Feb 6, 2018
@Azure Azure deleted a comment from AutorestCI Feb 6, 2018
@Azure Azure deleted a comment from AutorestCI Feb 6, 2018
@Azure Azure deleted a comment from AutorestCI Feb 6, 2018
@AutorestCI
Copy link

Swagger to SDK encountered a Subprocess error: (Azure/azure-sdk-for-go)

Command: profileBuilder -s preview -name preview
Finished with return code 127
and output:

/bin/sh: 1: profileBuilder: not found

@jpiyali
Copy link
Member Author

jpiyali commented Feb 6, 2018

@ravbhatnagar @lmazuel - all checks passed for PR=true except live validation. Can you please review?

@jpiyali
Copy link
Member Author

jpiyali commented Feb 7, 2018

Thank you @lmazuel , this was my first PR so had a few commits before getting rid of all errors. Do you recommend a separate PR for my next API (they are ready), or should I tag onto this one?

@lmazuel
Copy link
Member

lmazuel commented Feb 7, 2018

I personally like having atomic PR, but if this is a new API in the same Readme, you may use this same PR to simplify future ARM review.

@jpiyali jpiyali changed the title Add swagger for annotation api for microsoft.insights components namespace for api version 2015-05-01 Add swagger for annotation and work item config api for microsoft.insights components namespace for api version 2015-05-01 Feb 7, 2018
@AutorestCI
Copy link

Swagger to SDK encountered a Subprocess error: (Azure/azure-sdk-for-go)

Command: profileBuilder -s preview -name preview
Finished with return code 127
and output:

/bin/sh: 1: profileBuilder: not found

@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/applicationinsights/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@AutorestCI
Copy link

AutorestCI commented Feb 12, 2018

Automation for azure-sdk-for-go

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-go#1119

@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/applicationinsights/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@jpiyali
Copy link
Member Author

jpiyali commented Feb 12, 2018

@lmazuel - I've taken care of PR=true issues for the new api as well. Please take a look. Also, can you please help get some attention for the ARMFeedback tag?

@Azure Azure deleted a comment from AutorestCI Feb 13, 2018
@Azure Azure deleted a comment from AutorestCI Feb 13, 2018
@Azure Azure deleted a comment from AutorestCI Feb 13, 2018
@Azure Azure deleted a comment from AutorestCI Feb 13, 2018
@Azure Azure deleted a comment from AutorestCI Feb 13, 2018
@Azure Azure deleted a comment from AutorestCI Feb 13, 2018
}
}
},
"409": {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove all 4xx related errors and include a "default" model which captures all error responses. Check Batch api spec in this repo. They have a CloudError model.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated this just now in both files.

"type": "object",
"description": "Annotation associated with an application insights resource.",
"properties": {
"AnnotationName": {
Copy link
Contributor

Choose a reason for hiding this comment

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

all RP specific properties should go inside the "properties" property. Top level allowed properties are id, name, type, tags, location etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

So properties like category, eventtime etc need to be moved.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a released version in PROD for 2+ years now. We'll update this in next api-version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, since this is existing behavior which will break clients, lets identify the path forward in the next major version update.

"format": "date-time",
"description": "Time when event occurred"
},
"Id": {
Copy link
Contributor

Choose a reason for hiding this comment

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

please make sure all property names are camel cased.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a released version in PROD for 2+ years now. We'll update this in next api-version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please.

"nextLinkName": null
}
},
"post": {
Copy link
Contributor

Choose a reason for hiding this comment

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

put for create. Why is this a POST.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its a POST because the Url path doesn't uniquely define the unique resource. The url path is /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/WorkItemConfigs and there can be multiple for single resource.

Copy link
Contributor

Choose a reason for hiding this comment

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

POST should not be used for creating resources. Its not idempotent. It breaks consistency around how resources get provisioned in across Azure. Moreover, although its possible to do it via POST, we strongly recommend teams against creating multiple resources in one API call.

Copy link
Member Author

Choose a reason for hiding this comment

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

This api does not create multiple resources in one API call, it creates a single one only. I agree that it is not idempotent, but did not know this as a requirement. Will keep this guideline for future api versions. Where are api guidelines documented for ARM?

}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/DefaultWorkItemConfig": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the defaultWorkitemConfig part of this URL instead of a parameter as is the case in other APIs like DELETE, PUT etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed, we'll fix this in our next release version.

Copy link
Contributor

Choose a reason for hiding this comment

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

I dont understand. Is this just a swagger fix or a service side fix? I was hoping this is just an issue with how its described in swagger.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the way the API was published. Essentially to retrieve default configuration for a resource. This is not a swagger fix, this is the swagger documentation for apis that are in PROD today. We're documenting our current public apis that are in production.

}
},
"definitions": {
"WorkItemConfiguration": {
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 about top level properties that are allowed.

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed, will change this in our next public version.

@ravbhatnagar
Copy link
Contributor

@jpiyali - some comments from ARM side. Please take a look.

@jpiyali
Copy link
Member Author

jpiyali commented Feb 15, 2018

@ravbhatnagar - thank you for your review comments, I've responded and updated.

@ravbhatnagar
Copy link
Contributor

Since these are existing APIs in prod for several years, approving the PR. Fixing these will most likely mean breaking changes in the client. Email conversation ongoing with the AI team.
SIgning off on this PR.

@ravbhatnagar ravbhatnagar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review Conditionally-Merged and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Feb 21, 2018
@jpiyali
Copy link
Member Author

jpiyali commented Feb 21, 2018

@lmazuel - can you please help merge the PR?

@lmazuel
Copy link
Member

lmazuel commented Feb 21, 2018

@AutorestCI rebuild azure-sdk-for-python

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 Conditionally-Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants