Field filtering on Monitors does not work
jcaamano opened this issue · 2 comments
jcaamano commented
With
// Only Monitor Required SBDB tables to reduce memory overhead
chassisPrivate := sbdb.ChassisPrivate{}
_, err = c.Monitor(ctx,
c.NewMonitor(
client.WithTable(&chassisPrivate, &chassisPrivate.Name),
),
)
we get
field pointer does not correspond to orm struct
This is because the model passed in WithTable
is not used later on to build the TableMonitor
. Instead, a new model is built from the mapper for which the field pointer passed does not apply.
flavio-fernandes commented
/assign @flavio-fernandes
flavio-fernandes commented
This issue was found while doing this:
ovn-org/ovn-kubernetes#2940
Once fixed, we should follow up on that change and leverage it.