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

Unifying Chaos Experiment Runs status to enum #4400

Closed
namkyu1999 opened this issue Jan 24, 2024 · 2 comments · Fixed by #4494
Closed

Unifying Chaos Experiment Runs status to enum #4400

namkyu1999 opened this issue Jan 24, 2024 · 2 comments · Fixed by #4494
Labels

Comments

@namkyu1999
Copy link
Member

We already have the ChaosExperimentRunStatus enum like below.

enum ExperimentRunStatus {
All
Running
Completed
Completed_With_Error
Stopped
Skipped
Error
Timeout
NA
}

But our code base uses plain string, not an enum. That makes it difficult to make changes to the code.

e.g.

  1. There's no Queued state in our enum.

    err = c.chaosExperimentRunOperator.CreateExperimentRun(sessionContext, dbChaosExperimentRun.ChaosExperimentRun{
    InfraID: workflow.InfraID,
    ExperimentID: workflow.ExperimentID,
    Phase: "Queued",

  2. There's a difference between our enum and other code

    resMap := map[string]int{
    "Completed": 0,
    "Stopped": 0,
    "Running": 0,
    "Terminated": 0,
    "Error": 0,
    }

Also, I cannot find docs about Chaos Experiment status & Chaos Experiment Run status.

So, We need to implement two things.

  1. Unifying Chaos Experiment Runs status to enum
  2. Add docs about Chaos Experiment status & Chaos Experiment Run status

Let me know if I'm misinterpreting. If I'm on the right track, I'll get started or assign the task to the LFX mentee.

@namkyu1999 namkyu1999 added the bug label Jan 24, 2024
@Saranya-jena
Copy link
Contributor

@amityt Can you take a look at this?

@amityt
Copy link
Contributor

amityt commented Mar 6, 2024

Sure @Saranya-jena I will take this up! Thanks for pointing this out @namkyu1999

amityt added a commit to amityt/litmus that referenced this issue Mar 6, 2024
…moved hard-coded statuses

Signed-off-by: Amit Kumar Das <amit.das@harness.io>
Saranya-jena pushed a commit that referenced this issue Mar 7, 2024
…coded statuses (#4494)

Signed-off-by: Amit Kumar Das <amit.das@harness.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants