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

SqlInstall: New resource #1912

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

johlju
Copy link
Member

@johlju johlju commented Apr 15, 2023

Pull Request (PR) description

  • SqlServerDsc
    • New class-based resource:
      • SqlInstall - Handles the Microsoft SQL Server setup action Install.

This Pull Request (PR) fixes the following issues

Partly helps with #1781 .

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


This example shows how to call the resource using Invoke-DscResource.
#>
[DscResource(RunAsCredential = 'Optional')]

Check failure

Code scanning / PSScriptAnalyzer

The DSC resource 'SqlInstall' must have at least one key property (using the syntax [DscProperty(Key)].) Error

The DSC resource 'SqlInstall' must have at least one key property (using the syntax [DscProperty(Key)].)

This example shows how to call the resource using Invoke-DscResource.
#>
[DscResource(RunAsCredential = 'Optional')]

Check failure

Code scanning / PSScriptAnalyzer

The DSC resource 'SqlInstall' is missing a Test method that returns [bool] and accepts no parameters. Error

The DSC resource 'SqlInstall' is missing a Test method that returns [bool] and accepts no parameters.
ServerName = $this.ServerName
}

$serverObject = $this.GetServerObject()

Check warning

Code scanning / PSScriptAnalyzer

The variable 'currentInstalledServiceNames' is assigned but never used. Warning

The variable 'currentInstalledServiceNames' is assigned but never used.
a value.
#>
hidden [void] AssertProperties([System.Collections.Hashtable] $properties)
{

Check warning

Code scanning / PSScriptAnalyzer

Empty End block. Warning

Empty End block.
@johlju johlju added the waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. label Apr 15, 2023
@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Attention: 427 lines in your changes are missing coverage. Please review.

Comparison is base (a9f8f26) 94% compared to head (f568f52) 89%.
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##           main   #1912    +/-   ##
=====================================
- Coverage    94%     89%    -5%     
=====================================
  Files        93     119    +26     
  Lines      7844    8285   +441     
=====================================
+ Hits       7424    7438    +14     
- Misses      420     847   +427     
Flag Coverage Δ
unit 89% <3%> (-5%) ⬇️
Files Coverage Δ
source/Classes/011.SqlResourceBase.ps1 83% <ø> (ø)
source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 98% <ø> (ø)
...dules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 96% <ø> (ø)
source/Private/ConvertFrom-ServiceStartMode.ps1 100% <100%> (ø)
source/Private/Get-InstanceId.ps1 100% <100%> (ø)
source/Private/Get-RegistryPropertyValue.ps1 100% <100%> (ø)
...blic/Test-SqlDscIsIntegrationServicesInstalled.ps1 0% <0%> (ø)
...ublic/Test-SqlDscIsMasterDataServicesInstalled.ps1 0% <0%> (ø)
...lDscIsBackwardCompatibilityComponentsInstalled.ps1 0% <0%> (ø)
...ource/Public/Test-SqlDscIsBooksOnlineInstalled.ps1 0% <0%> (ø)
... and 19 more

@johlju johlju force-pushed the f/install-class-based-resource branch from 419de3c to 8088506 Compare April 16, 2023 09:41
@github-actions
Copy link

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.

@github-actions github-actions bot added the abandoned The pull request has been abandoned. label May 16, 2023
@johlju
Copy link
Member Author

johlju commented May 23, 2023

This is a big undertaking creating this resource and at the same time trying to re-invent the logic to be (hopefully) more efficient. But hopefully that will make it quicker to create the other setup action resources.

@github-actions github-actions bot removed the abandoned The pull request has been abandoned. label May 24, 2023
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

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.

@github-actions github-actions bot added abandoned The pull request has been abandoned. and removed abandoned The pull request has been abandoned. labels Jun 7, 2023
@johlju johlju force-pushed the f/install-class-based-resource branch from 66de733 to e0af130 Compare June 18, 2023 09:36
#>
$currentInstalledServiceNames = (Get-SqlDscManagedComputerService).Name

$serverObject = $this.GetServerObject()

Check warning

Code scanning / PSScriptAnalyzer

The variable 'serverObject' is assigned but never used. Warning

The variable 'serverObject' is assigned but never used.
@johlju johlju force-pushed the f/install-class-based-resource branch 2 times, most recently from 66de733 to be3c785 Compare June 18, 2023 13:05
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

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.

@github-actions github-actions bot added the abandoned The pull request has been abandoned. label Jul 3, 2023
@github-actions github-actions bot removed the abandoned The pull request has been abandoned. label Jul 11, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot added the abandoned The pull request has been abandoned. label Jul 26, 2023
@johlju
Copy link
Member Author

johlju commented Sep 30, 2023

I'm gonna try to pick this up again, this is a very complex work, reimagine how Get-function works.

@github-actions
Copy link

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.

@github-actions github-actions bot added the abandoned The pull request has been abandoned. label Oct 16, 2023
@johlju johlju force-pushed the f/install-class-based-resource branch from 1dac3e7 to f568f52 Compare December 16, 2023 08:33
@github-actions github-actions bot removed the abandoned The pull request has been abandoned. label Dec 17, 2023
Copy link

github-actions bot commented Jan 1, 2024

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.

@github-actions github-actions bot added the abandoned The pull request has been abandoned. label Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned The pull request has been abandoned. waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant