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

SQL database, elastic pool, and capabilities 2017-10-01-preview #2734

Merged
merged 12 commits into from
Mar 27, 2018

Conversation

jaredmoo
Copy link
Contributor

@jaredmoo jaredmoo commented Mar 22, 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

Rename 2017-03 ArmSku->Sku, Status->DatabaseStatus and added OnlineSecondary CreateMode. These changes should make 2017-03 db client compatible with 2017-10 db.
Introduced both recommendedElasticPools.json and recommendedElasticPoolsDecoupled.json. These files are identical except that recommendedElasticPools.json references 2014 Database resource, recommendedElasticPoolsDecoupled.json references TrackedResource so that it can be versioned independently of database api.
@AutorestCI
Copy link

AutorestCI commented Mar 22, 2018

Automation for azure-sdk-for-python

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

Differences against package-composite-v2:
- 2014-04-01/recommendedElasticPoolsDecoupled.json used instead of 2014-04-01/recommendedElasticPools.json so that recommendedElasticPools is separated from databases. This allows us to update database and recommendedElasticPools apis independently.
- databases.json, elasticPools.json, and capabilities.json updated from 2014-04-01 to 2017-10-01-preview versions.
- 2017-03-01-preview/renameDatabase.json removed since the rename api is there in 2017-10-01-preview/databases.json
@jaredmoo
Copy link
Contributor Author

The service is not yet fully deployed, but it is ok to merge because package-composite-v3 is not yet default tag. When the service is available in production, @payiAzure will issue follow-up PR where she updates the default tag to package-composite-v3.

@AutorestCI
Copy link

AutorestCI commented Mar 22, 2018

Automation for azure-libraries-for-java

The initial PR has been merged into your service PR:
AutorestCI/azure-libraries-for-java#9

@AutorestCI
Copy link

AutorestCI commented Mar 22, 2018

Automation for azure-sdk-for-go

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

@AutorestCI
Copy link

AutorestCI commented Mar 22, 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#2489

@jaredmoo
Copy link
Contributor Author

There are some model validation errors in RecommendedElasticPools_ListByServer that I am not planning to fix. The model change is deliberate in order to decouple Database API from RecommendedElasticPools.

"description": "The name of the SKU, typically, a letter + Number code, e.g. P3.",
"type": "string"
},
"tier": {
Copy link
Contributor

Choose a reason for hiding this comment

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

tier [](start = 9, length = 4)

Could this be an enum?

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 do in another PR later.

}
}
},
"parameters": {
Copy link
Contributor

Choose a reason for hiding this comment

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

parameters [](start = 3, length = 10)

There are many parameters in this list that are not used in this swagger in particular. I they are not used in other swaggers by reference, the best would be to remove them, to keep swaggers cleaner

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood but these swaggers are generated, it is easier to keep the extra parameters.

"description": "The name of the SKU, typically, a letter + Number code, e.g. P3.",
"type": "string"
},
"tier": {
Copy link
Contributor

Choose a reason for hiding this comment

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

tier [](start = 9, length = 4)

Same here, I believe this could be an enum

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 do in future PR.

}
}
},
"Sku": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sku [](start = 5, length = 3)

Looks like this definition is also present in the capabilities folder. Is it a good idea to define it just one and reference it form other files? WDYT?

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 do in future PR.

"format": "uuid",
"description": "The ID of the database.",
"type": "string",

Copy link
Contributor

Choose a reason for hiding this comment

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

currentSku [](start = 9, length = 10)

This question is out of curiosity. Is there really a sku property under properties and another under database?

"format": "uuid",
"description": "The ID of the database.",
"type": "string",

Copy link
Contributor

Choose a reason for hiding this comment

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

parameters [](start = 3, length = 10)

Same here. There are many parameters not used here, and it does not look like they are used in other files. Lets keep swagger clean

Copy link
Contributor

@mcardosos mcardosos left a comment

Choose a reason for hiding this comment

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

Cool, added some comments. Many of them are nice-to-have (if you feel inspired, you are welcome to do them in a different PR). There are also linter and model validation errors to fix :D

@mcardosos
Copy link
Contributor

@mcardosos mcardosos added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Mar 23, 2018
@jaredmoo
Copy link
Contributor Author

Yeah, these remaining warnings are all in existing files that are unrelated to this change. I don't know why they are showing up for this PR, but I won't fix them.

@jaredmoo
Copy link
Contributor Author

More specifically:

  • Missing descriptions: in existing longTermRetention.json file that this PR did not touch.
  • Consider changing operation name: these are already used in SDKs so would be SDK breaking change.
  • Model validation: these are due to genuine service bug where these old api versions are actually not returning time zone in the datetime string. They are unrelated to this change, just showing up because I modified sql.core.json where these are used.

@mcardosos
Copy link
Contributor

Some of them are related to this PR. Let me specify better some of them:

  • Model validation error. This error is on specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/capabilities.json file.
  • Other errors I linked specify which lines from the CI logs to take a look at.

I recommend searching for 2017-10-01-preview in the CI logs for the model validation and the linter, so you don't even look at issues from other files.

@jaredmoo
Copy link
Contributor Author

jaredmoo commented Mar 24, 2018

Thank you for your attention to detail and spotting these warnings that I had missed :)

Copy link
Contributor

@mcardosos mcardosos left a comment

Choose a reason for hiding this comment

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

Super :)

@jaredmoo
Copy link
Contributor Author

Thanks so much Mariana! I am going on vacation so another one of my teammates such as @payiAzure or @nathannfan will confirm when it has reached the first production cluster and is therefore ready to merge. :)

@payiAzure
Copy link
Contributor

@mcardosos , @jaredmoo, @nathannfan Hi Mariana, I just confirmed that our changes reached the first production cluster on Sunday, and it is ready to merge this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants