-
Notifications
You must be signed in to change notification settings - Fork 5
Enhanced unified function to handle errors, added NoWait
and fix endless loop for LRO
#132
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
base: develop
Are you sure you want to change the base?
Conversation
Added -NoWait for New-FabricSQLDatabase function #123
NoWait
and fix endless loop for LRO
Linux Test Results4 864 tests 4 863 ✅ 41s ⏱️ Results for commit d317037. ♻️ This comment has been updated with latest results. |
WinPS51 Test Results5 068 tests 5 067 ✅ 55s ⏱️ Results for commit d317037. ♻️ This comment has been updated with latest results. |
WinPS71 Test Results5 068 tests 5 067 ✅ 53s ⏱️ Results for commit d317037. ♻️ This comment has been updated with latest results. |
So that you understand, this is one of my bug bears and I am frequently on video saying that I will call it out publicly when I see it so I am duty bound to do this :-) Please do not use the commit message for the what was done as that does not provide value. To summarise an hour long session, The commit message should be the why it was done or the intended result of the change so that the commit history is of use to future you and your team. I am not asking you to change the three commits that you have done in this PR but please, from this point on. |
Hey @NowinskiK - some good updates, thanks for the PR! Just a reminder though to try and keep each PR small and representing one logical change, not always easy I know! But it's ok to open multiple PRs for different things - just makes reviewing and testing easier. |
Co-authored-by: Jess Pomfret <jpomfret7@gmail.com> Signed-off-by: Kamil Nowinski <kamil@nowinski.net>
@NowinskiK - please read the comment about commit messages. |
Co-authored-by: Jess Pomfret <jpomfret7@gmail.com> Signed-off-by: Kamil Nowinski <kamil@nowinski.net>
@jpomfret, yes, I know, I remember and agree. Believe me, 😊 I already minimised the scope of this PR as I was working on new sets of features when I noticed this error. The other functions in this change set are mainly for testing the fixed approach. |
Read this. Makes sense! I will do my best and improve moving forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- In the Test-FabricApiResponse, there will be LROs with no results, so we need to consider how to handle these scenarios (I got stuck on this and my solution was to add a new parameter. Let's work together to see if there's a better approach). Otherwise, you'll end up with an object that has an error column saying there's no result.
- Now, there are two calls that must be made in a function: Invoke-FabricRestMethod and Test-FabricApiResponse. This means whenever a new function is developed, it must call Test-FabricApiResponse, and people might forget. My suggestion is to make this call inside Test-FabricApiResponse. That way, there's only one place to change in the future if needed.
@tiagobalabuch thanks for the input. |
…t tests for the function.
Signed-off-by: Kamil Nowinski <kamil@nowinski.net>
@NowinskiK and I had a call and decided to keep two separate functions for now. For LRO with no results, we'll leave it as is since the function currently returns the results. |
OperationId is string here, because sometimes it might be empty
Pull Request
Fixes #131
Fixes #123
Pull Request (PR) description
Get-FabricSQLDatabase
,Get-FabricSQLDatabase
NoWait
switch parameter toNew-FabricSQLDatabase
Test-FabricApiResponse
to handle API results and moved it to private functionsRemove-FabricSQLDatabase
uses unified function to handle API resultsGet-FabricLongRunningOperation
- Uri was incorectly createdGet-FabricLongRunningOperationResult
- uses correct statusCodeInvoke-FabricRestMethod
and output results in debug modeTask list
build.ps1 -ResolveDependency -Tasks build, test
).