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

Adding patch support for SQR API #3112

Merged
merged 15 commits into from
Jun 5, 2018
Merged

Conversation

abversqr
Copy link
Member

@abversqr abversqr commented May 21, 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

Added GA API version for Scheduled Query Rule
Resolving Comments
…rmat

Couple of changes -
1. Made SKU as top level proprty as mentioned here - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md#put-resource
 2. including generic error response format
1. Removed SKU - Billing Model is still under discussion, hence need not to be exposed to customers.
2.  Enabled field ichanged to align with camel case.
3.  'throttleTillDate' in properties.action changed to 'throttlingInMin' to denote correct meaning  and it’s data type changed to number instead of date.
4. 'status' to be removed in properties.action from examples.
5.  'severity' made a required field in properties.action.
6. Removed Examples from original spec json
Updated Example to reflect AI instances in tags and 'dataSourceId"
Restore Tags Description
Fixed errores reported by running command "oav validate-example"
Changes -
1. Added Default Response payload in all APIs
2. Made azNs description more clear
Updating descriptions + property name change
@AutorestCI
Copy link

AutorestCI commented May 21, 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#31

@AutorestCI
Copy link

AutorestCI commented May 21, 2018

Automation for azure-sdk-for-python

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

Command: ['/usr/local/bin/autorest', '/tmp/tmpr1jf1iyy/rest/specification/monitor/resource-manager/readme.md', '--multiapi', '--python', '--python-mode=update', '--python-sdks-folder=/tmp/tmpr1jf1iyy/sdk', '--use=@microsoft.azure/autorest.python@~3.0', '--version=preview']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4262; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/root/.autorest/@microsoft.azure_autorest-core@2.0.4279/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4279)
   Loading AutoRest extension '@microsoft.azure/autorest.python' (~3.0->3.0.51)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.44->2.3.44)

ERROR (Fatal/DuplicateModelCollsion): Duplicated model name with non-identical definitions
    - file:///tmp/tmpr1jf1iyy/rest/specification/monitor/resource-manager/microsoft.insights/stable/2018-04-16/scheduledQueryRule_API.json:618:4 ($.definitions.Action)
    - file:///tmp/tmpr1jf1iyy/rest/specification/monitor/resource-manager/microsoft.insights/stable/2018-03-01/metricAlert_API.json:600:4 ($.definitions.Action)
Process() cancelled due to exception : Cancellation requested.
  Cancellation requested.

@AutorestCI
Copy link

AutorestCI commented May 21, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2602

@AutorestCI
Copy link

AutorestCI commented May 21, 2018

Automation for azure-sdk-for-go

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-go#1968

@annatisch
Copy link
Member

Thanks @abversqr - is this API already live/public?

@annatisch
Copy link
Member

@abversqr - your github account is not currently in the Azure org - can you please add it?

Updated description for queryType
@AutorestCI
Copy link

AutorestCI commented May 24, 2018

Automation for azure-sdk-for-ruby

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

Command: ['/usr/local/bin/autorest', '/tmp/tmp80auh2zu/rest/specification/monitor/resource-manager/readme.md', '--multiapi', '--ruby', '--ruby-sdks-folder=/tmp/tmp80auh2zu/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.4262; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/root/.autorest/@microsoft.azure_autorest-core@2.0.4279/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4279)
   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-04-01-only"} .
Processing batch task - {"tag":"package-2016-03-01-only"} .
Processing batch task - {"tag":"package-2016-09-01-only"} .

ERROR (Fatal/DuplicateParameterCollision): Duplicated global non-identical parameter definitions
    - file:///tmp/tmp80auh2zu/rest/specification/monitor/resource-manager/microsoft.insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json:395:4 ($.parameters.ResourceUriParameter)
    - file:///tmp/tmp80auh2zu/rest/specification/monitor/resource-manager/microsoft.insights/stable/2016-09-01/metrics_API.json:269:4 ($.parameters.ResourceUriParameter)
Process() cancelled due to exception : Cancellation requested.
Failure during batch task - {"tag":"package-2016-09-01-only"} -- Cancellation requested..
  Cancellation requested.

@abversqr
Copy link
Member Author

Thanks @abversqr - is this API already live/public?

@annatisch Yes, API is already public. This PR is just to add support of PATCH

@annatisch annatisch added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 24, 2018
@msvijayn
Copy link

Linked to issue #8760

@annatisch
Copy link
Member

annatisch commented May 29, 2018

@abversqr - looks like the CI is broken:
Duplicated model name with non-identical definition

Though it seems to be unrelated to your last commits - are you able to take a look?

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.

Looks good!

@ravbhatnagar ravbhatnagar 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 May 29, 2018
@annatisch
Copy link
Member

Hi @abversqr - The CI issue here is due to a bug fix in autorest core that was recently rolled out to prevent conflicting models in SDK generation (not Python only, it’s cross-language).

If two files that are in the same “tag” in the Readme defines the same model name Foo, both objects have to be exactly (at the comma level) the same, or they have to be a reference to an external common file.
This cannot be suppressed with a suppression, this is required to be fixed since it’s a critical bug.

The fix is simple, either make sure all models that are described in several files are exactly the same, or ref an external model.

Changes - 
1. Renamed "MetricTrigger" to "LogMetricTrigger"
2. Aligned "Resources" to other specs
@abversqr
Copy link
Member Author

abversqr commented Jun 5, 2018

Hi @annatisch , I have fixed model name issue. Please have a look

@annatisch annatisch merged commit ad24378 into Azure:master Jun 5, 2018
@abversqr abversqr deleted the patchsupport branch June 5, 2018 20:42
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants