-
-
Notifications
You must be signed in to change notification settings - Fork 369
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 url too long for pipeline 'avatar' column #4278
Comments
It actually is 500 chars long: woodpecker/server/model/user.go Line 61 in ac1962b
Maybe something went wrong in your setup? Can you manually alter the data type? |
Confirm on woodpecker/server/model/pipeline.go Line 45 in ac1962b
|
That's the users table, but it's 255 chars on the pipeline table, which also stores the avatar url (maybe there's also an opportunity to dedup the data here...) By the way we manually altered the pipeline table avatar column from varchar 255 to varchar 500 and it fixed the problem on our end 👍🏻 |
Component
server
Describe the bug
For some unknown reason (still trying to reproduce) one of our users had their github avatar url generated with a token. For example, a common GitHub avatar url might be:
https://avatars.githubusercontent.com/u/7269710?v=4
While for this user it was showing as:
https://private-avatars.githubusercontent.com/u/2729053?jwt="token"&v=4
This url had a total of 312 characters. The avatar displays correctly in GitHub, but the full URL with the jwt token is sent by the Github webhook to Woodpecker, which tries to store it in the database. The
users
table usescharacter varying(500)
for avatar but thepipelines
table usescharacter varying(255)
.Then we get:
Steps to reproduce
Unfortunately we're not sure how to generate a GitHub avatar url with a jwt again. Presumably the user simply changed their avatar normally, by going to their user settings page at https://github.com/ and uploading a new image. It could be a GitHub update or bug, but I couldn't find any information about it.
Expected behavior
Wether we can reproduce or not, it seems reasonable to use
character varying(500)
for the avatar field in both tables.System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: