wttech / aemc

AEM Compose (Core & CLI)
https://wttech.blog/blog/2023/get-your-aem-together-with-aem-compose/
Apache License 2.0
40 stars 5 forks source link

Unknown time zone Etc/UTC #250

Closed piotr-andruszkiewicz-wttech closed 1 month ago

piotr-andruszkiewicz-wttech commented 5 months ago

I started to receive this stacktrace:

$ ./aemw -I int_author instance await
INFO[2024-04-11 10:17:20] int_author > awaiting started
INFO[2024-04-11 10:17:22] int_author > all bundles stable
WARN[2024-04-11 10:17:22] int_author > cannot load time location 'Etc/UTC': unknown time zone Etc/UTC
panic: time: missing Location in call to Time.In

goroutine 5 [running]:
time.Time.In(...)
        /opt/hostedtoolcache/go/1.20.14/x64/src/time/time.go:1146
github.com/wttech/aemc/pkg.Instance.Now({0xc00027aee0, {0xc000250da0, 0xa}, {0xc000250dd4, 0x9}, {0xc00012b3f8, 0x12}, 0x0, 0xc000115710, 0xc00034f9d0, ...})
        /home/runner/work/aemc/aemc/pkg/instance.go:248 +0x13a
github.com/wttech/aemc/pkg.EventStableChecker.Check({0x0, 0x12a05f200, {0xc0002e14c0, 0x3, 0x4}, {0xc0002e1580, _, _}}, {{0xc17e05041922a2cc, 0x2c20055, ...}}, ...)
        /home/runner/work/aemc/aemc/pkg/check.go:177 +0xd8
github.com/wttech/aemc/pkg.(*InstanceManager).checkOne(0x0?, {0x165e8c0, 0xc000399980}, {0xc00027aee0, {0xc000250da0, 0xa}, {0xc000250dd4, 0x9}, {0xc00012b3f8, 0x12}, ...}, ...)
        /home/runner/work/aemc/aemc/pkg/instance_manager_check.go:137 +0x18d
github.com/wttech/aemc/pkg.(*InstanceManager).check.func1({0xc00027aee0, {0xc000250da0, 0xa}, {0xc000250dd4, 0x9}, {0xc00012b3f8, 0x12}, 0x0, 0xc000115710, 0xc00034f9d0, ...})
        /home/runner/work/aemc/aemc/pkg/instance_manager_check.go:124 +0x7e
github.com/wttech/aemc/pkg/common/lox.ParallelMap[...].func1()
        /home/runner/work/aemc/aemc/pkg/common/lox/lox.go:23 +0x7b
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /home/runner/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
        /home/runner/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:72 +0xa5

Adding -tags timetzdata option to the go build fixes the issue.

Ref: https://stackoverflow.com/a/78204817