-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
PowerShell .NET SDK Upgrade With V2020-02-02 ShortTermRetention (STR) of SQL DB. #13782
Conversation
1) Unit testst not passed (Backend MS changes not finished yet). TODO:Re-run tests and re-copy test session. 2) STR API swagger in feature branch rather than master. TODO: Re-generate clients.
.../Microsoft.Azure.Management.SqlManagement/src/eng/mgmt/mgmtmetadata/sql_resource-manager.txt
Outdated
Show resolved
Hide resolved
...anagement/Microsoft.Azure.Management.SqlManagement/src/Microsoft.Azure.Management.Sql.csproj
Outdated
Show resolved
Hide resolved
...gement/Microsoft.Azure.Management.SqlManagement/src/Generated/SdkInfo_SqlManagementClient.cs
Show resolved
Hide resolved
@isra-fel The auto generate cmd can generate more unrelated changes. Some files I can undo them so they will not included in PR but some files have both mine and other unrelated changes so I can't undo them. And the auto generated file looks like can't be modified manually, then what should I do? // Last time since I know the client generated from feature branch rather than master swagger branch, so I manually edit some files. But now, since I generated clients via swagger master branch, so I suppose I can't manually fix files right? For example in SdkInfo_SqlManagementClient.cs, if both of them were modified, the Capabilities is not related my changes, but the BackupSTRPolicies related my changes. What should I do?
I temp keep previous changes and not include any unrelated changes. Please let me know if this is not correct way. |
@lululilliancoding never edit generated code. I suggest you talk to who contributed to last release, and define what exactly you want to put in the SDK. |
I edit my change to readme.md, see: Tag: package-composite-v3 - Microsoft.Sql/preview/2020-02-02-preview/shortTermRetentionPolicies.json, I generate client files via master branch of azure-rest-api-specs so does there are many un-related clients generated. How can I avoid them without manually fix auto generated files? |
Just verified with Alicia (released PS .net sdk last year), as she said it is ok to leave un-related changes but don't manually fix auto generated files. I'll update in next push. -- I correct this, the dev manually fixed. |
Why this PR1 and PR2 can only include their related changes on file SqlManagementClient.cs? I mentioned the PR1 updated the version from 1.44.0.0 to 1.44.1.0 |
…ShortTermRetentionPolicy
This PR has expected build error "Sql.Tests.ShortTermRetentionTests failed" since no live API deployed to Stage yet. |
We asked our partners not to modify generated code, but to be honest, even if they did, we won't know. That's why sometimes modified source code got checked in.
I agree with you. Modifying source code seems to be the best choice for now. I do hope some day SQL team could work out a new version that is completely consistant with swagger.
Technically both are OK. 1.45.0 is more preferable. BTW since SQL is a big team, I suggest you have someone in charge of .net SDK release. It could help with more consistent versioning, stable release cadence, and reduce communication cost, resulting in better SDK quality. |
Totally agreed. We need a major clean up. |
@lululilliancoding Please fix merge conflicts, we can't review till this branch is up to date. |
We (server side) are waiting for the backend code deployed to cluster Stage to unblock scenario tests otherwise this PR still gonna be blocked. Will keep updated this PR once we got a live API and fix no matter conflict or new versions at that time. Thanks a lot guys. |
@lululilliancoding I am going to close this PR. You can raise a new PR once the service-side issues are resolved. |
Can you reopen this PR? The backend code changes deployed to Stage already. @markcowl |
Generate new version of .NET SDK for new API V2020-02-02-Preview ShortTermRetentionPolicy.
TODO:
After SQL DB API specification (Add V2020-02-02-Preview ShortTermRetention API Specification of SQL DB azure-rest-api-specs#9407) merged into master, re-generate clients. (../src/Generated...) DONE
After API deployed to Stage, re-run unit tests and re-record its test sessions. (../tests/SessionRecords/ShortTermRetentionTests/..)
Sync with latest master and fix a new sdk version. (.../Microsoft.Azure.Management.Sql.csproj, .../AssemblyInfo.cs)
We want to start code review early before above TODO items completed.
So please ignore TODO items for now and leave comments on this PR. You don't have to approve at this moment.