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

[Test] Save events from failed workspaces in load-tests script #22888

Merged
merged 6 commits into from
Mar 22, 2024

Conversation

SkorikSergey
Copy link
Contributor

What does this PR do?

Save events from failed workspaces in load-tests script. Events saving takes time but kubectl doen't have command like oc client(oc get events --since=1h).

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-5633

How to test this PR?

  1. Log in to Openshift cluster with DevSpaces deployed from terminal
  2. Start load-test.sh script from test/e2e/performance/load-tests. Set number of started workspaces by -c parameter(like./load-test.sh -c 5)
  3. This script uses local dewvorspace.yaml to start workspaces.
  4. As results there are average time of workspace starting and number of failed workspaces.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@SkorikSergey SkorikSergey added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. area/qe labels Mar 21, 2024
@SkorikSergey SkorikSergey self-assigned this Mar 21, 2024
kubectl describe dw dw$i >logs/dw$i-log.log
kubectl logs $(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') >logs/dw$i-pod.log || true
cat logs/events.log | grep $ws_name >logs/dw$i-events.log
kubectl logs $ws_name >logs/dw$i-pod.log || true
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not the same. Get events in 95 line saves all events to file. And after that all failed pod logs getting from events file. It saves time - don't need to ask Openshift cluster for events of every failed workspace(just once).

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant, the same comment as for https://github.com/eclipse/che/pull/22888/files#r1535549399
Sorry for confusion.

@@ -107,8 +110,10 @@ function runTest() {
succeeded=$((succeeded + 1))
else
print_error "Timeout waiting for dw$i to become ready or an error occurred."
ws_name=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}')
Copy link
Contributor

Choose a reason for hiding this comment

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

If devworkspaceId != actual workspace name, then I would recommend to name variable correspondingly as devworkspace_id to avoid confusion.

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

looks commonly good to merge, having a few non-critical notices

@SkorikSergey SkorikSergey merged commit ac6f4ef into main Mar 22, 2024
4 checks passed
@SkorikSergey SkorikSergey deleted the load-tests branch March 22, 2024 14:03
@SkorikSergey SkorikSergey removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qe kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants