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

feat: Add a locust-loandgen chaos fault #733

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kwx4957
Copy link

@kwx4957 kwx4957 commented Jan 13, 2025

What this PR does / why we need it:
i've implemented a new load test using locust based on proposal. you can add chaos hub

github: https://github.com/kwx4957/chaos-charts.git
branch: feat/locust

Result

image
image

dependency: chaos-charts

Reference:
#687
https://developer.harness.io/docs/chaos-engineering/use-harness-ce/chaos-faults/load/locust-loadgen/

Special notes for your reviewer:

Checklist:

  • Fixes #
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
Comment on lines 73 to 82
if chaosDetails.DefaultHealthCheck {
log.Info("[Status]: Verify that the AUT (Application Under Test) is running (pre-chaos)")
if err := status.AUTStatusCheck(clients, &chaosDetails); err != nil {
log.Errorf("Application status check failed, err: %v", err)
types.SetEngineEventAttributes(&eventsDetails, types.PreChaosCheck, "AUT: Not Running", "Warning", &chaosDetails)
events.GenerateEvents(&eventsDetails, clients, &chaosDetails, "ChaosEngine")
result.RecordAfterFailure(&chaosDetails, &resultDetails, err, clients, &eventsDetails)
return
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the application status check (pre-chaos) as it is not applicable for this experiment?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i will remove it

Comment on lines 118 to 127
if chaosDetails.DefaultHealthCheck {
log.Info("[Status]: Verify that the AUT (Application Under Test) is running (post-chaos)")
if err := status.AUTStatusCheck(clients, &chaosDetails); err != nil {
log.Errorf("Application status check failed, err: %v", err)
types.SetEngineEventAttributes(&eventsDetails, types.PostChaosCheck, "AUT: Not Running", "Warning", &chaosDetails)
events.GenerateEvents(&eventsDetails, clients, &chaosDetails, "ChaosEngine")
result.RecordAfterFailure(&chaosDetails, &resultDetails, err, clients, &eventsDetails)
return
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@namkyu1999
Copy link
Member

hi @kwx4957 , could you resolve conflicts?

kwx4957 and others added 2 commits January 20, 2025 13:26
Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
@kwx4957
Copy link
Author

kwx4957 commented Jan 20, 2025

@namkyu1999 yes, i resolved the conflict

Signed-off-by: DongYoung Kim <kwx4957@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants