Skip to content

use compat version of SqlServer PSModule for SSIS deploy ispac from package#1658

Draft
bcullman wants to merge 1 commit intoOctopusDeploy:masterfrom
bcullman:fix-ssis-deploy-from-ispac-use-valid-psmodule
Draft

use compat version of SqlServer PSModule for SSIS deploy ispac from package#1658
bcullman wants to merge 1 commit intoOctopusDeploy:masterfrom
bcullman:fix-ssis-deploy-from-ispac-use-valid-psmodule

Conversation

@bcullman
Copy link
Contributor

@bcullman bcullman commented Mar 5, 2026

Background

The documentation for Deploy ispac SSIS project from a Package parameter correctly points out that newer versions of the SqlServer PSModule this step template relies on no longer include the necessary assemblies to interface with SSIS, and so a pinned version (21.1.18256) is noted.

  • On a machine that DOES NOT have SqlServer PSModule installed, this works fine.
  • On a machine that DOES have SqlServer PSModule installed, it does not check if it is compatible first, leading to breakage when newer a new PS Module is found

The fix here is to only use a already installed SqlServer PSModule if it is compatible with SSIS (21.1.18256) or below). Otherwise, install a temp version of 21.1.18256.

Results

Before

snipped of Octo Log output when SqlServer PSModule (22.3.0) was found and used)

Extracting dependency 'C:\Octopus\Files\[REDACTED].nupkg' to 'C:\Octopus\Work\[REDACTED]\SSIS.Template.ssisPackageId' 
NotSpecified: Exception calling "LoadFile" with "1" argument(s): "The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)" 
At C:\Octopus\Work\[REDACTED]\Script.ps1:69 char:9 
+         [Reflection.Assembly]::LoadFile($assemblyFile.FullName) | Out ... 
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
at Load-SqlServerAssmblies, C:\Octopus\Work\[REDACTED]\Script.ps1: line 69 
at <ScriptBlock>, C:\Octopus\Work\[REDACTED]\Script.ps1: line 482 
at <ScriptBlock>, <No file>: line 1 
at <ScriptBlock>, C:\Octopus\Work\[REDACTED]\Octopus.FunctionAppenderContext.ps1: line 276 
at <ScriptBlock>, C:\Octopus\Work\[REDACTED]\Bootstrap.Octopus.FunctionAppenderContext.ps1: line 6485 
at <ScriptBlock>, <No file>: line 1 
at <ScriptBlock>, <No file>: line 1 
The remote script failed with exit code 1 

After

snipped of Octo Log output when SqlServer PSModule (22.3.0) was found, ignored and temp version 21.1.18256 was used instead:

Extracting dependency 'C:\Octopus\Files\[REDACTED].nupkg' to 'C:\Octopus\Work\[REDACTED]\SSIS.Template.ssisPackageId' 
Inspecting installed SqlServer module v22.3.0 at C:\Program Files\WindowsPowerShell\Modules\SqlServer\22.3.0 
No installed SqlServer module contained SSIS IntegrationServices assembly. Using pinned SqlServer 21.1.18256. 
Pinned SqlServer module not present locally, downloading temporary copy ... 
Saved module SqlServer v21.1.18256 to C:\Octopus\Work\[REDACTED]\Modules 
Importing pinned SqlServer module from: C:\Octopus\Work\[REDACTED]\Modules\SqlServer\21.1.18256\SqlServer.psd1 
SqlServer module in use: v21.1.18256 from C:\Octopus\Work\[REDACTED]\Modules\SqlServer\21.1.18256\SqlServer.psm1 
1 .ispac file(s) found. 
Connecting to server ... 
Getting reference to catalog SSISDB 
Deploying project [REDACTED].ispac... 
Referencing Project Parameters to Environment Variables... 
[WARN] - [REDACTED].ConnectByProxy not in OctopusParameters collection. 
[WARN] - [REDACTED].ConnectRetryCount not in OctopusParameters collection. 
[WARN] - [REDACTED].ConnectRetryInterval not in OctopusParameters collection. 
[WARN] - [REDACTED].ConnectUsingManagedIdentity not in OctopusParameters collection. 
[ OK ] - [REDACTED].ConnectionString updated. 
[ OK ] - [REDACTED].InitialCatalog updated. 
[ OK ] - [REDACTED].Password updated. 
...

Pre-requisites

[NA] Id should be a GUID that is not 00000000-0000-0000-0000-000000000000
NOTE If you are modifying an existing step template, please make sure that you do not modify the Id property (updating the Id will break the Library sync functionality in Octopus).
[NA] Version should be incremented, otherwise the integration with Octopus won't update the step template correctly
[NA] Parameter names should not start with $
[NA] Step template parameter names (the ones declared in the JSON, not the script body) should be prefixed with a namespace so that they are less likely to clash with other user-defined variables in Octopus (see OctopusDeploy/Issues#2126). For example, use an abbreviated name of the step template or the category of the step template).
[NA] LastModifiedBy field must be present, and (optionally) updated with the correct author
[✔] The best practices documented here have been applied
[NA] If a new Category has been created:
[NA] An image with the name {categoryname}.png must be present under the step-templates/logos folder
[NA] The switch in the humanize function in gulpfile.babel.js must have a case statement corresponding to it

Fixes #1657

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Start Hyponome locally

docker pull ghcr.io/hnrkndrssn/hyponome:main
docker run --rm -p 8000:8080 -it ghcr.io/hnrkndrssn/hyponome:main

Review in Hyponome

@bcullman bcullman changed the title use compat version of SqlServer PSModule use compat version of SqlServer PSModule for SSIS deploy ispac from package Mar 5, 2026
@bcullman bcullman marked this pull request as draft March 5, 2026 16:55
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.

SSIS deploy ispac from package fails when incompatable sqlserver powershell module is used

1 participant