Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Docker release is broken starting from 9.4.0 #3430

Closed
mmattel opened this issue Nov 17, 2023 · 23 comments
Closed

[bug] Docker release is broken starting from 9.4.0 #3430

mmattel opened this issue Nov 17, 2023 · 23 comments
Assignees
Labels
bug Something isn't working

Comments

@mmattel
Copy link

mmattel commented Nov 17, 2023

Q: when there is a new release like in the screenshot below, what is the expected update on hub.docker to make the release availabe?

Repo
image
hub.docker
image

@mmattel mmattel added the question Further information is requested label Nov 17, 2023
@myoung34
Copy link

This also bit me here
It picks up releases but this project seems to consistently not publish

@myoung34
Copy link

myoung34 commented Nov 17, 2023

Seems to be related to this.

If theyre consistently failing from timeout it might be worthwhile to run the different arch docker builds simultaneously instead of in series

image

@robertsLando
Copy link
Member

I'm aware of this guys and I'm sorry for the inconvenience but I don't understand what's going on, it's an issue with zui but seems something related to github actions/docker or yarn....

@myoung34
Copy link

The builds are timing out if you look at the error. Your best bet is to build them in parallel similar to how I do

it's basically an update to your yaml

@robertsLando
Copy link
Member

What I sincerly do not understand is why they always worked and then suddenly stopped working. It happened to me on another project with the same result, with armv6/v7 install simply hangs for no reason. Notice that the test workflows (each test runs on a specific arch) end successfully so the error happens only when building all archs together with buildx. This makes me think something may have changed on action runner env

@myoung34
Copy link

It could be, but the blast radius would be smaller in parallel (they'd upload as they finish instead of failing at the very end for all if one does)

You could always try qemu/buildx instead of uraimo/run-on-arch-action@v2 and see if that helps

@robertsLando
Copy link
Member

@myoung34 Wait, it's not run-on-arch-action that fails, it's docker build-push action

@myoung34
Copy link

myoung34 commented Nov 17, 2023

This run failed to build and push for a 2 hour timeout and comes from this workflow file but youre right, i was looking at the wrong file in my previous. but you could still split them up so they all build simultaneously similar to mine

Splitting them up would also make it easier to read the logs per arch build, but aside from that there's a lot of

#33 585.0 failed to compile wasm module: RangeError: WebAssembly.Instance(): Out of memory: wasm memory
#33 585.1 ➤ YN0001: │ RangeError: WebAssembly.Instance(): Out of memory: wasm memory

which could be why it "hangs"

@robertsLando
Copy link
Member

I already saw that and seems related to yarn, but what I don't get is firstly why it suddenly stopped working, second why that error is not always shown, it appeared only on some logs not all... sometimes build fail others it hangs, I will do more tries on Monday as I'm busy this weekend but if someone finds a solution feel free to open a PR. Sorry for the inconvenience guys

@robertsLando
Copy link
Member

I have a feel it's something related to yarn install eating all memory on arm32: yarnpkg/berry#3972.

x64 takes few seconds to complete, arm64 takes around 5 minutes and arm32 just hangs...

@robertsLando
Copy link
Member

robertsLando commented Nov 24, 2023

Considerations

The only error I saw was: https://github.com/zwave-js/zwave-js-ui/actions/runs/6891324352/job/18756410049#step:11:773

 failed to compile wasm module: RangeError: WebAssembly.Instance(): Out of memory: wasm memory
➤ YN0001: │ RangeError: WebAssembly.Instance(): Out of memory: wasm memory

This only happens on armv6 and armv7 and seems related to yarn. Cool thing is I saw it only once (see the link) then no more. Could be the root cause or just something else, dunno.

Related issues:

What I tried

  • Upgrade yarn to v4 (previously was 3.2.1)
  • Pre-install all deps before running buildx, remove node_modules from dockerignore and inside docker image skip the yarn install if node modules folder is present. The hang now happens on yarn rebuild command (needed for serialport)
  • Tried to upgrade all gh actions to latest
  • Checked if runner version changed between last succeed image and the first errored one, seems to be the same: 2.311.0

Failed: https://github.com/zwave-js/zwave-js-ui/actions/runs/6891324352/job/18756410049#step:1:1
Success: https://github.com/zwave-js/zwave-js-ui/actions/runs/6888473577/job/18737546618#step:1:1

To try

  • Try to run buildx locally to see if it hangs there too, if so

If anyone has any alternative I'm open to suggestions 🙌🏼

/cc @chrisns

@robertsLando robertsLando added bug Something isn't working and removed question Further information is requested labels Nov 24, 2023
@robertsLando robertsLando changed the title Delay between release and container publish [bug] Docker release is broken starting from 9.4.0 Nov 24, 2023
@robertsLando robertsLando pinned this issue Nov 24, 2023
@getlarge
Copy link

@robertsLando I don't know if they are enabled in this organization, but have you tried larger runners ?

@robertsLando
Copy link
Member

@getlarge already checked and I don't have them, dunno if they could be enabled by @AlCalzone on organization settings?

@chrisns
Copy link
Member

chrisns commented Nov 24, 2023

thats a pay for feature unless github are being super generous

@chrisns
Copy link
Member

chrisns commented Nov 24, 2023

parallel building with a runner for each arch would be lovely but unless someone has an easy suggestion on how to fan out and fan back in to push a single (multi arch) docker image it doesn't really work, though would provide a full runner's compute resource to each arch build

@robertsLando
Copy link
Member

robertsLando commented Nov 24, 2023

I think a way could be to export the image as asset and import all them in the final step and push all them together.

Anyway this action is failing too and it runs on a single arch: https://github.com/zwave-js/zwave-js-ui/actions/runs/6960011576

I would be curious to know if the buildx works locally. So for now it seems the same:

Schermata del 2023-11-24 18-51-16

amd takes a minute to complete, arm has just complete now while I'm writing (took 6x the time of amd). Lets see if the others keep for more then an hour

@robertsLando
Copy link
Member

robertsLando commented Nov 24, 2023

Ok nice finding... using npm rebuild in place of yarn rebuild has reduced build time for arm64 from 360s to 150s. Let's see how it goes for arm32...

UPDATE: still not working

@robertsLando
Copy link
Member

Fixed by #3443 🎉

@snowmangh
Copy link

Hello. Looks like this issue has been resolved? I just tried and getting the same error 400.

@chrisns
Copy link
Member

chrisns commented Dec 1, 2023

400 on trying to pull from docker hub?
What Arch?
I'd generally suggest using ghcr instead of docker to avoid rate caps etc

@snowmangh
Copy link

@chrisns Yes, from docker.io zwavejs/zwave-js-ui:latest. I always used this method without issues, so far via Portainer.

What Arch? Apollolake

@robertsLando
Copy link
Member

@snowmangh run uname -a to find the arch. Anyway it is on docker so you may be having some other issue

@snowmangh
Copy link

@robertsLando Here's what I got.

Linux Defiant 4.4.302+ #69057 SMP Mon Nov 13 14:21:00 CST 2023 x86_64 GNU/Linux synology_apollolake_918+

BTW, I just added ghcr.io in Portainer/Registries and pulled this image "zwave-js/zwave-js-ui:9.5.1". It worked no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants