-
Notifications
You must be signed in to change notification settings - Fork 896
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
add all features as a virtual column #15614
add all features as a virtual column #15614
Conversation
2a24c3c
to
28bc801
Compare
That might be bad, because some methods have side effects
I think we originally dropped the Incidentally, there are probably some deletions that could be made since I think (since we already added a few of these individually IIRC) |
@imtayadeway so you are saying, yes drop the |
@durandom yeah, I am 👍 to drop the
|
@kbrock could you have a look wether adding all those virtual_columns is ok? |
Checked commits durandom/manageiq@28bc801~...fbc9479 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/mixins/supports_feature_mixin.rb
|
@durandom I do like this generic approach that you have taken here. I assume that this is a growing list and that there will be more and more |
virtual columns are really meant for exposing things to reporting. They are not really meant for exposing things to the API (even though the API piggybacks on virtual columns to expose more stuff). I am concerned this opens up a lot of things to reporting that users just don't care about. This feels more like it should be an OPTIONS specific thing in the API. |
@imtayadeway can we change the |
virtual columns work best in the base class (or the root of the query) and ones that do not change in subclasses. Having various subclasses override values in a column is a recipe for some serious issues. |
@imtayadeway @durandom Considering all these above points, should we get #15600 merged, since it's a PR for a high priority BZ? |
I think this comment from @Fryguy applies to #15600 as well, right? I mean, in either case we're talking about adding virtual columns for API and not reporting, it seems. |
@blomquisg Yes |
@imtayadeway reg. #15614 (comment) - is there a central place where we could intercept filters that start with |
@durandom it would be difficult given that it's backed by MiqExpression, which only deals with columns or virtual columns. This probably warrants a deeper discussion - it seems there are some growing pains to do with the idea of virtual columns as being for reporting, and the unfortunate fact that the API is leveraging them quite integrally while there is resistance to virtual columns growing to meet API needs. ISTM that if we can't do the latter there might be some serious work ahead. |
@imtayadeway that sounds like not using MiqExpression and a query string, but some filter constraints passed in via headers? Not sure though. |
@durandom we could go down the options route if it pertains to things about providers in general If you want to have a go at modifying the filterer, this would be a great place to start. I have some reservations though about filtering on things that aren't attributes - for instance, who would they be discoverable? |
@imtayadeway are you saying, that we should stay with exposing selected |
I am concerned that we are trying to expose data as if it were in the database, and in reality, it is stored in a class hierarchy. Seems these could be removed from the classes and put into the database somewhere? maybe as jsonb? Also, do note that typically, we add things as virtual attributes and people tend to think that this is supported by sql. So they filter or sort on these columns. Since they are in ruby, we have to bring back all rows. It causes all sorts of hidden performance problems (the 30 minutes vs 5 seconds kind) |
This pull request has been automatically closed because it has not been updated for at least 6 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! |
@AparnaKarve @imtayadeway this is a more generalized approach to #15600
But
?
be an backwards incompatiblity change?