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

Import-SqlDscPreferredModule: Add new command #1846

Merged
merged 7 commits into from
Feb 5, 2023

Conversation

johlju
Copy link
Member

@johlju johlju commented Feb 4, 2023

Pull Request (PR) description

  • SqlServerDsc
    • The following public functions were added to the module (see comment-based
      help for more information):
      • Import-SqlDscPreferredModule
    • The module will now call Import-SqlDscPreferredModule when the module
      is imported to make sure SqlServer (default preferred module) or SQLPS
      is loaded into the session. This will make it possible for classes and
      commands to use and return SQL types. If no module is found it will
      output a warning to install any of the dependent modules.
  • SqlServerDsc.Common
    • Import-SQLPSModule
      • The function was changed to call public command Import-SqlDscPreferredModule.

This Pull Request (PR) fixes the following issues

Closes #654

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings updated.
  • Examples updated.
  • Unit tests updated. See DSC Community Testing Guidelines.
  • Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

@johlju johlju added the needs review The pull request needs a code review. label Feb 4, 2023
@codecov
Copy link

codecov bot commented Feb 4, 2023

Codecov Report

Merging #1846 (1438c1c) into main (3a46100) will decrease coverage by 1%.
The diff coverage is 95%.

Impacted file tree graph

@@         Coverage Diff          @@
##           main   #1846   +/-   ##
====================================
- Coverage    91%     91%   -1%     
====================================
  Files        71      73    +2     
  Lines      7363    7366    +3     
====================================
+ Hits       6715    6716    +1     
- Misses      648     650    +2     
Flag Coverage Δ
unit 91% <95%> (-1%) ⬇️
Impacted Files Coverage Δ
source/suffix.ps1 33% <33%> (ø)
...dules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 98% <100%> (-1%) ⬇️
source/Public/Import-SqlDscPreferredModule.ps1 100% <100%> (ø)

Copy link
Member Author

@johlju johlju left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 75 of 78 files at r1, 6 of 6 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @johlju)

@johlju johlju merged commit 49cf40c into dsccommunity:main Feb 5, 2023
@johlju johlju deleted the f/add-import-preferredmodule branch February 5, 2023 16:24
@johlju johlju removed the needs review The pull request needs a code review. label Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SqlServerDscHelper: Import-SQLPSModule should write which version it loads together with the name
1 participant