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

Set-DbaStartupParameter - getting 1.0 ready #5298

Merged
merged 12 commits into from
Mar 25, 2019
Merged

Set-DbaStartupParameter - getting 1.0 ready #5298

merged 12 commits into from
Mar 25, 2019

Conversation

wsmelton
Copy link
Member

Type of Change

  • Bug fix (non-breaking change, fixes Set-DbaStartupParameter - Examples and bug with trace flag #5292 )
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Purpose

Working through #5292 and overall getting ready for 1.0 (e.g. apply standard on formatting, try/catch around child calls to other dbatools commands, etc.)

@wsmelton
Copy link
Member Author

Ok, as long as test pass everything is good to go on this one...

@wsmelton wsmelton marked this pull request as ready for review March 24, 2019 21:30
} catch {
Stop-Function -Message "Unable to gather current startup parameters" -Target $SqlInstance -ErrorRecord $_
return
}
Copy link
Member Author

@wsmelton wsmelton Mar 24, 2019

Choose a reason for hiding this comment

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

This is particularly important to do anytime we are calling other public functions in our commands. Because this was not including EnableException and wrapped in a try/catch it was falsely assuming SingleUser was true at current line 237 because the object didn't have any content to begin with.... so if (!($currentStartup.SingleUser)) will return true when that property is true AND when $currentStartup -eq $null ...so the object itself had no content.

@wsmelton
Copy link
Member Author

Had to add few quick fixes for the copy startup proc command that I found missed.

@potatoqualitee
Copy link
Member

looks good, ty!

@potatoqualitee potatoqualitee merged commit 9a3931d into dataplat:development Mar 25, 2019
potatoqualitee added a commit that referenced this pull request Mar 26, 2019
* add additional exclusion tag

excluding Solution Provided tag

* fixes #5287

* Set-DbaStartupParameter - getting 1.0 ready (#5298)

* Merge pull request #5157 from SQLGB/patch-1

Update Get-DbaAgentJobHistory.ps1

* format, add catch for call to get cmd

* change parameter to singular

* correct parameter names in test

* updating parameter reference

* adjust appveyor reference

* quick fix for copy startup proc

format and spelling

* Update issue templates

Updating template on bug reports

* Update issue templates

adding wrapper command to gather info and allow them to paste it

* fixing owned job comparison (#5301)

* 0.9.797
@wsmelton wsmelton deleted the setstartup branch March 27, 2019 21:07
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.

Set-DbaStartupParameter - Examples and bug with trace flag
2 participants