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

Add deployment APIs for Microsoft.Resources #5737

Merged
merged 13 commits into from
May 30, 2019

Conversation

Tiano2017
Copy link
Contributor

@Tiano2017 Tiano2017 commented Apr 23, 2019

Latest improvements:

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@AutorestCI
Copy link

AutorestCI commented Apr 23, 2019

Automation for azure-sdk-for-ruby

Nothing to generate for azure-sdk-for-ruby

@AutorestCI
Copy link

AutorestCI commented Apr 23, 2019

Automation for azure-sdk-for-python

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

@Tiano2017 Tiano2017 changed the title Tiano mg deployment Add deployment APIs for Microsoft.Resources Apr 23, 2019
@AutorestCI
Copy link

AutorestCI commented Apr 23, 2019

Automation for azure-sdk-for-go

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

Copy link
Contributor

@nschonni nschonni left a comment

Choose a reason for hiding this comment

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

The Suggestions will probably look off unless you look at them on the file tab. It's just some camelCase stuff

"x-ms-skip-url-encoding": true
},
{

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"tagName": {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gave it a try, but this seems to be a breaking change... I'm not sure if we can change it.

"x-ms-skip-url-encoding": true
},
{

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"tagValue": {

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@AutorestCI
Copy link

AutorestCI commented Apr 23, 2019

Automation for azure-sdk-for-js

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-js#3306

adxsdknet added a commit to adxsdknet/azure-sdk-for-net that referenced this pull request Apr 23, 2019
REST Spec PR 'Azure/azure-rest-api-specs#5737'
REST Spec PR Author 'Tiano2017'
REST Spec PR Last commit
@adxsdknet
Copy link

Automation for azure-sdk-for-net

A PR has been created for you:
Azure/azure-sdk-for-net#5906
.NET SDK Commits:
adxsdknet/azure-sdk-for-net@1c95204

@AutorestCI
Copy link

AutorestCI commented Apr 23, 2019

Automation for azure-sdk-for-java

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

Command: ['/usr/local/bin/autorest', '/tmp/tmp8fwf786y/rest/specification/resources/resource-manager/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmpvtix_ecy']
Finished with return code 7
and output:

AutoRest code generation utility [version: 2.0.4283; node: v8.12.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Failure:
Error: Unable to start AutoRest Core from /root/.autorest/@microsoft.azure_autorest-core@2.0.4373/node_modules/@microsoft.azure/autorest-core
Error: Unable to start AutoRest Core from /root/.autorest/@microsoft.azure_autorest-core@2.0.4373/node_modules/@microsoft.azure/autorest-core
    at main (/opt/node_modules/autorest/dist/app.js:232:19)
    at <anonymous>

/root/.autorest/@microsoft.azure_autorest-core@2.0.4373/node_modules/@microsoft.azure/autorest-core/dist/app.js:33
    autorest_core_1.Shutdown();
    ^
ReferenceError: autorest_core_1 is not defined
    at process.on (/root/.autorest/@microsoft.azure_autorest-core@2.0.4373/node_modules/@microsoft.azure/autorest-core/dist/app.js:33:5)
    at emitOne (events.js:121:20)
    at process.emit (events.js:211:7)
    at process.emit (/node_modules/source-map-support/source-map-support.js:439:21)
fs.js:612
  return binding.close(fd);
                 ^

Error: EBADF: bad file descriptor, close
    at Object.fs.closeSync (fs.js:612:18)
    at StaticVolumeFile.shutdown (/opt/node_modules/autorest/dist/static-loader.js:352:10)
    at StaticFilesystem.shutdown (/opt/node_modules/autorest/dist/static-loader.js:406:17)
    at process.exit.n [as exit] (/opt/node_modules/autorest/dist/static-loader.js:169:11)
    at printErrorAndExit (/node_modules/source-map-support/source-map-support.js:423:11)
    at process.emit (/node_modules/source-map-support/source-map-support.js:435:16)
    at process._fatalException (bootstrap_node.js:391:26)

@majastrz
Copy link
Member

majastrz commented Apr 23, 2019

  "name": "groupId",

This should be called managementGroupId to make it obvious. #Closed


Refers to: specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json:3884 in 561b51c. [](commit_id = 561b51c, deletion_comment = False)

@majastrz
Copy link
Member

majastrz commented Apr 23, 2019

  "description": "The name of the deployment to delete.",

The description doesn't match what this is. #Closed


Refers to: specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json:3888 in 561b51c. [](commit_id = 561b51c, deletion_comment = False)

@majastrz
Copy link
Member

majastrz commented Apr 23, 2019

      },

I wonder if we should refactor this into a parameter we reference like the others. If you agree to do it, we probably should only do it in 2019-05-01. #Closed


Refers to: specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json:117 in 561b51c. [](commit_id = 561b51c, deletion_comment = False)

@TianoMS
Copy link

TianoMS commented Apr 23, 2019

  "name": "groupId",

I was referring to what MG group team did for their APIs. They use "groupId" for this parameter..


In reply to: 485941229 [](ancestors = 485941229)


Refers to: specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json:3884 in dff86dc. [](commit_id = dff86dc, deletion_comment = False)

@TianoMS
Copy link

TianoMS commented Apr 23, 2019

  "description": "The name of the deployment to delete.",

will fix this one.


In reply to: 485941319 [](ancestors = 485941319)


Refers to: specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json:3888 in dff86dc. [](commit_id = dff86dc, deletion_comment = False)

@majastrz
Copy link
Member

majastrz commented Apr 23, 2019

@Tiano2017, the PutDeploymentAtManagementGroup.json file appears to be empty. And you've also got some checks failing right now. #Closed

@majastrz
Copy link
Member

  "name": "groupId",

ok


In reply to: 485942694 [](ancestors = 485942694,485941229)


Refers to: specification/resources/resource-manager/Microsoft.Resources/stable/2019-05-01/resources.json:3884 in 561b51c. [](commit_id = 561b51c, deletion_comment = False)

@majastrz majastrz added ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review ARMReviewInProgress WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Apr 23, 2019
@majastrz majastrz self-assigned this Apr 23, 2019
@majastrz majastrz self-requested a review April 23, 2019 19:36
@majastrz majastrz added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Apr 26, 2019
@shahabhijeet
Copy link
Member

@Tiano2017 does this PR has the new operation that we discussed offline?
Is this ready to be reviewed?

@Tiano2017
Copy link
Contributor Author

@Tiano2017 does this PR has the new operation that we discussed offline?
Is this ready to be reviewed?

Not yet.. Let me close on that and will let you know once it's ready for review.

@@ -59,6 +59,321 @@
}
}
},
"/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}": {
Copy link
Member

Choose a reason for hiding this comment

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

@Tiano2017 let's make the parameter token consistent across all operations
let's make it managementGroupId as mentioned on line 215

Copy link
Contributor Author

@Tiano2017 Tiano2017 May 22, 2019

Choose a reason for hiding this comment

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

sure. actually we want "groupId" as the parameter name, but I'll make it consistent in the file.

"in": "path",
"required": true,
"type": "string",
"description": "The resource t
Copy link
Member

Choose a reason for hiding this comment

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

@Tiano2017 make this managementGroupId in order to be consistent with the parameter being used in operation paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will make everywhere "groupId".

"in": "path",
"required": true,
"type": "string",
"description": "The resource t
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you make the description as Name of the deployement, remove leading "the"

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'll leave it. BTW, you can do a compare with my first iteration to see what I changed. Basically the first iteration was copied from the previous version.

"in": "path",
"required": true,
"type": "string",
"description": "The resource t
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you make the description as "target subscription Id" instead of leading with "The"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will leave them since it's copied from the previous version.

"in": "path",
"required": true,
"type": "string",
"description": "The resource t
Copy link
Member

Choose a reason for hiding this comment

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

nit: remove leading "the"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same

"in": "path",
"required": true,
"type": "string",
"description": "The resource t
Copy link
Member

Choose a reason for hiding this comment

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

nit: Get Deployment Operation Id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same

"in": "path",
"required": true,
"type": "string",
"description": "The name of the deployment.",
Copy link
Member

Choose a reason for hiding this comment

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

nit: name of the deployment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same

@@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "ResourceManagementClient",
"version": "2018-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.

So we had this API version? That's bad. I assume, now we may have some SDK breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we haven't released any package with this swagger, so I think it's still fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Tiano2017 as far as I know, if the spec was merged to master, some SDK packages could be released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what's the right approach here. This change is more like fixing a bug, and I assume it's only going to impact future versions of packages. can we assume it's safe in that case?

# Conflicts:
#	specification/resources/resource-manager/readme.md
@sergey-shandar
Copy link
Contributor

@shahabhijeet could you have a look one more time.

@shahabhijeet
Copy link
Member

@Tiano2017 lost entire context :), will sync with @sergey-shandar and will get back on this PR by EOD today.

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.

9 participants