|
From: John R. <ro...@ie...> - 2026-10-05 14:53:03
|
Hi Ralf and all the people at their inboxes:
On Mon, Oct 5, 2026 at 10:22 AM Ralf Schlatterbeck <rs...@ru...> wrote:
> On Mon, Oct 05, 2026 at 10:00:30AM -0400, John Rouillard wrote:
> > For example:
> > "some_unchanged_prop" in oldvalues and oldvalues['some_unchanged_prop']
> > is ok but a bare:
> > oldvalues['some_unchanged_prop']
> > will fail if I strip unchanged properties.
> >
> > Currently the second case is fine and returns the same value as a database lookup.
>
> Right, I'm not sure I'm doing it correctly everywhere. I *think* I'm
> using oldvalues.get in most cases but I probably should go over all uses
> of oldvalues...
>
> Thanks for pointing this out
Yeah, that's kind of what I was worried about. I see three options:
1) update the docs to indicate the current code
2) change the code to only include changed database items and
everybody needs to audit their reactors.
3) provide two paths with/without unchanged props and a switch(in
config.ini or interfaces.py) to remove
unchanged props (default is to include them).
1 is easiest, but I really want "'unchanged prop' in oldvalues" to
work because it reduces cognitive load by matching
auditors and eliminates unneeded database accesses to compare values.
2 is preferred but makes upgrading more difficult.
3 adds another switch that most people won't know about, clutters
config.ini and increases testing burden.
Anybody with thoughts?
How big a burden would it be for you to fix all your reactors?
-- rouilj
|