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

When generating deployment report with script only option it unexpectedly exits with warning. #4314

Closed
RichieBzzzt opened this Issue Oct 22, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@RichieBzzzt
Copy link
Contributor

RichieBzzzt commented Oct 22, 2018

Before submitting a bug report:

  • Ensure you are able to reproduce it on the latest released version (we release often)
  • Verified this bug is not already reported in an issue
  • Verified errors are not related to permissions
  • Can reproduce in a clean PowerShell session (clean = powershell -NoProfile)

Steps to Reproduce

Build a dacpac and have a publish xml file.

When wanting to generate a script only of the deployment report the warning "WARNING: [19:52:49][Publish-DbaDacPackage] You must at least one of GenerateDeploymentScript or GenerateDeploymentReport when using ScriptOnly"

Import-Module C:\Users\RichardLee\source\repos\dbatools -Force
$db = "northwind"
$sql = "(localdb)\heyyo"

$dacpac = "C:\Users\RichieLee\source\repos\Northwind\bin\Debug\Northwind.dacpac"
$publishProfile  = "C:\Users\RichieLee\source\repos\Northwind\bin\Debug\Northwind.publish.xml"
$OutPath = "C:\Users\RichieLee\source\repos\dbatools\output"
# first example works
Publish-DbaDacPackage -SqlInstance $Sql -Database $db -Path $dacpac -PublishXml $publishProfile -GenerateDeploymentScript -ScriptOnly -OutputPath $OutPath 
# second example get above warning
Publish-DbaDacPackage -SqlInstance $Sql -Database $db -Path $dacpac -PublishXml $publishProfile -GenerateDeploymentReport -ScriptOnly -OutputPath $OutPath

Expected Behavior

Deployment report is generated in output directory.

Actual Behavior

"WARNING: [19:52:49][Publish-DbaDacPackage] You must at least one of GenerateDeploymentScript or GenerateDeploymentReport when using ScriptOnly"

Environmental data

Name Value


PSVersion 5.1.17763.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@RichieBzzzt RichieBzzzt self-assigned this Oct 22, 2018

@RichieBzzzt

This comment has been minimized.

Copy link
Contributor

RichieBzzzt commented Oct 22, 2018

Got the fix for this already. Will merge shortly.

@RichieBzzzt

This comment has been minimized.

Copy link
Contributor

RichieBzzzt commented Oct 22, 2018

Thanks to @richardlhughes for finding bug!

@RichieBzzzt

This comment has been minimized.

Copy link
Contributor

RichieBzzzt commented Oct 22, 2018

#4316 PR opened

potatoqualitee added a commit that referenced this issue Oct 23, 2018

fix for issue #4314 so that scriptonly and generatedeplymentreport ca…
…n be used together and work as expected (#4316)
@niphlod

This comment has been minimized.

Copy link
Contributor

niphlod commented Oct 24, 2018

closed via 5bff4ec

@niphlod niphlod closed this Oct 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment