-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Manual database changes not reflecting in Uptime Kuma while app is running #1840
Comments
I change it to |
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! |
Given the current architecture of Uptime Kuma I would classify this is a 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):
|
🛡️ Security Policy
Description
Hello-
I am attempting to change some values in the database directly with DB Browser for SQLite. For example, flipping the
active
value of a monitor from1
to0
. 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
active
value 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
The text was updated successfully, but these errors were encountered: