{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/14167","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/14167/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/14167/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/14167/events","html_url":"https://github.com/ManageIQ/manageiq/pull/14167","id":211756121,"number":14167,"title":"[EUWE] Backport PR 13101 to EUWE","user":{"login":"NickLaMuro","id":314014,"avatar_url":"https://avatars3.githubusercontent.com/u/314014?v=3","gravatar_id":"","url":"https://api.github.com/users/NickLaMuro","html_url":"https://github.com/NickLaMuro","followers_url":"https://api.github.com/users/NickLaMuro/followers","following_url":"https://api.github.com/users/NickLaMuro/following{/other_user}","gists_url":"https://api.github.com/users/NickLaMuro/gists{/gist_id}","starred_url":"https://api.github.com/users/NickLaMuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickLaMuro/subscriptions","organizations_url":"https://api.github.com/users/NickLaMuro/orgs","repos_url":"https://api.github.com/users/NickLaMuro/repos","events_url":"https://api.github.com/users/NickLaMuro/events{/privacy}","received_events_url":"https://api.github.com/users/NickLaMuro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"simaishi","id":12955530,"avatar_url":"https://avatars1.githubusercontent.com/u/12955530?v=3","gravatar_id":"","url":"https://api.github.com/users/simaishi","html_url":"https://github.com/simaishi","followers_url":"https://api.github.com/users/simaishi/followers","following_url":"https://api.github.com/users/simaishi/following{/other_user}","gists_url":"https://api.github.com/users/simaishi/gists{/gist_id}","starred_url":"https://api.github.com/users/simaishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simaishi/subscriptions","organizations_url":"https://api.github.com/users/simaishi/orgs","repos_url":"https://api.github.com/users/simaishi/repos","events_url":"https://api.github.com/users/simaishi/events{/privacy}","received_events_url":"https://api.github.com/users/simaishi/received_events","type":"User","site_admin":false},"assignees":[{"login":"simaishi","id":12955530,"avatar_url":"https://avatars1.githubusercontent.com/u/12955530?v=3","gravatar_id":"","url":"https://api.github.com/users/simaishi","html_url":"https://github.com/simaishi","followers_url":"https://api.github.com/users/simaishi/followers","following_url":"https://api.github.com/users/simaishi/following{/other_user}","gists_url":"https://api.github.com/users/simaishi/gists{/gist_id}","starred_url":"https://api.github.com/users/simaishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simaishi/subscriptions","organizations_url":"https://api.github.com/users/simaishi/orgs","repos_url":"https://api.github.com/users/simaishi/repos","events_url":"https://api.github.com/users/simaishi/events{/privacy}","received_events_url":"https://api.github.com/users/simaishi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2017-03-03T17:46:41Z","updated_at":"2017-03-07T15:15:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/14167","html_url":"https://github.com/ManageIQ/manageiq/pull/14167","diff_url":"https://github.com/ManageIQ/manageiq/pull/14167.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/14167.patch"},"body":"Backports the following PRs to [resolve conflicts](https://github.com/ManageIQ/manageiq/pull/13101#issuecomment-283749939) in the following files when backporting https://github.com/ManageIQ/manageiq/pull/13101 :\r\n\r\n* `app/models/vm_or_template/right_sizing.rb`\r\n  - https://github.com/ManageIQ/manageiq/pull/12751 - _Use Settings in VmOrTemplate::RightSizing_\r\n* `spec/lib/extensions/ar_virtual_spec.rb`\r\n  - https://github.com/ManageIQ/manageiq/pull/11631 **\\*** - _Support virtual attributes for select_\r\n  - https://github.com/ManageIQ/manageiq/pull/12438 - _Update ar_virtual#suppored_by_sql for bogus cols_\r\n  - https://github.com/ManageIQ/manageiq/pull/13283 - _allow virtual_attribute to have a sql alias_\r\n* `spec/models/vm_or_template_spec.rb`\r\n  - https://github.com/ManageIQ/manageiq/pull/12938 - _Delegate vm ram_size to hardware_\r\n  - https://github.com/ManageIQ/manageiq/pull/13125 - _Fix ram_size_in_bytes for hardware#memory_mb = nil_\r\n\r\nNote:  The PR with the `*` is necessary for some of the performance imporovements of 13101 to work.\r\n\r\n\r\nWhat needs to be reviewed...\r\n----------------------------\r\n\r\nAll of the PRs have been backported mainly because they allow 13101 to be cleanly, but most have little impact on the actual code and just fix conflicts in the files, while most are relatively low risk in my opinion (a opinion which should be heavily vetted).\r\n\r\n* https://github.com/ManageIQ/manageiq/pull/12751 while isn't necessary, is also adding a significant performance boost to the same code that is being fixed in #13101 (also a performance improvement).  That said, it was deemed that \"Settings PRs\" should not be added `euwe` unless necessary, so determining if this is a necessary circumstance should be vetted here.\r\n* https://github.com/ManageIQ/manageiq/pull/11631 allows `virtual_attributes` to be used in the `.select` clause, and PR #13101 uses them extensively with the `apply_select` scope.  This PR won't function without #11631 in place.\r\n* https://github.com/ManageIQ/manageiq/pull/12438 is one of the more \"risky-ier\" PRs to backport, mostly just reduces when a attribute can be found via SQL.  Worst case scenario (as far as I can tell) code will drop down to ruby filtering instead of SQL when going through things like RBac.\r\n* https://github.com/ManageIQ/manageiq/pull/13283 is a minor change that only really adds more backwords compatability to older `virtual_attributes` that had `as` in the `arel`.\r\n* https://github.com/ManageIQ/manageiq/pull/12938 and https://github.com/ManageIQ/manageiq/pull/13125 prove that some vetting of bugs has already been done, and the code in the PRs (`virtual_delegates` specifically) already exist in the `euwe` branch, so this seems relatively safe to backport.\r\n\r\n\r\nEveryone CC'd on this PR has had some hand in deciding that the above PRs (not including 13101 of course) were not meant to be in EUWE, and I hope you will be able to help determine if that still is the case for each one or if we should reconsider thoses decisions.  It is also possible to just fix the conflicts and move on, so if necessary, this PR can be updated to use only some of the above PRs if that is deemed necessary.\r\n\r\n\r\nLinks\r\n-----\r\n\r\n* https://bugzilla.redhat.com/show_bug.cgi?id=1422647\r\n* https://github.com/ManageIQ/manageiq/pull/13101 - **ORIGINAL PR**:  _Allow cpu_usagemhz_rate_average_max_over_time_period and derived_memory_used_max_over_time_period to be used in reports as SQL_\r\n* https://github.com/ManageIQ/manageiq/pull/12751 - _Use Settings in VmOrTemplate::RightSizing_\r\n* https://github.com/ManageIQ/manageiq/pull/11631 - _Support virtual attributes for select_\r\n* https://github.com/ManageIQ/manageiq/pull/12438 - _Update ar_virtual#suppored_by_sql for bogus cols_\r\n* https://github.com/ManageIQ/manageiq/pull/13283 - _allow virtual_attribute to have a sql alias_\r\n* https://github.com/ManageIQ/manageiq/pull/12938 - _Delegate vm ram_size to hardware_\r\n* https://github.com/ManageIQ/manageiq/pull/13125 - _Fix ram_size_in_bytes for hardware#memory_mb = nil_\r\n\r\n\r\ncc/ @dmetzger57 @simaishi @chessbyte @kbrock @Fryguy @gtanzillo @himdel"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/284750081","html_url":"https://github.com/ManageIQ/manageiq/pull/14167#issuecomment-284750081","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/14167","id":284750081,"user":{"login":"NickLaMuro","id":314014,"avatar_url":"https://avatars3.githubusercontent.com/u/314014?v=3","gravatar_id":"","url":"https://api.github.com/users/NickLaMuro","html_url":"https://github.com/NickLaMuro","followers_url":"https://api.github.com/users/NickLaMuro/followers","following_url":"https://api.github.com/users/NickLaMuro/following{/other_user}","gists_url":"https://api.github.com/users/NickLaMuro/gists{/gist_id}","starred_url":"https://api.github.com/users/NickLaMuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickLaMuro/subscriptions","organizations_url":"https://api.github.com/users/NickLaMuro/orgs","repos_url":"https://api.github.com/users/NickLaMuro/repos","events_url":"https://api.github.com/users/NickLaMuro/events{/privacy}","received_events_url":"https://api.github.com/users/NickLaMuro/received_events","type":"User","site_admin":false},"created_at":"2017-03-07T15:15:24Z","updated_at":"2017-03-07T15:15:24Z","body":"@himdel Fair enough 😄 \r\n\r\nJust wanted to make sure that wasn't included because of a conflict or some assumed risk.  Thanks!"}}
{"actor":{"display_login":"NickLaMuro"}}