martomi / chiadog

A watch dog providing a peace in mind that your Chia farm is running smoothly 24/7.
MIT License
460 stars 123 forks source link

Migrate configuration handling to the confuse lib #363

Closed jinnatar closed 1 year ago

jinnatar commented 1 year ago

This is very much a work in progress, just wanted to be transparent and make the current status visible. The current state is able to run the example config and known minimal configs but needs more testing.

This change touches all integrations and has minor potential for subtle breakage. The following have been thoroughly tested:

Groundwork for fixing #361

jinnatar commented 1 year ago

That all makes sense, thanks for the thorough review!

jinnatar commented 1 year ago

I think this might now be in a sane state, but was only able to test a couple of the notifiers myself. @martomi if you have some test farm for all the notifiers, could you give it a whirl and make sure I didn't miss anything?

jinnatar commented 1 year ago

I think I've fixed the ones where there was a clear fix. Happy to tidy up the default values if we have a consensus on which source of truth should be the new defaults. My feeling is that it's unlikely many folks have relied on the code defaults and instead have used the example values instead of explicitly deleting those fields from their config. But, alas I have no way of proving that feeling!

I've got the keepalive structural changes and a keepalive emitter for the wallet ready for review once we nail down this bit, just want to rebase them first on top of this one so you get a clean review slate.

martomi commented 1 year ago

Cool - thanks for the quick turnaround!

Note that there are a few more inline comments I left in the code above, but they’re collapsed in the middle of the thread by the github UI. Just wanna make sure you saw them too? In one of them I had provided more context and example for default values.

My take is that we should use the code defaults for the following reasons:

jinnatar commented 1 year ago

Oops, not sure why "close" is on by default in review mode. But did not intend to close and now can't reopen :D

martomi commented 1 year ago

Hmm not sure, the reopen button is also grayed out for me. But more importantly, the code-diff is missing, so maybe that’s the main reason? Maybe you rebased on the wrong base? Feel free to re-open a new PR.

jinnatar commented 1 year ago

Yeah, looks like there's no sane way to re-open after a rebase & close. I'll open a new PR.