Currently, Bamboo logs the message "Clearing non-active Ephemeral Agent pods" every time a pod cleanup is called, regardless of whether any pods were actually deleted. This happens while at any logging level, which can lead to confusion and clutter in the logs.
Proposed Change:
For better clarity in the logs, modify the Ephemeral Agent pods cleanup logging behaviour as follows:
- If no pods are deleted and the logging level is set not DEBUG, no message should be logged.
- If no pods are deleted but the logging level is set to DEBUG, a message stating "Clearing non-active Ephemeral Agent pods. No pods were deleted" should be logged.
- If one or more pods are deleted, regardless of the logging level, a message should be logged stating "Clearing non-active Ephemeral Agent pods. Total deleted pods: X. Pod names: [pod1, pod2, ...]", where X is the number of deleted pods and [pod1, pod2, ...] is the list of names of the deleted pods.