Skip to content
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

Stop cashing fields for ChargebackVm report #16683

Merged

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Dec 19, 2017

we added #16321 as dynamic fields.

We are using memoizing for keeping list of attributes - on model MiqExpression.

so I stopped memoizing to possibility each get exactly what is in DB for ChargebackVm.

second issue on model ChargebackVm - when we are adding dynamic fields to the ChargebackVm - it is like adding a method dynamically to class - but there is no mechanism how to remove them.
So I overwrite method ChargebackVm.attribute_names - and this method will be always return actual field what are in DB - non-existing are filtered out.

@miq-bot add_label chargeback, bug, bloker

@miq-bot assign @gtanzillo

Links

https://bugzilla.redhat.com/show_bug.cgi?id=1517956

issue is the CloudVolume type are defined as
dynamic methods on ChargebackVm and there is no
way how to remove these dynamically field from
ChargebackVM - so I overwrite the method
attribute_names and I am filtering only existing
volume types
@miq-bot
Copy link
Member

miq-bot commented Dec 19, 2017

@lpichler Cannot apply the following label because they are not recognized: bloker

@lpichler
Copy link
Contributor Author

@miq-bot add_label gaprindashvili/yes

@miq-bot
Copy link
Member

miq-bot commented Dec 19, 2017

Checked commits lpichler/manageiq@3bcad07~...c10c5a7 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 🍪

@gtanzillo gtanzillo added this to the Sprint 76 Ending Jan 1, 2018 milestone Dec 19, 2017
@gtanzillo gtanzillo merged commit 6352baf into ManageIQ:master Dec 19, 2017
@lpichler lpichler deleted the stop_cash_fields_for_chargebackvm_report branch December 19, 2017 15:09
@lpichler
Copy link
Contributor Author

@miq-bot add_label blocker

simaishi pushed a commit that referenced this pull request Jan 3, 2018
…ckvm_report

Stop cashing fields for ChargebackVm report
(cherry picked from commit 6352baf)

https://bugzilla.redhat.com/show_bug.cgi?id=1517956
@simaishi
Copy link
Contributor

simaishi commented Jan 3, 2018

Gaprindashvili backport details:

$ git log -1
commit cf02454b2433b066ca562d5307770f7cc4579eff
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Tue Dec 19 10:08:21 2017 -0500

    Merge pull request #16683 from lpichler/stop_cash_fields_for_chargebackvm_report
    
    Stop cashing fields for ChargebackVm report
    (cherry picked from commit 6352baf2f24699519c7d96c9dc7b96a9f245f1e9)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1517956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants