mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-26 07:25:51 +03:00
[GH-ISSUE #947] Healthchecks Update Results in 'badly formed hexadecimal UUID string' Error #664
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#664
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jimmybrancaccio on GitHub (Jan 24, 2024).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/947
Hello Team,
It looks like my Healthchecks instance updated to the latest 3.x release. I actually hadn't realized this so that was my fault. That said, when I tried logging into my instance today it started to fail. I enabled debugging and saw the below message in my logs. I am using the Docker image
healthchecks/healthchecks:latest. I didn't change any environment variables between the last 2.x version and now (except to enable debugging).From the Docker container logs I am seeing:
It looks like I may have missed a migration in MySQL? I did check through the release notes but didn't see anything that was necessary to do manually when upgrading to a 3.x release - though it's possible I missed something and I apologize about that. I also checked the issues in GitHub but didn't see anyone else reporting this (yay lucky me!).
Of note, I also saw this message when the container was being started up and I did perform it's recommended actions:
I did go into the container and I ran
./manage.py makemigrationsand./manage.py migrate. It did import them without issue. Oddly enough each time the container restarts or is created I get that same messaging about the api model not being reflected in a migration.If anyone has any ideas on what I can do to resolve this it would be greatly appreciated. If any other information is needed to troubleshoot the problem please don't hesitate to let me know!
Thanks,
@cuu508 commented on GitHub (Jan 24, 2024):
Thanks for the report.
My initial guess is that this might have something to do with the upgrade to Django 5.0. (Django's handling of UUID fields changed in the 4.x -> 5.0 upgrade).
If you can, drop into the database shell and run the following query:
All
codevalues should be UUIDs. See if there are any suspicious value (empty, or something other than an UUID).@jimmybrancaccio commented on GitHub (Jan 24, 2024):
Hi @cuu508,
I think you're definitely right. I actually started to dig into the database right after my post. I noticed the first project which didn't have any values in the
nameorowner_idcolumns. I updated that. I then noticed thebadge_keyvalue looked a little off so I tried to get that to work based on what other projects looked like. Here's what it looks like now, I formatted the output in JSON, I hope that's okay:Prior to this the
badge_keyvalue was39ede81be00b4878a8f8975146. Unfortunately even after updating it I am still getting the same error --badly formed hexadecimal UUID string.@cuu508 commented on GitHub (Jan 24, 2024):
Try to format the UUID with dashes for the
codecolumn:89d1d57c-24bc-4261-9c8b-9751460a3b2c.@jimmybrancaccio commented on GitHub (Jan 24, 2024):
Ok, I think we're getting a bit closer! Now it seems to be a user/profile issue from what I can understand.
@jimmybrancaccio commented on GitHub (Jan 24, 2024):
Quick update, it's gotta be something in the 3.1 release. I changed first to 2.10 and that worked fine, then changed to 3.0.1 and that seems to be working fine.
@jimmybrancaccio commented on GitHub (Jan 24, 2024):
Ok, I think I finally got it figured out. I looked at all the tables and anywhere there was a
codecolumn, I set the data type fromCHAR(32)toUUID. Haven't hit any issues since then 😝@cuu508 commented on GitHub (Jan 28, 2024):
Glad to hear you got it resolved!
Is this a reproducible issue? If you set up a fresh install with, say, 3.0.1, and upgrade to 3.1, do you run into the same issue?
@jimmybrancaccio commented on GitHub (Jan 28, 2024):
@cuu508 I believe it would only be reproducible if you started with MariaDB 10.6 or less. I am 99% sure when I originally installed Healthchecks I was using some version of MariaDB where the field
codedefaulted tochar(32)(https://docs.djangoproject.com/en/5.0/ref/models/fields/#uuidfield), probably MariaDB 10.4.Between when I originally installed Healthchecks and when it updated to v3.1, I've also updated to MariaDB 10.11 but the fields were never converted to
uuidand have stayed aschar(32).I think, if possible, it would be good idea to add a check in there that checks to see if MariaDB 10.7+ is being used (or MySQL 8+ - I think that version supports the
uuiddata type), and if it is, then a migration runs to convert thosecodecolumns to useuuidas the data type.@cuu508 commented on GitHub (Feb 3, 2024):
I think this is the same issue as #929