Skip to content
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

Azure Devops Fatal Error when running task: OctopusCreateRelease@4 with a commit message referencing a Jira Work Item that doesn't exist #7223

Closed
1 task done
long-sean opened this issue Nov 30, 2021 · 7 comments
Assignees
Labels
kind/bug This issue represents a verified problem we are committed to solving
Milestone

Comments

@long-sean
Copy link

long-sean commented Nov 30, 2021

Team

  • I've assigned a team label to this issue

Severity

One Report

Version

Octopus Deploy 2021.3.8733 ADO/Octopus Marketplace Extension 4.2.492

Latest Version

I could reproduce the problem in the latest build

What happened?

When using an Azure DevOps pipeline to create a Project Release if the

  1. Release contains a Commit Message
  2. the Octopus Instance has Jira Integration Enabled and Jira Release Notes Configured correctly

If the Commit Message contains a WorkItem.Id that doesn't exist (JIR-317982) the Devops Pipeline will fail with the following message:

Creating release...
There was a problem with your request.

 - Jira: Failed to retrieve Jira issues 'JIR-63124' from https://dfalvo.atlassian.net. Response Code: BadRequest (Reason: Bad Request)

Error from Octopus Server (HTTP 400 BadRequest)
Exit code: -7
##[debug]Exit code 249 received from tool '/usr/bin/dotnet'
##[debug]STDIO streams have closed for tool '/usr/bin/dotnet'
##[error]Error: The process '/usr/bin/dotnet' failed with exit code 249

If this commit message is parsed during any future deployments the Pipeline will continue to fail.
This also means the Octopus Release doesn't proceed.

Reproduction

  1. Create a Project that deploys a package
  2. Setup Jira Integration
  3. Setup Jira Release Notes
    (Release Notes Template whether configured or not, does not affect the outcome)
  4. Create an Azure Devops Pipeline to perform a release of the Project. The Repo can be an Azure DevOps repo (or GitHub)
- task: OctopusCreateRelease@4
  inputs:
    OctoConnectedServiceName: 'Octopus DFCloud'
    Space: 'Spaces-1'
    ProjectName: 'Projects-285'
    ReleaseNumber: '$(Build.BuildNumber)'
    DeployToEnvironment: 'Development'
  1. Commit a change, and provide a commit message with the start of the commit message in the format "XXXX-XX".
    e.g JIR-21354, JIRA-523662, 2021-11
  2. Run the pipeline

Error and Stacktrace

Azure Devops Error:

Found project: Simply Deploy a Package (Projects-285)
Automatically selecting the best channel for this release...
Building a release plan for Channel 'Default'...
Finding deployment process...
Finding release template...
The package version for some steps was not specified. Going to try and resolve those automatically...
Finding latest package for step: Deploy a Package
Selected 'MyDotNetCoreAppGITExample.Development' version '20211126.10' for 'Deploy a Package'
Selected the release plan for Channel 'Default' - it is a perfect match
Using version number provided on command-line: 20211126.10
Release plan for Simply Deploy a Package 20211126.10
Channel: 'Default' (this is the default channel)
  #   Name               Version       Source             Version rules      
  --- ------------------ ------------- ------------------ -------------------
  1   Deploy a Package   20211126.10   Latest available   Allow any version  

Creating release...
There was a problem with your request.

 - Jira: Failed to retrieve Jira issues '2021-11' from https://dfalvo.atlassian.net. Response Code: BadRequest (Reason: Bad Request)

Error from Octopus Server (HTTP 400 BadRequest)
Exit code: -7
##[debug]Exit code 249 received from tool '/usr/bin/dotnet'
##[debug]STDIO streams have closed for tool '/usr/bin/dotnet'
##[error]Error: The process '/usr/bin/dotnet' failed with exit code 249
##[debug]Processed: ##vso[task.issue type=error;]Error: The process '/usr/bin/dotnet' failed with exit code 249
##[debug]task result: Failed
##[error]Failed to deploy release The process '/usr/bin/dotnet' failed with exit code 249
##[debug]Processed: ##vso[task.issue type=error;]Failed to deploy release The process '/usr/bin/dotnet' failed with exit code 249
##[debug]Processed: ##vso[task.complete result=Failed;]Failed to deploy release The process '/usr/bin/dotnet' failed with exit code 249
Finishing: OctopusCreateRelease

More Information

Original Ticket: https://help.octopus.com/t/jira-integration-prevents-release-creation-if-it-fails/27402/3

Workaround

Disable Jira Integration in Octopus Deploy
Do a release.
Enable Jira Integration again.

@long-sean long-sean added kind/bug This issue represents a verified problem we are committed to solving state/triage labels Nov 30, 2021
@long-sean long-sean self-assigned this Nov 30, 2021
@long-sean long-sean added this to the 2021.2 milestone Nov 30, 2021
@davidkeaveny
Copy link

I'm still experiencing this issue with Octopus Cloud/Jira Cloud. The workaround works to at least create the release, but I lose work item tracking.

@johnsimons
Copy link

Hi @davidkeaveny, that is not good 😢
So we can get to the bottom of it, can you please start a support case with us by emailing us at support@octopus.com, and provide as much detail as you can so we can reproduce the issue on our end.

@paraicoceallaigh
Copy link

paraicoceallaigh commented Dec 15, 2021

@davidkeaveny
Copy link

From initial investigation, the problem area appears to be with the Octopus Deploy pipe for Atlassian BitBucket Pipelines; this is still very much in beta, so it’s quite possible that the issue is occurring here. The build information is being sent through from BitBucket to Octopus, but no work items are being referenced, even when the relevant commit has the ticket number referenced in the commit message and in the branch name.

@johnsimons
Copy link

Hi @davidkeaveny, we figured it out, so your cloud instance is running v2021.3.8275 and this fix is going out in v2021.3.9083, see #7223 (comment)
So that is the reason you are still affected by this issue.

@paraicoceallaigh is going to contact you to find out if you want us to update your cloud instance manually to a version with this fix.

I hope this makes sense.

Cheers
John

@davidkeaveny
Copy link

Yes thank you, that resolved the immediate issue, where the release creation fails when the release contains commits with work item IDs.

There’s a separate issue where the work item IDs are not being submitted in the build information, but I’ll address that in a separate issue.

Many thanks again

@Octobob
Copy link
Member

Octobob commented Apr 11, 2022

🎉 The fix for this issue has been released in:

Release stream Release
2021.2 2021.2.7865
2021.3 2021.3.9083
2022.1+ all releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

5 participants