Skip to content

Commit

Permalink
Collect inspection reports before deleting the instances (#247)
Browse files Browse the repository at this point in the history
We're initiating the instance cleanup before retrieving the
inspection reports.

For this reason, k8sd becomes unavailable, affecting the
k8s-snap inspection report script, which will no longer be
able to retrieve all logs or determine the node role.
  • Loading branch information
petrutlucian94 authored Feb 14, 2025
1 parent 88a826e commit d3336fb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/performance/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,18 @@ def instances(
LOG.warning("Skipping clean-up of instances, delete them on your own")
return

# Cleanup after each test.
# We cannot execute _harness_clean() here as this would also
# remove the session_instance. The harness ensures that everything is cleaned up
# at the end of the test session.
# Collect all the reports before initiating the cleanup so that we won't
# affect the state of the observed cluster.
for instance in instances:
if config.INSPECTION_REPORTS_DIR is not None:
LOG.debug("Generating inspection reports for test instances")
_generate_inspection_report(h, instance.id)

# Cleanup after each test.
# We cannot execute _harness_clean() here as this would also
# remove the session_instance. The harness ensures that everything is cleaned up
# at the end of the test session.
for instance in instances:
h.delete_instance(instance.id)


Expand Down

0 comments on commit d3336fb

Please sign in to comment.