-
Notifications
You must be signed in to change notification settings - Fork 225
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
SqlDatabase: Support Changing Snapshot Isolation #1622
base: main
Are you sure you want to change the base?
Conversation
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.
Awesome work on this one! Thank you! Found som logic changes that need to be implemented.
Reviewed 5 of 6 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @awickham10)
source/DSCResources/DSC_SqlDatabase/DSC_SqlDatabase.psm1, line 77 at r2 (raw file):
$null
I think we need to set this to the value $false
instead. It would be more natural for it to return either $false or $true, and the comparison in Test-function would be more intuitive (it would otherwise compare against $null
). 🤔
source/DSCResources/DSC_SqlDatabase/DSC_SqlDatabase.psm1, line 323 at r2 (raw file):
try { $sqlDatabaseObjectToCreate = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Database' -ArgumentList $sqlServerObject, $Name
It must also set isolation level when the database is created. Probably why the integration test is failing.
tests/Integration/DSC_SqlDatabase.Integration.Tests.ps1, line 290 at r2 (raw file):
$configurationName = "$($script:dscResourceName)_AddDatabase6_Config"
Can we also add a test that turns off or on isolation level on an existing database, to test that part of the code?
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @awickham10)
tests/Integration/DSC_SqlDatabase.Integration.Tests.ps1, line 386 at r2 (raw file):
Should -BeNullOrEmpty
if the change in the Get-TargetResource is done (see other comment) then this should be changed to Should -BeFalse
.
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
Pull Request (PR) description
Add the ability to change snapshot isolation on a database.
This Pull Request (PR) fixes the following issues
Closes #845
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
This change is