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

Refactoring DSCNodeConfigurationCreate Parameters #3012

Merged
merged 2 commits into from
May 14, 2018
Merged

Refactoring DSCNodeConfigurationCreate Parameters #3012

merged 2 commits into from
May 14, 2018

Conversation

vrdmr
Copy link
Member

@vrdmr vrdmr commented May 4, 2018

Refactoring DSCNodeConfiguration to prevent the Autorest to not merge the models while generating the dot net client.
Also, fixed the DSCNodeConfiguration (2018-01-15) Get call to correct the response code. The service returns the 201 and fixing this to currently unblock out azure powershell release.


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

AutorestCI commented May 4, 2018

Automation for azure-libraries-for-java

Nothing to generate for azure-libraries-for-java

@AutorestCI
Copy link

AutorestCI commented May 4, 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#1959

@AutorestCI
Copy link

AutorestCI commented May 4, 2018

Automation for azure-sdk-for-node

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-node#2653

@AutorestCI
Copy link

AutorestCI commented May 4, 2018

Automation for azure-sdk-for-go

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

Command: ['/usr/local/bin/autorest', '/tmp/tmpxqs1o8xy/rest/specification/automation/resource-manager/readme.md', '--go', '--go-sdk-folder=/tmp/tmpxqs1o8xy/src/github.com/Azure/azure-sdk-for-go', '--multiapi', '[email protected]/autorest.go@~2.1.98', '--use-onever', '--verbose']
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/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4275)
   Loading AutoRest extension '@microsoft.azure/autorest.go' (~2.1.98->2.1.98)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.38->2.3.38)
Processing batch task - {"tag":"package-2015-10"} .
Processing batch task - {"tag":"package-2017-05-preview"} .
Processing batch task - {"tag":"package-2018-01-preview"} .
FATAL: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
   at System.String.LastIndexOf(Char value, Int32 startIndex, Int32 count)
   at AutoRest.Go.Model.CodeModelGo.PackageVerDir() in /opt/vsts/work/1/s/src/Model/CodeModelGo.cs:line 64
   at AutoRest.Go.Model.CodeModelGo.get_DefaultUserAgent() in /opt/vsts/work/1/s/src/Model/CodeModelGo.cs:line 83
   at AutoRest.Go.Model.CodeModelGo.get_UserAgent() in /opt/vsts/work/1/s/src/Model/CodeModelGo.cs:line 31
   at AutoRest.Go.Templates.VersionTemplate.<ExecuteAsync>d__1.MoveNext() in /opt/vsts/work/1/s/src/obj/Razor/Templates/VersionTemplate.cshtml:line 28
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at AutoRest.Core.CodeGenerator.<Write>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at AutoRest.Go.CodeGeneratorGo.<Generate>d__6.MoveNext() in /opt/vsts/work/1/s/src/CodeGeneratorGo.cs:line 91
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at AutoRest.Go.Program.<ProcessInternal>d__3.MoveNext() in /opt/vsts/work/1/s/src/Program.cs:line 107
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NewPlugin.<Process>d__15.MoveNext()
FATAL: go/generate - FAILED
FATAL: Error: Plugin go reported failure.
Process() cancelled due to exception : Plugin go reported failure.
Failure during batch task - {"tag":"package-2018-01-preview"} -- Error: Plugin go reported failure..
  Error: Plugin go reported failure.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(87 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️1 new Warnings.(132 total)
Code Id Source Message
DescriptionAndTitleMissing R4000 Link 'DscNodeConfigurationCreateOrUpdateParameters' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(87 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(131 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

1 similar comment
@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(131 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(87 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@sergey-shandar sergey-shandar added potential-sdk-breaking-change WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels May 4, 2018
@sergey-shandar
Copy link
Contributor

@vrdmr Should we make these breaking changes in a new API version?

@ravbhatnagar
Copy link
Contributor

@vrdmr - Looks like the shape of a model has changed. This is a existing APi-version. Do you intend to make this change for an existing api-version?

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(131 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(87 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@@ -1482,32 +1482,6 @@
},
"description": "Definition of the DSC Meta Configuration."
},
"DscNodeConfigurationCreateOrUpdateParameters": {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved these definitions to 2015-10-31/DscNodeConfiguration.json

@@ -293,6 +293,78 @@
],
"description": "Definition of the dsc node configuration."
},
"ContentSource": {
Copy link
Member Author

Choose a reason for hiding this comment

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

Added the definitions from Defnitions.json to this file.

@@ -438,10 +439,6 @@
"$ref": "#/definitions/ContentSource",
"description": "Gets or sets the source."
},
"name": {
Copy link
Member Author

@vrdmr vrdmr May 8, 2018

Choose a reason for hiding this comment

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

Corrected the model. The Name is not in the top-level property for the Body Parameter.

@@ -3,7 +3,6 @@
"subscriptionId": "subid",
"resourceGroupName": "rg",
"automationAccountName": "myAutomationAccount20",
"credentialName": "myCredential",
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 was wrong param being sent in the example.

@vrdmr
Copy link
Member Author

vrdmr commented May 8, 2018

@ravbhatnagar - The model change is to make it at par with the service now. The "name" was added. (I've added comments for each file now.

@vrdmr
Copy link
Member Author

vrdmr commented May 8, 2018

@sergey-shandar - The 2015-refactoring is just moving the definitions around to prevent the autorest generation issues that we are seeing in the SDK due to the new 2018-01-15 API spec for DSCNodeConfiguration.

@vrdmr vrdmr changed the title Refacroting DSCNodeConfigurationCreate Parameters Refactoring DSCNodeConfigurationCreate Parameters May 9, 2018
@vrdmr
Copy link
Member Author

vrdmr commented May 11, 2018

@ravbhatnagar @sergey-shandar Could you please take a look at this PR. Thanks.

@ravbhatnagar
Copy link
Contributor

@vrdmr - Sounds good. Since the service never used to return this model, it should be fine. Signing off from ARM side.

@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 11, 2018
@vrdmr
Copy link
Member Author

vrdmr commented May 11, 2018

Thanks, @ravbhatnagar. @sergey-shandar - Could you please take a look at this PR.

@sergey-shandar sergey-shandar merged commit 0cecb10 into Azure:master May 14, 2018
@vrdmr
Copy link
Member Author

vrdmr commented May 14, 2018

Thanks, @sergey-shandar.

@vrdmr vrdmr deleted the vameru-dsc-refactor branch July 16, 2018 18:22
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.

5 participants