aemc
aemc copied to clipboard
Timezone 'Australia/Sydney' missing for Docker image
I'm based in Sydney Australia and when I run a command like 'docker run -it ghcr.io/wttech/aemc-cli package list -U http://host.docker.internal:4502' I get the following stack trace
`INFO[2023-10-30 01:36:17] packages listed
instance
WARN[2023-10-30 01:36:17] remote_adhoc > cannot load time location 'Australia/Sydney': unknown time zone Australia/Sydney
panic: time: missing Location in call to Time.In
goroutine 1 [running]: time.Time.In(...) /opt/hostedtoolcache/go/1.19.13/x64/src/time/time.go:1122 github.com/wttech/aemc/pkg.Instance.Now({0xc00031e070, {0xc000329600, 0xc}, {0xc33b5d, 0x5}, {0xc33b5d, 0x5}, 0x0, 0xc000298330, 0xc000333f20, ...}) /home/runner/work/aemc/aemc/pkg/instance.go:232 +0x13a github.com/wttech/aemc/pkg.EventStableChecker.Check({0x12a05f200, {0xc000284480, 0x3, 0x3}, {0xc0002844b0, 0x3, 0x3}}, {{0xc147e0046caf3754, 0x3d287494, 0x1324f20}}, ...) /home/runner/work/aemc/aemc/pkg/check.go:153 +0xc5 github.com/wttech/aemc/pkg.Instance.HealthChecks({0xc00031e070, {0xc000329600, 0xc}, {0xc33b5d, 0x5}, {0xc33b5d, 0x5}, 0x0, 0xc000298330, 0xc000333f20, ...}) /home/runner/work/aemc/aemc/pkg/instance.go:273 +0x3ce github.com/wttech/aemc/pkg.Instance.State({0xc00031e070, {0xc000329600, 0xc}, {0xc33b5d, 0x5}, {0xc33b5d, 0x5}, 0x0, 0xc000298330, 0xc000333f20, ...}) /home/runner/work/aemc/aemc/pkg/instance.go:55 +0x158 github.com/wttech/aemc/pkg.Instance.MarshalText({0xc00031e070, {0xc000329600, 0xc}, {0xc33b5d, 0x5}, {0xc33b5d, 0x5}, 0x0, 0xc000298330, 0xc000333f20, ...}) /home/runner/work/aemc/aemc/pkg/instance.go:303 +0x58 github.com/wttech/aemc/pkg/common/fmtx.MarshalText({0xc1c1c0, 0xc00033a140}) /home/runner/work/aemc/aemc/pkg/common/fmtx/serialization.go:127 +0x42 main.(*CLI).printOutputDataIndented(0xb6c520?, 0xc000022190, {0xc1c1c0, 0xc00033a140?}, {0xc00038c0b0, 0x8}) /home/runner/work/aemc/aemc/cmd/aem/cli.go:293 +0x4e5 main.(*CLI).printOutputDataIndented(0x0?, 0xc000022140, {0xb7cf40, 0xc00032ca80?}, {0x0, 0x0}) /home/runner/work/aemc/aemc/cmd/aem/cli.go:285 +0x7ad main.(*CLI).printDataAll(0xc00016a1c0) /home/runner/work/aemc/aemc/cmd/aem/cli.go:256 +0x138 main.(*CLI).printOutputText(0xc00016a1c0) /home/runner/work/aemc/aemc/cmd/aem/cli.go:210 +0x47 main.(*CLI).onEnd(0xc00016a1c0) /home/runner/work/aemc/aemc/cmd/aem/cli.go:180 +0x14a main.(*CLI).rootCmd.func2(0xc0002bfb00?, {0xc33240?, 0x2?, 0x2?}) /home/runner/work/aemc/aemc/cmd/aem/root.go:17 +0x1d github.com/spf13/cobra.(*Command).execute(0xc0002bfb00, {0xc000292a40, 0x2, 0x2}) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:977 +0xa47 github.com/spf13/cobra.(*Command).ExecuteC(0xc0002a2000) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1090 +0x425 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1014 main.(*CLI).Exec(...) /home/runner/work/aemc/aemc/cmd/aem/cli.go:84 main.(*CLI).MustExec(0xc0000061a0?) /home/runner/work/aemc/aemc/cmd/aem/cli.go:88 +0x1d main.main() /home/runner/work/aemc/aemc/cmd/aem/main.go:11 +0x25 `
Hmm maybe try using AEMC natively 🤔🙂 TBH docker image is here but till now I haven't found any use case for it. Probably there is some mismatch between java timezone naming and OS-related one. If you have some time I am open to merge a fix if you will find some. If you expect to have it fixed it will take some time as I have more prioritised tasks now... Sorry 🙂 greetings
BTW warn was planned not panic here. At least some fallback should be in use.
Hello @krystian-panek-wttech nice to meet you in another project 😄 so this is linked to Go version I think. I'll try something out and see if I can fix it.
I guess I saw your name somewhere at the AdaptTo Conference 🤔...am I right? 🙂
Missing location means like reading timezone from java fails or even it is not set properly