Closed domasx2 closed 3 months ago
I wonder if it's possible to do this without changing the ExtraQueryProvider interface, by setting a property like foundExtraQueries in the TimeRangeCompare's getExtraQueries method and checking it in shouldRerun 🤔 I'm not sure that's better, though...
There can be many query runners for a single TimeRangeCompare
, so I think this kind of approach may get sticky with complex state :thinking:
Ah yeah, good point.
This will work but I'm still a little annoyed by it (my fault, not yours :grinning:) - I feel like the query runner should be smart enough to realise that the provider didn't return any extra queries from getExtraQueries
and skip calling provider.shouldRerun
if the query hasn't changed; that way each provider wouldn't have to deal with properties like timeRangeCompare
in more than one place. But getting that to work properly sounds complicated so perhaps it isn't worth it.
I'll wait for @dprokop to take a look before approving. Thanks @domasx2!
:rocket: PR was released in v5.3.1
:rocket:
:wave:
We found an issue in app o11y where changing time window comparison value causes query runner to re-run queries even if all queries have opted out of TWC. This causes unnecessary querying and side effects for us.
This PR fixes makes twc not trigger re-run if all queries are opted-out
Thanks!