Skip to content

Comments

[DO-NOT-MERGE] Add new resource type /events for Azure service health events#2127

Closed
HimanshuMisra1 wants to merge 11 commits intoAzure:masterfrom
HimanshuMisra1:azure-service-health-events-2
Closed

[DO-NOT-MERGE] Add new resource type /events for Azure service health events#2127
HimanshuMisra1 wants to merge 11 commits intoAzure:masterfrom
HimanshuMisra1:azure-service-health-events-2

Conversation

@HimanshuMisra1
Copy link
Contributor

@HimanshuMisra1 HimanshuMisra1 commented Dec 9, 2017

Resource Health RP changes for new resource type /events.
This resource type will return all service health events (incidents/maintenance/advisories) that are either declared or detected from automated service monitoring using Geneva Health System.

@olydis
Copy link
Contributor

olydis commented Dec 9, 2017

@HimanshuMisra1 please pull the Swagger file out of the swagger folder (see typical folder structure of this repo)

@olydis
Copy link
Contributor

olydis commented Dec 9, 2017

@ravbhatnagar new Swagger

@olydis olydis added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Dec 9, 2017
@Azure Azure deleted a comment from azuresdkciprbot Dec 11, 2017
@Azure Azure deleted a comment from azuresdkciprbot Dec 13, 2017
"name": "VIRTUALMACHINES-WESTUS-DTR1",
"type": "/providers/Microsoft.ResourceHealth/events",
"properties": {
"eventType": "serviceissue",
Copy link
Contributor

Choose a reason for hiding this comment

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

The allowed values for eventType and eventSource have a different spelling than specified here - please adjust either the enum definitions or the example (to match your actual service as it is deployed right now)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the examples to use correct values from enum.

@olydis
Copy link
Contributor

olydis commented Dec 13, 2017

Please adjust the readme.md of this RP to point to the new Swagger (note the slightly altered spelling of your Swagger, our tooling is case sensitive) 🙂

],
"responses": {
"200": {
"description": "The body contains the list of the current service health events in the subscription",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Replace The body contains the with The in this Swagger - since this description makes it into high level artifacts like SDKs and such, descriptions should rather not talk about REST technicalities. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

},
"nextLink": {
"type": "string",
"description": "The URI to fetch the next page of events. Call ListNext() with this URI to fetch the next page of events."
Copy link
Contributor

Choose a reason for hiding this comment

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

same as mentioned above: please remove part about "ListNext" - it is actually not called that way in some languages others even retrieve pages on the fly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, Thanks

],
"description": "The List events operation response."
},
"event": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

"description": "Microsoft.ResourceHealth/events"
},
"properties": {
"type": "object",
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually properties of resources are flattened, as you can also see here (slightly better user experience)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, Thanks

"enum": [
"Available",
"Unavailable",
"Degraded",
Copy link
Contributor

Choose a reason for hiding this comment

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

Added enum value. Breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is action item on us here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessarily anything, but:

  • any SDKs/CLIs derived from this Swagger will have to bump their major version
  • you may wanna consider changing modelAsString to true since that would make enum-additions no breaking change in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, Thanks

Copy link
Contributor

@olydis olydis left a comment

Choose a reason for hiding this comment

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

I assume ARM will also have comments, but here is some feedback for the time being.

},
"allOf": [
{
"$ref": "#/definitions/Resource"
Copy link
Contributor

Choose a reason for hiding this comment

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

just $ref ../../../../common-types/resource-management/v1/types.json#/definitions/Resource here, then you can remove the definition of Resource above (which is also slightly invalid since you $ref the entire file "types.json" up there, but really you just want to extract /definitions/Resource from that file) 🙂

"description": "List subscription impacted by the service health event.",
"items": {
"type": "string",
"description": "Subscription impacted by the service health event."
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why there is a list of subscriptions in here, the events are returned at subscription level, either this is not required or the API is returning data that it should not? Is the intent that there should be a tenant level API where this is returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the intent is to have a tenant level API. The objects returned are tenant level objects and will talk about multiple subscriptions. Since that feature in ARM will be ready by April, 2018, we have to live with exposing single subscription requests. The array in such case will contain only one subscription.

"properties": {
"type": "object",
"description": "Properties of availability state.",
"properties": {
Copy link
Member

Choose a reason for hiding this comment

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

Looks like there is an extra properties object here?

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 think so.

@marstr marstr changed the base branch from current to master December 28, 2017 17:55
@@ -0,0 +1,876 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

In accordance with the new format, introduced late December 2017, please update this PR so that the "2018-01-01" directory is in either a folder named "stable" or "preview". e.g.

resource-manager/Microsoft.ResourceHealth/2018-01-01/ResourceHealth.json -> resource-manager/Microsoft.ResourceHealth/preview/2018-01-01/ResourceHealth.json

or

resource-manager/Microsoft.ResourceHealth/2018-01-01/ResourceHealth.json -> resource-manager/Microsoft.ResourceHealth/preview/2018-01-01/ResourceHealth.json

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

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

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

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@ravbhatnagar
Copy link
Contributor

Signed off!

@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 Jan 10, 2018
@HimanshuMisra1 HimanshuMisra1 changed the title Add new resource type /events for Azure service health events [DO-NOT-MERGE] Add new resource type /events for Azure service health events Jan 10, 2018
Copy link
Contributor

@olydis olydis left a comment

Choose a reason for hiding this comment

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

model validation error

"id": "<resourceId>/providers/Microsoft.ResourceHealth/impactedResources/current",
"name": "current",
"type": "Microsoft.ResourceHealth/impactedResources",
"location": "eastus",
Copy link
Contributor

Choose a reason for hiding this comment

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

having location here indicates that what you return is actually a tracked resource. Please make sure or adjust the example accordingly

@olydis
Copy link
Contributor

olydis commented Jan 17, 2018

@HimanshuMisra1 What's the timeline for this? Is this marked as "do not merge" because the service isn't live yet?

@olydis
Copy link
Contributor

olydis commented Jan 26, 2018

@salameer @HimanshuMisra1 closing due to inactivity. Feel free to reopen once you're ready to move on 🙂

@olydis olydis closed this Jan 26, 2018
@AutorestCI
Copy link

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

@AutorestCI
Copy link

Swagger to SDK encountered an unknown error: (Azure/azure-sdk-for-go)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 29, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 180, in rest_handle_action
    return rest_pull_close(body, github_con, restapi_repo, sdk_pr_target_repo, sdkbase)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 311, in rest_pull_close
    rest_pr.create_issue_comment("Was unable to create SDK %s PR for this closed PR.", sdkid)
TypeError: create_issue_comment() takes 2 positional arguments but 3 were given

@AutorestCI
Copy link

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

@AutorestCI
Copy link

Swagger to SDK encountered an unknown error: (Azure/azure-sdk-for-python)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/github_tools.py", line 29, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 180, in rest_handle_action
    return rest_pull_close(body, github_con, restapi_repo, sdk_pr_target_repo, sdkbase)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 311, in rest_pull_close
    rest_pr.create_issue_comment("Was unable to create SDK %s PR for this closed PR.", sdkid)
TypeError: create_issue_comment() takes 2 positional arguments but 3 were given

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 potential-sdk-breaking-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants