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

Avatar update issue #18

Closed
luxiaba opened this issue Dec 8, 2021 · 10 comments
Closed

Avatar update issue #18

luxiaba opened this issue Dec 8, 2021 · 10 comments

Comments

@luxiaba
Copy link
Contributor

luxiaba commented Dec 8, 2021

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
Copy link
Collaborator

livid commented Dec 8, 2021

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
Copy link
Collaborator

livid commented Dec 8, 2021

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

@luxiaba
Copy link
Contributor Author

luxiaba commented Dec 8, 2021

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
Copy link
Collaborator

livid commented Dec 8, 2021

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

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

@luxiaba
Copy link
Contributor Author

luxiaba commented Dec 8, 2021

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
Copy link
Collaborator

livid commented Dec 8, 2021

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

@livid
Copy link
Collaborator

livid commented Dec 8, 2021

Basically, we need is:

  1. Build an image with Dockerfile
  2. Run a container with the image
  3. Run tests against the container

@luxiaba
Copy link
Contributor Author

luxiaba commented Dec 8, 2021

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
Copy link
Collaborator

livid commented Dec 8, 2021

Thanks!

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

@luxiaba
Copy link
Contributor Author

luxiaba commented Dec 8, 2021

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).

@luxiaba luxiaba closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants