Skip to content

Commit c0a2bde

Browse files
fixed duplicate experiment name issue (#4210)
* fixed dupicate experiment name Signed-off-by: Sarthak Jain <[email protected]> * fixed text Signed-off-by: Sarthak Jain <[email protected]> * fixed text Signed-off-by: Sarthak Jain <[email protected]> --------- Signed-off-by: Sarthak Jain <[email protected]> Co-authored-by: Saranya Jena <[email protected]>
1 parent ef5d1df commit c0a2bde

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

chaoscenter/graphql/server/pkg/chaos_experiment/handler/handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (c *ChaosExperimentHandler) SaveChaosExperiment(ctx context.Context, reques
106106
if wfDetails.ExperimentID == request.ID {
107107
logrus.WithFields(logFields).Info("request received to update k8s chaos experiment")
108108
if wfDetails.Name != request.Name {
109-
err = c.validateDuplicateExperimentName(ctx, request.ID, request.Name)
109+
err = c.validateDuplicateExperimentName(ctx, projectID, request.Name)
110110
if err != nil {
111111
return "", err
112112
}
@@ -120,15 +120,15 @@ func (c *ChaosExperimentHandler) SaveChaosExperiment(ctx context.Context, reques
120120
return "experiment updated successfully", nil
121121
}
122122

123-
err = c.validateDuplicateExperimentName(ctx, request.ID, request.Name)
123+
err = c.validateDuplicateExperimentName(ctx, projectID, request.Name)
124124
if err != nil {
125125
return "", err
126126
}
127127

128128
// Saving chaos experiment in the DB
129129
logrus.WithFields(logFields).Info("request received to save k8s chaos experiment")
130130

131-
err = c.chaosExperimentService.ProcessExperimentCreation(context.TODO(), newRequest, username, projectID, wfType, revID, nil)
131+
err = c.chaosExperimentService.ProcessExperimentCreation(ctx, newRequest, username, projectID, wfType, revID, nil)
132132
if err != nil {
133133
return "", err
134134
}

chaoscenter/web/src/strings/strings.en.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,7 @@ noKubernetesChaosInfrastructureFound: >-
653653
noLogs: Sorry, Logs are currently not available
654654
noMonitoredService: No monitoring services found for
655655
noProbeDescription: >-
656-
Probes are pluggable checks that can be defined within the ChaosEngine for any
657-
Chaos Fault. The experiment pods execute these checks based on the mode they
658-
are defined in &amp; factor their success as necessary conditions in
659-
determining the verdict of the experiment
656+
Probes are lightweight, self-contained scripts that can be run against Kubernetes applications to gather information about their behavior under stress and failure conditions.
660657
noProbeExecution: No Probe executions found
661658
noProbeExecutionDetails:
662659
subtitle: >-

0 commit comments

Comments
 (0)