Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Shipyard controller: triggeredID of <stage>.<sequence>.finished events not set properly #4091

@bacherfl

Description

@bacherfl

When executing multiple iterations of a sequence, the <stage>.<sequence>.finished of all iterations reference the id of the first <stage>.<sequence>.triggered event. This prevents the bridge from correlating the .finished events to their correct .triggered events which leaves the sequence execution in a pending state, as shown in the screenshot below:

Current Behavior:

Sequence execution is displayed as "running/waiting", even though it is already finished

Screenshot 2021-05-18 at 08 48 12

Involved CloudEvents:

First remediation.triggered event:

{
  "data": {
    "project": "sockshop",
    "service": "carts",
    "stage": "production"
  },
  "id": "2c563526-f6b1-445b-a044-55a33b903d6c",   // <<< this should be referenced by the first remediation.triggered event
  "source": "dynatrace-service",
  "specversion": "1.0",
  "time": "2021-05-18T06:10:25.958Z",
  "type": "sh.keptn.event.production.remediation.triggered",
  "shkeptncontext": "7058be20-179d-49e5-aa54-8c8ddfb90af2"
}

First remediation.finished event:

{
  "data": {
    "project": "sockshop",
    "result": "fail",
    "service": "carts",
    "stage": "production",
    "status": "succeeded"
  },
  "id": "4f62ccf7-6608-484c-b076-8112e106500b",
  "source": "shipyard-controller",
  "specversion": "1.0",
  "time": "2021-05-18T06:20:29.072Z",
  "type": "sh.keptn.event.production.remediation.finished",
  "shkeptncontext": "7058be20-179d-49e5-aa54-8c8ddfb90af2",
  "shkeptnspecversion": "0.2.0",
  "triggeredid": "2c563526-f6b1-445b-a044-55a33b903d6c"
}

Second remediation.triggered event:

{
  "data": {
    "project": "sockshop",
    "service": "carts",
    "stage": "production"
  },
  "id": "71f30038-0fc6-4d6c-8f97-2927734bc775", // <<< this should be referenced by the second remediation.finished event
  "source": "shipyard-controller",
  "specversion": "1.0",
  "time": "2021-05-18T06:20:29.076Z",
  "type": "sh.keptn.event.production.remediation.triggered",
  "shkeptncontext": "7058be20-179d-49e5-aa54-8c8ddfb90af2",
  "shkeptnspecversion": "0.2.0"
}

Second remediation.finished event:

{
  "data": {
    "message": "unable to get next action from remediation.yaml",
    "project": "sockshop",
    "result": "fail",
    "service": "carts",
    "stage": "production",
    "status": "succeeded"
  },
  "id": "31d1f74f-aa0e-4e5c-9898-7de6422cad87",
  "source": "shipyard-controller",
  "specversion": "1.0",
  "time": "2021-05-18T06:20:29.213Z",
  "type": "sh.keptn.event.production.remediation.finished",
  "shkeptncontext": "7058be20-179d-49e5-aa54-8c8ddfb90af2",
  "shkeptnspecversion": "0.2.0",
  "triggeredid": "2c563526-f6b1-445b-a044-55a33b903d6c" // <<< this is the id of the first remediation.triggered event. However, this should be the id of the second remediation.triggered event instead
}

Desired Behavior:

Sequence execution is displayed as "finished" when there are no open <stage>.<sequence>.triggered events anymore:

Screenshot 2021-05-18 at 08 38 59

Metadata

Metadata

Assignees

Labels

area:coretype:bugSomething is not working as intended/documented

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions