-
Notifications
You must be signed in to change notification settings - Fork 125
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 tenant_id to miq_product_features #291
Add tenant_id to miq_product_features #291
Conversation
db/migrate/20181012115514_add_tenant_id_to_miq_product_features.rb
Outdated
Show resolved
Hide resolved
d259bd8
to
13491c0
Compare
13491c0
to
bc82d74
Compare
What is the |
@carbonin yes I didn't comment it yet - I updated description with explanation. (I'll update other main issue with it) |
Hmm I think we can come up with a better name than If you have Would something like |
Also would like @gtanzillo to 👍 these changes, as he probably has a better idea of the larger picture we're trying to solve. |
@miq-bot add_label blocker |
Why was this marked a blocker @JPrause? The linked BZ does not have the blocker flag and the Target Release is set to (what would be) Ivanchuk upstream. |
Regarding @carbonin suggestion for the column name
How about just |
@gtanzillo I think that would be based on what the value of the column would be for the features in @lpichler's picture. Is just the "Tenant Node Product Feature" labeled as On a separate note @gtanzillo your name suggestion makes me think this might not need to be a column at all if it applies to any row which relates to a tenant. Could we make a scope for |
"Tenant Node Product Feature" is tenant_node = true and tenant_id is nil (it is not related to any certain tenant) and I think it is not enough to have just
|
@lpichler based on your description I think In my mind anything that is assigned to a tenant would be "tenant scoped" so that's not really what this column means. I would rather avoid giving meaning to I think the best description is still "this feature is the root of the tree for features which apply to a particular tenant" and I would like that to come across in the name. Maybe just |
thanks @carbonin yes it is good idea to have "parent" or "root" in name the in order to describe it better: @gtanzillo do you agree ? |
bc82d74
to
fbff2dd
Compare
I also talked a bit with @gtanzillo about if the second column is even needed. Will you ever need to query for nodes which should be the root of tenant specific features? Isn't that more of a known set that we're going to implement? I think I'm clear on what you're referring to, but not clear on why it needs to be a column. |
we don't need query for any other reasons we need it only in MiqProductFeature#seed method: The only thing why we need Thanks to that we can dynamically generate "Dynamic Tenant Product Feature" under the "Tenant Node Product Feature". We had solution that I added new type for so If you have any other idea how to determine "Tenant Node Product Feature". let me know. Maybe we can have other yaml which will be list "Tenant Node Product Features". ? thanks! |
@lpichler is Then Does that make sense? |
I guess from a more general standpoint I'm saying that something should only be added to the database (rather than solved in a model) if it changes at runtime or needs to be referenced in a query (via joins or as a query condition). It sounds like neither of these is true in this case. |
fbff2dd
to
f77df0b
Compare
Checked commit lpichler@f77df0b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@carbonin yes is So I am leaving here only tenant_id and I updated description. so now it could be merged ? and thanks 👍 |
@miq-bot add_label hammer/yes |
…atures Add tenant_id to miq_product_features (cherry picked from commit ed6309a) https://bugzilla.redhat.com/show_bug.cgi?id=1468795
Hammer backport details:
|
issue ManageIQ/manageiq#18100
tenant_id establish relation between dynamic product features and tenants
from MiqUserRole:
cc @gtanzillo
Links
https://bugzilla.redhat.com/show_bug.cgi?id=1297415