Closed
Description
Seen here: https://github.com/coder/coder/actions/runs/6220231093/job/16879836602?pr=9718
=== FAIL: codersdk/agentsdk TestStartupLogsSender/context_canceled_during_flush (0.01s)
t.go:85: 2023-09-18 08:50:53.730 [warn] startup logs sender exiting early, discarding logs discarded_logs_count=1
t.go:85: 2023-09-18 08:50:53.731 [debu] startup logs sender exited
logs_test.go:380:
Error Trace: /home/runner/actions-runner/_work/coder/coder/codersdk/agentsdk/logs_test.go:380
Error: Not equal:
expected: []agentsdk.Log(nil)
actual : []agentsdk.Log{agentsdk.Log{CreatedAt:time.Date(2023, time.September, 18, 8, 50, 53, 722865839, time.Local), Output:"hello world", Level:"info", Source:""}}
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,21 @@
-([]agentsdk.Log) <nil>
+([]agentsdk.Log) (len=1) {
+ (agentsdk.Log) {
+ CreatedAt: (time.Time) {
+ wall: (uint64) 13923478286808518319,
+ ext: (int64) 37459484,
+ loc: (*time.Location)({
+ name: (string) "",
+ zone: ([]time.zone) <nil>,
+ tx: ([]time.zoneTrans) <nil>,
+ extend: (string) "",
+ cacheStart: (int64) 0,
+ cacheEnd: (int64) 0,
+ cacheZone: (*time.zone)(<nil>)
+ })
+ },
+ Output: (string) (len=11) "hello world",
+ Level: (codersdk.LogLevel) (len=4) "info",
+ Source: (codersdk.WorkspaceAgentLogSource) ""
+ }
+}
Test: TestStartupLogsSender/context_canceled_during_flush