v2ex / remote

Remote Worker
https://www.v2ex.com/go/dev
MIT License
81 stars 4 forks source link

Avatar update issue #18

Closed luxiaba closed 2 years ago

luxiaba commented 2 years ago

It seems there is still a problem when updating the avatar. I tried just now and got a error: 图片处理没有成功,请重试一次, maybe you can find more details on sentry, if there is anything I need to update, please feel free to let me know : (

livid commented 2 years ago

Can you mail me the file that caused the issue you saw? livid@v2ex.com

Sentry did not catch it.

Or, you can try to reproduce it locally:

curl -F "file=@problem.jpg" http://IP:PORT/images/resize_avatar

livid commented 2 years ago

My bad, it was a Docker issue in the production. I am looking into it now.

luxiaba commented 2 years ago

curl -F "file=@problem.jpg" http://IP:PORT/images/resize_avatar

I've tested it locally, and everything is ok.

My bad, it was a Docker issue in the production. I am looking into it now.

Maybe we can use Github CI for continuous deployment in the future, It might help.

livid commented 2 years ago

It was caused by a missing Debian package in 3.10-slim.

We need a way to build and test Docker image too.

luxiaba commented 2 years ago

I think i can help on this, which container registry do you want to use or decide later?

BTW, i've try to update avatar again, it works good 🥳

livid commented 2 years ago

Is it possible to do it with GitHub Action and other GitHub services? IIRC GitHub has a registry too?

livid commented 2 years ago

Basically, we need is:

  1. Build an image with Dockerfile
  2. Run a container with the image
  3. Run tests against the container
luxiaba commented 2 years ago

Yes, use Github Action to build image then push to CR(Github Container Registry / GCR / ECR /...) is a common usage, for example we can use this action script by docker to push image to one or more CR.

  • Build an image with Dockerfile
  • Run a container with the image
  • Run tests against the container

seems reasonable. i'll try to do in several days.

livid commented 2 years ago

Thanks!

Meanwhile, I am going to add more checks on the client-side (V2EX) to ensure a live worker is running.

luxiaba commented 2 years ago

Great! maybe it would be convenient to make a status page for MOD to view 😂

i'm going to close this issue and open a new one(use Github Action to build image and test).