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
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/performance/load-tests/load-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ function runTest() {
# Create logs directory
mkdir logs || true

# Get all events
kubectl get events --field-selector involvedObject.kind=Pod >logs/events.log

total_time=0
succeeded=0
echo "Calculate average workspaces starting time"
Expand All @@ -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.

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
SkorikSergey marked this conversation as resolved.
Show resolved Hide resolved
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.

fi
done

Expand Down