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

A series of Public swagger update (modification) #6064

Merged
merged 15 commits into from
Jun 13, 2019

Conversation

Yiliu-microsoft
Copy link
Contributor

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 May 22, 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#3778

@AutorestCI
Copy link

AutorestCI commented May 22, 2019

Automation for azure-sdk-for-ruby

Nothing to generate for azure-sdk-for-ruby

@AutorestCI
Copy link

AutorestCI commented May 22, 2019

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#5747

@AutorestCI
Copy link

AutorestCI commented May 22, 2019

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#4990

@AutorestCI
Copy link

AutorestCI commented May 22, 2019

Automation for azure-sdk-for-java

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

Command: ['/usr/local/bin/autorest', '/tmp/tmpxkumramh/rest/specification/datafactory/resource-manager/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmp5mro5nd8']
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)

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@hvermis
Copy link
Contributor

hvermis commented May 23, 2019

@Yiliu-microsoft Please make sure to fix all checks as well

@hvermis hvermis self-requested a review May 23, 2019 18:21
Copy link
Contributor

@hvermis hvermis left a comment

Choose a reason for hiding this comment

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

Please address comments

adxsdknet added a commit to adxsdknet/azure-sdk-for-net that referenced this pull request May 29, 2019
REST Spec PR 'Azure/azure-rest-api-specs#6064'
REST Spec PR Author 'Yiliu-microsoft'
REST Spec PR Last commit
@adxsdknet
Copy link

adxsdknet commented May 29, 2019

Automation for azure-sdk-for-net

A PR has been created for you:
Azure/azure-sdk-for-net#6429
.NET SDK Commits:
adxsdknet/azure-sdk-for-net@0d8ebe7
adxsdknet/azure-sdk-for-net@c85b5c9
adxsdknet/azure-sdk-for-net@cde3db1

Copy link
Member

@shahabhijeet shahabhijeet left a comment

Choose a reason for hiding this comment

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

I will need an approval from someone from your team in addition to addressing to couple of breaking changes you have introduced in this PR

@@ -197,7 +330,7 @@
},
"JsonFormatFilePattern": {
"description": "JSON format file pattern. A property of JsonFormat.",
"type": "string",
"type": "object",
Copy link
Member

Choose a reason for hiding this comment

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

breaking change in a stable version?
Any reason this cannot be done in the next API version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I invited Hermine to explain this change, please wait a moment.

Copy link
Contributor

Choose a reason for hiding this comment

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

@shahabhijeet the type is changing from string to object, so it's not API breaking change as our service will accept both.
We could mark the SDK-s with breaking tag if you think it's appropriate, however we had another PR like this that wasn't marked.

Copy link
Member

Choose a reason for hiding this comment

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

@hvermis it is a binary breaking change.
I was concerned about a scenario where your customer has written code against your model as

JsonFormat.FilePattern.ToLower().StartWith("array")

Also what I noticed that you have modeled your enum as "modelAsString", but you would like to make a change from string to object?

Copy link
Contributor

Choose a reason for hiding this comment

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

@shahabhijeet We'll mark the SDK release as breaking.

@@ -313,7 +446,7 @@
"CompressionLevel": {
"title": "Microsoft.Azure.Management.DataFactories.Models.CompressionLevel",
"description": "All available compression levels.",
"type": "string",
"type": "object",
Copy link
Member

Choose a reason for hiding this comment

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

breaking change

Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Jun 4, 2019

SDK Automation [Logs] (Generated from 41ae155)

Copy link
Member

@shahabhijeet shahabhijeet left a comment

Choose a reason for hiding this comment

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

I have asked ARM review for this.
What I would like to know is, can you make such changes in stable APIs?
I would like to understand such process, which will help me in future reviews.

@@ -197,7 +330,7 @@
},
"JsonFormatFilePattern": {
"description": "JSON format file pattern. A property of JsonFormat.",
"type": "string",
"type": "object",
Copy link
Member

Choose a reason for hiding this comment

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

@hvermis it is a binary breaking change.
I was concerned about a scenario where your customer has written code against your model as

JsonFormat.FilePattern.ToLower().StartWith("array")

Also what I noticed that you have modeled your enum as "modelAsString", but you would like to make a change from string to object?

@hvermis
Copy link
Contributor

hvermis commented Jun 4, 2019

@shahabhijeet All these changes are again to support oneOf scenario. The reason we are changing types to object is so our customers can parametrize those properties. Our UI and backend already allow this, only SDK-s are pending.

@hvermis
Copy link
Contributor

hvermis commented Jun 6, 2019

@shahabhijeet and @KrisBash Could you please help get this PR in? It contains a lot of features that our customers are waiting for and we need to release our SDKs.

Copy link
Contributor

@KrisBash KrisBash left a comment

Choose a reason for hiding this comment

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

Discussion about SDK breaking changes aside, there were quite a few properties changed to type: object, but with string enums and modelAsString=true. That seems spurious?

@@ -1148,10 +1148,11 @@
},
"StoredProcedureParameterType": {
"description": "Stored procedure parameter type.",
"type": "string",
"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.

If all allowed enum values are a string, why change to object?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is to support Expressions on these properties. OpenApi 2.0 doesn't support oneOf, and we are forced to use object type in order to support parameterization, which is an important feature of ADF for our customers. It allows them to treat their entities as templates and pass different values for properties.

@@ -1206,7 +1207,7 @@
"properties": {
"writeBehavior": {
"description": "The write behavior for the operation. Default is 'Insert'.",
"type": "string",
"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.

Like the above, does this need to be an object if allowed values are all strings?

"type": "object",
"description": "Username to access the SAP server where the table is located. Type: string (or Expression with resultType string)."
},
"password": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Friendly reminder: please ensure that the server never returns secrets on get nor logs requests.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is already taken care of - we encrypt all secrets, and our service returns only encrypted values.

@KrisBash KrisBash added ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review and removed ARMReviewInProgress labels Jun 7, 2019
@hvermis
Copy link
Contributor

hvermis commented Jun 7, 2019

@KrisBash This is the PR that we need merged. Can you please finish reviewing this one? I will follow up with Yi to close any others, if they are irrelevant.

@nschonni
Copy link
Contributor

nschonni commented Jun 7, 2019

FYI, you can add bzip to https://github.com/Azure/azure-rest-api-specs/blob/master/custom-words.txt if you want the spellcheck to pass. The other issue it was flagging in a different PR was fixed in master

@hvermis
Copy link
Contributor

hvermis commented Jun 10, 2019

@KrisBash @shahabhijeet We need to release this new SDK with Powershell release that is going out on 6/18.
Can you please help as we have a lot of customers waiting for the features in this PR?

@@ -205,6 +205,511 @@
"type": "object"
}
},
"ConnectorReadSetting": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are the type names here Setting vs Settings?

Copy link
Contributor

Choose a reason for hiding this comment

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

Applies to all names

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 change "description": "Connector read settings." to "description": "Connector read setting."

Copy link
Contributor

@KrisBash KrisBash left a comment

Choose a reason for hiding this comment

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

No objection from ARM, assuming changes are legitimate in SDK

@KrisBash KrisBash added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jun 13, 2019
@shahabhijeet shahabhijeet merged commit 9060257 into Azure:master Jun 13, 2019
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.