Skip to content

Instantly share code, notes, and snippets.

@hexfusion
Created February 5, 2026 21:11
Show Gist options
  • Select an option

  • Save hexfusion/2361035e36a488c0323b245061e5062b to your computer and use it in GitHub Desktop.

Select an option

Save hexfusion/2361035e36a488c0323b245061e5062b to your computer and use it in GitHub Desktop.
podman_monitor_test.go:308: app app1 expected summary Degraded but got Unknown
time="2026-02-05T16:07:46.719451Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"start","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
==================
WARNING: DATA RACE
Write at 0x00c0004f6120 by goroutine 113:
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).updateApplicationStatus()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:479 +0x194
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).updateComposeContainerStatus()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:572 +0x9bb
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).updateContainerStatus()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:453 +0x1ed
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).updateAppStatus()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:441 +0x4f3
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).handleEvent()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:436 +0x386
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).listenForEvents()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:407 +0x12f
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).ensureMonitorForUser.gowrap1()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:93 +0x4f
Previous read at 0x00c0004f6120 by goroutine 130:
github.com/flightctl/flightctl/internal/agent/device/applications.(*application).Status()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/applications.go:243 +0x13e
github.com/flightctl/flightctl/internal/agent/device/applications.TestListenForEvents.func1.5()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor_test.go:301 +0x90
github.com/stretchr/testify/assert.Eventually.func1()
/home/sbatsche/go/pkg/mod/github.com/stretchr/testify@v1.10.0/assert/assertions.go:1949 +0x33
Goroutine 113 (running) created at:
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).ensureMonitorForUser()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:93 +0x356
github.com/flightctl/flightctl/internal/agent/device/applications.(*PodmanMonitor).ExecuteActions()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor.go:339 +0xb84
github.com/flightctl/flightctl/internal/agent/device/applications.TestListenForEvents.func1()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor_test.go:277 +0x18b5
testing.tRunner()
/usr/lib/golang/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/usr/lib/golang/src/testing/testing.go:1997 +0x44
Goroutine 130 (finished) created at:
github.com/stretchr/testify/assert.Eventually()
/home/sbatsche/go/pkg/mod/github.com/stretchr/testify@v1.10.0/assert/assertions.go:1949 +0x3b2
github.com/stretchr/testify/require.Eventually()
/home/sbatsche/go/pkg/mod/github.com/stretchr/testify@v1.10.0/require/require.go:398 +0xd1
github.com/stretchr/testify/require.(*Assertions).Eventually()
/home/sbatsche/go/pkg/mod/github.com/stretchr/testify@v1.10.0/require/require_forward.go:320 +0xc4
github.com/flightctl/flightctl/internal/agent/device/applications.TestListenForEvents.func1()
/home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor_test.go:293 +0x1b1b
testing.tRunner()
/usr/lib/golang/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/usr/lib/golang/src/testing/testing.go:1997 +0x44
==================
time="2026-02-05T16:07:46.720239Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"init","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.720410Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"create","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.720484Z" level=debug msg="test: Adding container: app1-service-2-container to app app1" file="device/applications/podman_monitor.go:489"
time="2026-02-05T16:07:46.720577Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"start","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.720751Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"stop","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
testing.go:1617: race detected during execution of test
time="2026-02-05T16:07:46.820427Z" level=debug msg="test: Done listening for podman events for user " file="device/applications/podman_monitor.go:676"
=== FAIL: internal/agent/device/applications TestListenForEvents/single_app_multiple_containers_started_then_one_manual_stop_result_sigkill (0.10s)
time="2026-02-05T16:07:46.821022Z" level=error msg="test: Failed to parse bootTime "": parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"" file="device/applications/podman_monitor.go:58"
time="2026-02-05T16:07:46.821140Z" level=info msg="test: Starting podman monitor for user "
time="2026-02-05T16:07:46.821187Z" level=debug msg="test: Replaying podman events for user since: 2026-02-05 16:07:46.821076374 -0500 EST m=+1.311090294" file="device/applications/podman_monitor.go:632"
time="2026-02-05T16:07:46.822178Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"init","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.822466Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"create","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.822700Z" level=debug msg="test: Adding container: app1-service-1-container to app app1" file="device/applications/podman_monitor.go:489"
time="2026-02-05T16:07:46.822784Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"start","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.822980Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"init","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.823176Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"create","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:46.823303Z" level=debug msg="test: Adding container: app1-service-2-container to app app1" file="device/applications/podman_monitor.go:489"
controller.go:243: missing call(s) to *executer.MockExecuter.ExecuteWithContext(is anything, is equal to podman (string), is equal to inspect (string), is anything) /home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor_test.go:250
controller.go:243: aborting test due to missing call(s)
=== FAIL: internal/agent/device/applications TestListenForEvents/single_app_multiple_containers_one_error_one_running (0.10s)
time="2026-02-05T16:07:47.025267Z" level=debug msg="test: Done listening for podman events for user " file="device/applications/podman_monitor.go:676"
time="2026-02-05T16:07:47.025508Z" level=error msg="test: Failed to parse bootTime "": parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"" file="device/applications/podman_monitor.go:58"
time="2026-02-05T16:07:47.025585Z" level=info msg="test: Starting podman monitor for user "
time="2026-02-05T16:07:47.025615Z" level=debug msg="test: Replaying podman events for user since: 2026-02-05 16:07:47.025545705 -0500 EST m=+1.515559595" file="device/applications/podman_monitor.go:632"
time="2026-02-05T16:07:47.026781Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"init","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:47.027035Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"create","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:47.027144Z" level=debug msg="test: Adding container: app1-service-1-container to app app1" file="device/applications/podman_monitor.go:489"
time="2026-02-05T16:07:47.027199Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-1-container","Status":"start","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-1","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:47.027375Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"init","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:47.027517Z" level=debug msg="test: Received podman event for user : {"ID":"8559c630e04ea852101467742e95b9e371fe6dd8c9195910354636d68d388a40","Image":"docker.io/library/alpine:latest","Name":"app1-service-2-container","Status":"create","Type":"container","timeNano":0,"Attributes":{"PODMAN_SYSTEMD_UNIT":"podman-compose@user.service","com.docker.compose.container-number":"1","com.docker.compose.project":"app1-229522","com.docker.compose.project.config_files":"podman-compose.yaml","com.docker.compose.project.working_dir":"/usr/local/lib/compose/app1","com.docker.compose.service":"app1-service-2","io.podman.compose.config-hash":"dc33a4cfdb3cf6b442309e44bd819fcba2ce89393f5d80d6b6b0e9ebb4767e25","io.podman.compose.project":"app1","io.podman.compose.version":"1.0.6"}}" file="device/applications/podman_monitor.go:664"
time="2026-02-05T16:07:47.027555Z" level=debug msg="test: Adding container: app1-service-2-container to app app1" file="device/applications/podman_monitor.go:489"
controller.go:243: missing call(s) to *executer.MockExecuter.ExecuteWithContext(is anything, is equal to podman (string), is equal to inspect (string), is anything) /home/sbatsche/work/projects/flightctl/repo/internal/agent/device/applications/podman_monitor_test.go:250
controller.go:243: aborting test due to missing call(s)
=== FAIL: internal/agent/device/applications TestListenForEvents (3.92s)
time="2026-02-05T16:07:49.536088Z" level=debug msg="test: Done listening for podman events for user " file="device/applications/podman_monitor.go:676"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment