Cockpit-HQ / Cockpit

Cockpit Core - Content Platform
https://getcockpit.com
Other
388 stars 47 forks source link

filter null values in log view (broke if empty db entry exists) #86

Closed raffaelj closed 1 year ago

raffaelj commented 1 year ago

See my comment on discourse: https://discourse.getcockpit.com/t/gdpr-and-iso-27001/2528/7?u=raffaelj

@aheinze Your latest changes to MongoLite fixed the db part. This change prevents the layout from breaking if empty entries exist.

edit: I had a look at the issues. This should also solve #85.

aheinze commented 1 year ago

The question is why there is even a nulled document 🤔 I would like to fix the cause issue. Do you have any idea how this could have happen?

raffaelj commented 1 year ago

Do you have any idea how this could have happen?

I sent you an email with the system.sqlite from my test instance. I digged through time stamps and error messages - and I'm not able to reproduce the error. The biggest problem: The empty db entries occurered 2022-08-02 during my intensive tests.

So I can track it down to:

It might have something to do with missing/wrong write permissions (wrong docker mounts, addon tests...).

And it happened before the 2FA fix in the login modal was implemented.

I also did some testing with spaces, which weren't fully implemented at that time. I found another system.sqlite in a test .spaces folder, that shares the same first 24 entries with the test file, I sent to you - including all the empty entries. From entry 25 on, there are no empty entries anymore. My main test db continues to produce emty entries after entry 24. I guess, I copied the data folder, so I don't have to create users etc. again.

So, my best guesses are:

raffaelj commented 1 year ago

edit: moved reply to issue: https://github.com/Cockpit-HQ/Cockpit/issues/85#issuecomment-1601184214

aheinze commented 1 year ago

Thanks!