DbUp after upgrade to 3.1.1

We use DbUp to automate our database migrations by including a Deploy.ps1 in the script package created by TeamCity. We recently upgraded Octopus from 2.6.5 to 3.1.1 and we are no longer receiving the DbUp output in TeamCity when a script migration fails. When everything is successful we can view the build log in TeamCity and see all the script execution from the Octopus deploy, but when it fails all TeamCity reports in the build log is:

[Failed: Step 1: Deploy Database] The step failed: One or more child activities failed.

Where it used to report:

[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘012_NODBML_Alter_Procedure_GetAccountingByTenantIdAndUserId.sql’
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘013_NODBML_Alter_Procedure_GetAccountingByPlanId.sql’
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘014_NODBML_ALTER_PROCEDURE_VendorGuide_GetAdvancedSearchResultsV2.sql’
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘015_NODBML_Data_Add_LookupEntity_RelationshipValidation.sql’
[07:17:21][Failed: Deploy.ps1] SQL exception has occured in script: ‘015_NODBML_Data_Add_LookupEntity_RelationshipValidation.sql’
[07:17:21][Failed: Deploy.ps1] Script block number: 1; Block line 9; Message:
[07:17:21][Failed: Deploy.ps1] System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column ‘Form’, table ‘dbo.LookupEntity’; column does not allow nulls. INSERT fails.
[07:17:21][Failed: Deploy.ps1] The statement has been terminated.

The build configuration in TeamCity has not change, nor has the deployment project in Octopus. We do notice the “Task Log” in 3.1.1 does not seem to be as granular in terms of nested execution process down to the “Deploy.ps1” execution.

It was nice have the full output report back to TeamCity since only a select few have access to the Octopus side, while all our developers use TeamCity to view the build statuses.

Are we missing something trivial here? Any advice is much appreciated.

Hi Brian,

Thanks for getting in touch. I reproduced the issue you describe however I don’t have a concrete suggestion yet. I’ll follow-up here once i have confirmed the background/details of the change.

Thanks again

Rob

Hi Rob -

Any update on this? As we do more with Octopus/TeamCity and bring on more developers this continues to be an issue when troubleshooting failed builds/deploys. Any advice is much appreciated.

Thanks,

Brian

Hi Brian,

Thanks for following-up and I’m very sorry for the long delay! I screwed up as I forgot about this issue! That said, I have good news in that this was identified as an issue and it has been resolved. I tested it with a simple DbUp project that tries to add a duplicate column to a table and it shows the error details in TeamCity again (see the attached screenshot)!

The fixes are available in Octopus 3.2.17 and newer which is available on octopus.com/downloads.

Thanks again for your patience!

Let me know how you go.

Rob