bcgov / orgbook-bc-client

Vue.js rewrite of OrgBook BC
Apache License 2.0
6 stars 8 forks source link

Error starting orgbook-web (frontend) container when deployed to OpenShift #187

Closed WadeBarnes closed 1 year ago

WadeBarnes commented 1 year ago

After merging https://github.com/bcgov/orgbook-bc-client/pull/185 the updated code was built the deployed into OpenShift. The resulting container is failing to start with the following error:

panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.21 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.21 set. Notably, if go1.21 adds a moving garbage collector, this program is unsafe to use.

goroutine 1 [running]:
go4.org/unsafe/assume-no-moving-gc.init.0()
    go4.org/unsafe/assume-no-moving-gc@v0.0.0-20220617031537-928513b29760/untested.go:25 +0x1da
WadeBarnes commented 1 year ago

I don't see how the code changes would cause this so I'm investigating this as a dependency issue.

WadeBarnes commented 1 year ago

@amanji, Any thoughts?

amanji commented 1 year ago

I've never run into that issue. Seems to be specific to OpenShift. @esune have you seen this error before?

amanji commented 1 year ago

Also curious what could be importing a Golang package here. This should be strictly front end.

WadeBarnes commented 1 year ago

Here are the build logs; https://console.apps.silver.devops.gov.bc.ca/k8s/ns/8ad0ea-tools/builds/frontend-71/logs

WadeBarnes commented 1 year ago

Looks like it's Caddy that's importing Go.

WadeBarnes commented 1 year ago

Might be associated to the rate limited plugin. There is a new release I'm going to try.

esune commented 1 year ago

The dockerfile is also pulling the latest caddy-builder and caddy images as far as I can tell, rather than a pinned version: there was a new release 13 days ago, a mismatch between versions of builder/runtime/installed plugins might also need to be investigated.

WadeBarnes commented 1 year ago

Updating RussellLuo/caddy-ext/ratelimit from v0.2.0 to v0.3.0 fixed the issue. I'll submit a PR shortly.

WadeBarnes commented 1 year ago

The dockerfile is also pulling the latest caddy-builder and caddy images as far as I can tell, rather than a pinned version: there was a new release 13 days ago, a mismatch between versions of builder/runtime/installed plugins might also need to be investigated.

I did that on purpose to make sure we're using the latest with each new build. The deployed versions are then fixed in/by the image.