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

Introduce waiting status in /sequence endpoint #5526

Closed
2 tasks
ermin-muratovic opened this issue Oct 6, 2021 · 3 comments · Fixed by #6603
Closed
2 tasks

Introduce waiting status in /sequence endpoint #5526

ermin-muratovic opened this issue Oct 6, 2021 · 3 comments · Fixed by #6603
Assignees
Labels
area:core type:improvement Improves/enhances an existing feature
Milestone

Comments

@ermin-muratovic
Copy link
Member

ermin-muratovic commented Oct 6, 2021

The /sequence endpoint returns a state property and each stage has also a state property. Currently the overall state might be triggered, paused or finished. However, the stage state is either triggered or finished, see example below.
The state value should also return started for started stages.

{
  "name": "delivery",
  "service": "carts",
  "project": "sockshop",
  "time": "2021-10-06T09:28:50.796Z",
  "shkeptncontext": "ae02c298-e6ab-4453-87c6-492eea4fdca9",
  "state": "paused",
  "stages": [
    {
      "name": "dev",
      "image": "docker.io/keptnexamples/carts:0.12.1",
      "state": "triggered",
      "latestEvent": {
        "type": "sh.keptn.event.test.triggered",
        "id": "ba87752d-3a99-4388-84b0-08f988322a9a",
        "time": "2021-10-06T09:30:19.744Z"
      }
    }
  ]
}'

If the user paused a sequence, I would expect to see the state paused instead of the state triggered.
If the sequence is waiting for another sequence to be finished, I would expect to see the state waiting instead of the state triggered.

This is a breaking change.

DoD

  • Unit tests
  • Integration tests
@thisthat
Copy link
Member

thisthat commented Nov 9, 2021

We should define the list of possible states before we can tackle this issue

@thisthat thisthat added this to the 0.12.0 milestone Nov 30, 2021
@odubajDT
Copy link
Contributor

odubajDT commented Dec 7, 2021

@thisthat is the list of possible states already defined for this issue ? Thank you.

@thisthat thisthat modified the milestones: 0.12.0, 0.13.0 (Bridge) Dec 14, 2021
@odubajDT odubajDT self-assigned this Dec 16, 2021
@odubajDT
Copy link
Contributor

odubajDT commented Dec 16, 2021

From discussion we know that states of sequences can have these values:

  • triggered
  • started
  • finished
  • paused
  • timedOut
  • aborted

Stages have also the same states as sequences + state succeeded

It should be enough to introduce a new state waiting to cover when the sequence is waiting for a condition (f. e. another sequence).

Use Case

When a running sequence (in state started) needs to wait, it changes its state to waiting. The same happens to each stage which is currently running (has state started)

ermin-muratovic added a commit that referenced this issue Dec 16, 2021
…olution and this will be fixed with #5526)

Signed-off-by: ermin.muratovic <[email protected]>
ermin-muratovic added a commit that referenced this issue Jan 10, 2022
…olution and this will be fixed with #5526)

Signed-off-by: ermin.muratovic <[email protected]>
ermin-muratovic added a commit that referenced this issue Jan 10, 2022
* don't load traces if only remediation title is need. remeditation title is now provided with GET /sequence endpoint

Signed-off-by: ermin.muratovic <[email protected]>

* ignore waiting status for remediation sequences (is an intermediate solution and this will be fixed with #5526)

Signed-off-by: ermin.muratovic <[email protected]>

* load actions for remediation sequence correctly

Signed-off-by: ermin.muratovic <[email protected]>

* add problemTitle to mocks, where sequence endpoint is used

Signed-off-by: ermin.muratovic <[email protected]>
@odubajDT odubajDT removed the ready-for-refinement Issue is relevant for the next backlog refinment label Jan 14, 2022
@thisthat thisthat modified the milestones: 0.13.0 (Bridge), 0.13.0 Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:core type:improvement Improves/enhances an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants