{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7141","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7141/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7141/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7141/events","html_url":"https://github.com/ManageIQ/manageiq/pull/7141","id":139031269,"number":7141,"title":"Rbac id filters as a scope pt1","user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/performance","name":"performance","color":"fad8c7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/rbac","name":"rbac","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-07T16:54:49Z","updated_at":"2016-03-12T04:26:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7141","html_url":"https://github.com/ManageIQ/manageiq/pull/7141","diff_url":"https://github.com/ManageIQ/manageiq/pull/7141.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/7141.patch"},"body":"Currently we fetch `Vm` ids and then run a query on those ids.\r\n\r\nWe then ship the ids to and from the server, and for a larger installation this gets quite big - in one installation the sql is 151k.\r\n\r\n@matthewd this started getting too big. Let me know if you want smaller, or if you want bigger and I can put the rest of the work to make ids into a scope and not shipping them around\r\n"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/195658381","html_url":"https://github.com/ManageIQ/manageiq/pull/7141#issuecomment-195658381","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7141","id":195658381,"user":{"login":"miq-bot","id":7806257,"avatar_url":"https://avatars.githubusercontent.com/u/7806257?v=3","gravatar_id":"","url":"https://api.github.com/users/miq-bot","html_url":"https://github.com/miq-bot","followers_url":"https://api.github.com/users/miq-bot/followers","following_url":"https://api.github.com/users/miq-bot/following{/other_user}","gists_url":"https://api.github.com/users/miq-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/miq-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miq-bot/subscriptions","organizations_url":"https://api.github.com/users/miq-bot/orgs","repos_url":"https://api.github.com/users/miq-bot/repos","events_url":"https://api.github.com/users/miq-bot/events{/privacy}","received_events_url":"https://api.github.com/users/miq-bot/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T04:26:26Z","updated_at":"2016-03-12T04:26:26Z","body":"<rubocop />Checked commits https://github.com/kbrock/manageiq/compare/013933045969157bc8f71ddde408653391bb73b3~...98300a29051130cccba85254e5be434d54b2a1ad with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1\n4 files checked, 10 offenses detected\n\n**app/models/rbac.rb**\n- [ ] :red_circle: **Warn** - [Line 251](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L251), Col 53 - [Lint/UnusedMethodArgument](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Lint/UnusedMethodArgument) - Unused method argument - `scope`. If it's necessary, use `_` or `_scope` as an argument name to indicate that it won't be used.\n- [ ] :large_orange_diamond: - [Line 180](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L180), Col 19 - [Style/TrailingUnderscoreVariable](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/TrailingUnderscoreVariable) - Do not use trailing `_`s in parallel assignment. Prefer `filtered_ids, = calc_filtered_ids(parent_class, rbac_filters, user, miq_group)`.\n- [ ] :large_orange_diamond: - [Line 259](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L259), Col 17 - [Style/MultilineMethodCallIndentation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/MultilineMethodCallIndentation) - Align `.includes` with `.where` on line 258.\n- [ ] :large_orange_diamond: - [Line 260](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L260), Col 17 - [Style/MultilineMethodCallIndentation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/MultilineMethodCallIndentation) - Align `.group` with `.where` on line 258.\n- [ ] :large_orange_diamond: - [Line 261](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L261), Col 17 - [Style/MultilineMethodCallIndentation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/MultilineMethodCallIndentation) - Align `.offset` with `.where` on line 258.\n- [ ] :small_blue_diamond: - [Line 178](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L178), Col 43 - [Metrics/ParameterLists](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/ParameterLists) - Avoid parameter lists longer than 5 parameters.\n- [ ] :small_blue_diamond: - [Line 251](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L251), Col 3 - [Metrics/AbcSize](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/AbcSize) - Assignment Branch Condition size for find_targets_with_user_group_rbac is too high. [22.41/15]\n- [ ] :small_blue_diamond: - [Line 251](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L251), Col 45 - [Metrics/ParameterLists](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/ParameterLists) - Avoid parameter lists longer than 5 parameters.\n- [ ] :small_blue_diamond: - [Line 278](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L278), Col 34 - [Metrics/ParameterLists](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/ParameterLists) - Avoid parameter lists longer than 5 parameters.\n- [ ] :small_blue_diamond: - [Line 511](https://github.com/kbrock/manageiq/blob/98300a29051130cccba85254e5be434d54b2a1ad/app/models/rbac.rb#L511), Col 121 - [Metrics/LineLength](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/LineLength) - Line is too long. [122/120]\n"}}