-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime: metrics view refer model connector #5390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change works but conceptually speaking I am not sure of it.
We are changing the spec during reconcile which is something we haven't done before.
Also considered storing this in mv's state but technically speaking the model connector is a spec attribute.
Yeah editing the current resource's spec is something we want to be careful with. In this particular case, I think one of these options would be preferable:
- (Simple and mostly correct option) Apply this PR to the
mv.State.ValidSpec
instead. It's used everywhere to actually render/query the metrics view. - (Complex but maybe more correct option) If
model:
is set in the YAML, capture it as a separate property in the spec (e.g.Spec.Model
instead ofSpec.Table
). Then at query time, if the metrics view is based on a model, look it up to find the underlying connector+table to query.
So
I thought about it but not sure if we should worry about the underlying model being changed and metricsview not reconciled yet leading to inconsistencies. |
The So I think for this PR we could extend this idea and say that the |
Sure. Sounds good. |
Co-authored-by: Benjamin Egelund-Müller <b@egelund-muller.com>
closes #5085