ReferenceIds on StepFramework steps are incorrectly updated when updating step versions, this leads to a mismatch between the referenceId and StepPackageInputsReferenceId causing deployment failures #8449
Labels
kind/bug
This issue represents a verified problem we are committed to solving
Severity
Sev 1
Version
2023.*
Latest Version
I could reproduce the problem in the latest build
What happened?
When upgrading a Step Framework step inputs that set a
referenceId
are being updated to a new v4 while theStepPackageInputsReferenceId
is not. At deployment time this causes failures in retrieving package information.Reproduction
Create a deployment process where the referenceId and StepPackageInputsReferenceId mismatch, in this case, I've updated the deployment process manually using SQL, in Octopus this happens when the step package is upgraded. Note the referenceId end in
vv
Update DeploymentProcess Set JSON = '{ "Steps": [ { "Id": "6cd44672-9b61-48c6-9170-04bdc534c616", "Name": "Kustomize", "Slug": "kustomize", "Condition": "Success", "StartTrigger": "StartAfterPrevious", "PackageRequirement": "AfterPackageAcquisition", "Actions": [ { "Id": "d72f5a5d-b204-4214-b057-2021f6ffbebf", "Name": "Kustomize", "Slug": "kustomize", "ActionType": "kustomize", "Notes": null, "WorkerPoolId": "WorkerPools-42", "WorkerPoolVariable": null, "Container": { "Image": "octopuslabs/k8s-workertools", "FeedId": "Feeds-1021" }, "IsDisabled": false, "IsRequired": false, "Environments": [], "ExcludedEnvironments": [], "Channels": [], "TenantTags": [], "Packages": [], "GitDependencies": [ { "Name": "", "RepositoryUri": "https://github.com/OctopusSamples/OctoPetShop.git", "DefaultBranch": "master", "FilePathFilters": [], "GitCredentialType": "Library", "GitCredentialId": "GitCredentials-1", "StepPackageInputsReferenceId": "de2d5028-47de-42b4-bef2-c3b451108854" } ], "Condition": "Success", "Properties": { "Octopus.Action.RunOnServer": "true", "OctopusUseBundledTooling": "False" }, "StepPackageVersion": "2.0.2", "Inputs": { "overlayPath": "k8s/kustomize/overlays/#{Octopus.Environment.Name}", "substituteFiles": { "filesToTarget": "k8s/kustomize/base/kustomization.yaml" }, "kubernetesObjectStatus": { "timeout": 180, "waitForJobs": false, "enabled": true }, "gitSource": { "isAnonymous": false, "gitCredential": "GitCredentials-1", "url": "https://github.com/OctopusSamples/OctoPetShop.git", "defaultBranch": "master", "referenceId": "de2d5028-47de-42b4-bef2-c3b4511088vv" }, "containerImageReferences": [] } } ], "Properties": { "Octopus.Action.TargetRoles": "wsltarget" } } ] }' where Id = 'deploymentprocess-Projects-XXX'
Error and Stacktrace
The text was updated successfully, but these errors were encountered: