You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When calling Deployments.GetDeployment the returned data incorrectly shows FailureEncountered as False even if the deployment indeed failed.
Steps To Reproduce
1.Init a Client
2.Create a projects.Project struct eg octopusProjectData.project in below code
3.Use code below to get all releases for a project then iterate through each release, then iterate through each deployment
releaseInfo, err := client.Projects.GetReleases(octopusProjectData.project)
if err != nil {
return latestSuccessfulRelease, fmt.Errorf("failed to lookup Release data: %w", err)
}
for _, release := range releaseInfo {
log.Println("Release Version:", release.Version)
deployments, err := client.Deployments.GetDeployments(release)
for _, deployment := range deployments.Items {
log.Println(release.Version)
log.Println(deployment.ID)
log.Println(deployment.FailureEncountered, "\n")
}
}
Expected Behavior
If a deployment for a release has failed, I would expect FailureEncountered to return true, so we can then disregard this deployment.
First 2 should show as True (A Failure was Encountered)
Description
When calling Deployments.GetDeployment the returned data incorrectly shows FailureEncountered as False even if the deployment indeed failed.
Steps To Reproduce
1.Init a Client
2.Create a
projects.Project
struct egoctopusProjectData.project
in below code3.Use code below to get all releases for a project then iterate through each release, then iterate through each deployment
Expected Behavior
If a deployment for a release has failed, I would expect FailureEncountered to return true, so we can then disregard this deployment.
First 2 should show as True (A Failure was Encountered)
Any Logs and/or Other Supporting Information
Output From Octopus Deploy, I would expect .0.3 and .0.2 to return as failed
Output from GO
Environment and/or Versions
Octopus 2025.1
- Cloudgo1.23.0 linux/amd64
Additional Context
The approach of the above code is to find the last Deployment for a Project, iterating through releases and their deployments.
The text was updated successfully, but these errors were encountered: