Skip to content

Add handlers for Jira connect error responses

Alex Kalderimis requested to merge 298733-handle-jira-connect-responses into master

What does this MR do?

This adds error handlers for the error formats described at:

Each of these needs slightly different handling.

QA instructions

This can be QA'ed manually using a gitpod instance.

Console steps:

d = Deployment.last
p = d.project
ff = Operation::FeatureFlag.last
pl = Ci::Pipeline.last

s = JiraConnect::SyncService.new(p)
s.execute(feature_flags: [ff], pipelines: [pl], deployments: [d])

This should not fail.

Build Script

I use the following build script with a shell based runner:

before_script:
  - echo "Before script section"
  - echo "For example you might run an update here or install a build dependency"
  - echo "Or perhaps you might print out some debugging details"

after_script:
  - echo "After script section"
  - echo "For example you might do some cleanup here"

build1:
  stage: build
  script:
    - echo "Do your build here"

test1:
  stage: test
  script:
    - echo "Do a test here"
    - echo "For example run a test suite"

test2:
  stage: test
  script:
    - echo "Do another parallel test here"
    - echo "For example run a lint test"

deploy1:
  stage: deploy
  environment:
    name: staging
  script:
    - echo "Deployed"

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

It is difficult to test the error behaviour here, but we do need to watch the Sentry reports.

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #298733 (closed)

Edited by Alex Kalderimis

Merge request reports