-
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
SqlServerDsc: Improvement to how Import-SQLPSModule import module #1175
Conversation
- Updated helper function `Import-SQLPSModule` - To only import module if the module does not exist in the session. - To always import the latest version of 'SqlServer' or 'SQLPS' module, if more than one version exist on the target node. It will still prefer to use 'SqlServer' module. - Changes to SqlAG - Removed excess `Import-SQLPSModule` call. - Changes to SqlSetup - Now after a successful install the "SQL PowerShell module" is reevaluated and forced to be reimported into the session. This is to support that a never version of SQL Server was installed side-by-side so that SQLPS module should be used instead.
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.
Reviewed 3 of 9 files at r1.
Reviewable status: 3 of 9 files reviewed, all discussions resolved
Codecov Report
@@ Coverage Diff @@
## dev #1175 +/- ##
=====================================
+ Coverage 97% 97% +<1%
=====================================
Files 33 33
Lines 3994 4012 +18
=====================================
+ Hits 3907 3925 +18
Misses 87 87 |
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.
Reviewed 6 of 9 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion
DSCResources/MSFT_SqlSetup/MSFT_SqlSetup.psm1, line 1458 at r1 (raw file):
if newer version was installed.
"...in case a newer version was installed"
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.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
DSCResources/MSFT_SqlSetup/MSFT_SqlSetup.psm1, line 1458 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
if newer version was installed.
"...in case a newer version was installed"
Done
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.
Merging this when the tests passes.
Reviewable status: complete! all files reviewed, all discussions resolved
Closing and reopening to kick off the tests igen (resolved bug in the test framework that cause the test from failing) |
Pull Request (PR) description
Import-SQLPSModule
module does not exist in the session.
more than one version exist on the target node. It will still prefer to
use 'SqlServer' module.
Import-SQLPSModule
call.forced to be reimported into the session. This is to support that a never
version of SQL Server was installed side-by-side so that SQLPS module should
be used instead.
This Pull Request (PR) fixes the following issues
Helps with issue #1151
Task list
should say what was changed, and how that affects users (if applicable).
and comment-based help?
See DSC Resource Testing Guidelines.
See DSC Resource Testing Guidelines.
DSC Resource Style Guidelines
and Best Practices?
This change is