CHANGELOG update #22
GitHub Actions / Test Results
failed
Jul 28, 2025 in 0s
1 fail, 20 skipped, 1 477 pass in 36m 54s
Annotations
github-actions / Test Results
1 out of 5 runs failed: test_check_namespace_change (tests.unit.builtin_monitors.container_checker_test.ContainerCheckerMultiAccountTest)
reports/pytest-results-3.10-macos/test-results/junit-1.xml [took 1m 0s]
Raw output
Exception: Failed to acquire started lock
self = <tests.unit.builtin_monitors.container_checker_test.ContainerCheckerMultiAccountTest testMethod=test_check_namespace_change>
def test_check_namespace_change(self):
k8s_namespace = MockNamespace(
name="namespace",
annotations=process_annotations(
{"log.config.scalyr.com/teams.1.secret": "scalyr-api-key-team-2"}
),
digest=b"digest-1",
)
k8s_pod = MockPod(
namespace=k8s_namespace.name,
name="work-pod-name",
node_name="test_node",
uid="lkjsefr",
annotations=process_annotations({}),
container_names=["work-container"],
controller=Controller(
name="controller_name_k8s_pod_1_namespace_1",
kind="controller_kind_k8s_pod_1_namespace_1",
labels={"controller_labels_k8s_pod_1_namespace_1": "value"},
),
)
self._set_mocked_k8s_objects([k8s_pod], [k8s_namespace])
run_state, exception_holder = self._start_check_containers_thread()
# Wait for ContainerChecker to complete at least one loop
run_state.wait_for_next_loop_start()
run_state.wait_for_next_loop_start()
assert len(exception_holder) == 0, "Expected no exceptions"
self._assert_mock_logger_no_severe_messages()
assert len(self.log_watcher.add_log_config.call_args_list) == 1
assert (
self.log_watcher.add_log_config.call_args_list[0].args[1]["path"]
== "/var/log/scalyr-agent2/containers/work-container.log"
)
assert (
self.log_watcher.add_log_config.call_args_list[0].args[1]["api_key"]
== "scalyr-api-key-team-2-value"
)
self.log_watcher.add_log_config.reset_mock()
# Wait for the loop to complete and pause it to change pod annotations.
with run_state.running_lock:
> run_state.wait_for_next_loop_start()
#x1B[1m#x1B[31mtests/unit/builtin_monitors/container_checker_test.py#x1B[0m:302:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.unit.builtin_monitors.container_checker_test.MockRunState object at 0x114104820>
def wait_for_next_loop_start(self):
with self.next_loop_condition:
if not self.next_loop_condition.wait(timeout=60):
> raise Exception("Failed to acquire started lock")
#x1B[1m#x1B[31mE Exception: Failed to acquire started lock#x1B[0m
#x1B[1m#x1B[31mtests/unit/builtin_monitors/container_checker_test.py#x1B[0m:40: Exception
Loading