mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Manual database changes not reflecting in Uptime Kuma while app is running #1213
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#1213
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 @joe-eklund on GitHub (Jun 26, 2022).
⚠️ Please verify that this bug has NOT been raised before.
🛡️ Security Policy
Description
Hello-
I am attempting to change some values in the database directly with DB Browser for SQLite. For example, flipping the
activevalue of a monitor from1to0. When I do this while Uptime Kuma is not running, when I start up Uptime Kuma it picks up my changes just fine.But when Uptime Kuma is already running and I attempt to make this change to the database, those changes are not reflected in Uptime Kuma. And then when I do something in Uptime Kuma that requires an update to the database (say changing the name of a monitor), the changes I made through DB Browser are overwritten like they never happened.
I get the same behavior when I use Python to interact with the database. I am also getting some other weird behavior that seems inconsistent regarding changes not persisting when they are done across different clients (UK, DB Browser, and Python), but I think they are all related to some underlying issue. This is just a hunch, and once this issue is resolved, if those other problems persist I can make new issue(s).
👟 Reproduction steps
activevalue in the database directly using something like DB Browser.👀 Expected behavior
The expected behavior is that making changes to the database should be accurately reflected in Uptime Kuma, especially when Uptime Kuma is running. And when changes are made in Uptime Kuma, they should not overwrite the changes I made to the database directly.
This expected behavior does work like this when I interact with the database with my python API and DB Browser (with Uptime Kuma spun down). Meaning if I update the database with DB Browser, my Python API (which is using the same database) does accurately see the changes. And when I make changes to the database through my Python API, DB Browser sees the changes correctly.
I would like this behavior to also work with Uptime Kuma, that way I can manually update the database without having to spin down Uptime Kuma.
😓 Actual Behavior
Instead, UK does not see the changes I made to the database, and will overwrite my manual changes when it makes its own update to the database.
🐻 Uptime-Kuma Version
1.17.0
💻 Operating System and Arch
MacOS 11.6.6
🌐 Browser
Chrome Version 102.0.5005.115
🐋 Docker Version
Docker version 20.10.12, build e91ed5707e
🟩 NodeJS Version
No response
📝 Relevant log output
@louislam commented on GitHub (Jun 27, 2022):
I change it to
feature-request, as it is an expected behavior and I think it is quite normal for relational database without live data.@joe-eklund commented on GitHub (Jun 27, 2022):
I see. I disagree that it is normal for any database to behave in this way, but it is your project, so you definitely have final say on application behavior.
I have never encountered any other application that behaves this way, which is why I feel it's a bug. This behavior is pretty critical for the RESTful API I am developing to function correctly, so I hope that you consider changing this to reflect the expected behavior above.
Thanks!
@CommanderStorm commented on GitHub (Dec 6, 2023):
Given the current architecture of Uptime Kuma I would classify this is a
wontfix(read: not in scope) issue.The reason behind this is that SQLite would require going to the C-API-level (I think should not be opening this pandoras box) and MariaDB would require even worse hacks.
=> Polling would be the only option
=> given how minor the feature is, this is not worth the very significant engineering effort required.
closing as not planned due to the rationale explained above (if a good argument is made why this is nessesary/.. we can reopen)
Instead of expecting that we look if somebody changed the database while we were not looking:
Alternatively (this is the actual path that I think this should be done with):