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

Fix selection of container images label in Chargeback assignments #4311

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Jul 18, 2018

if you don't have any labels the scenario here will produce error message:

(byebug) D, [2018-07-18T11:07:20.135484 #58529] DEBUG -- :   CustomAttribute Load (0.3ms)  SELECT  "custom_attributes".* FROM "custom_attributes" WHERE "custom_attributes"."id" = $1 LIMIT $2  [["id", 0], ["LIMIT", 1]]
D, [2018-07-18T11:07:20.136942 #58529] DEBUG -- :   CustomAttribute Inst Including Associations (0.0ms - 0rows)
F, [2018-07-18T11:07:20.137892 #58529] FATAL -- : Error caught: [ActiveRecord::RecordNotFound] Couldn't find CustomAttribute with 'id'=null
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activerecord-5.0.7/lib/active_record/core.rb:173:in `find'
/Users/liborpichler/manageiq/manageiq-ui-classic/app/controllers/chargeback_controller.rb:758:in `get_docker_labels_all_values'
/Users/liborpichler/manageiq/manageiq-ui-classic/app/controllers/chargeback_controller.rb:821:in `cb_assign_get_form_vars'
/Users/liborpichler/manageiq/manageiq-ui-classic/app/controllers/chargeback_controller.rb:226:in `cb_assign_field_changed'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/abstract_controller/base.rb:188:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:126:in `call'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:455:in `call'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:90:in `run_callbacks'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/abstract_controller/callbacks.rb:19:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/action_controller/metal/rescue.rb:20:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activesupport-5.0.7/lib/active_support/notifications.rb:164:in `instrument'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/activerecord-5.0.7/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/liborpichler/manageiq/manageiq/.bundle/ruby/2.4.0/gems/actionpack-5.0.7/lib/abstract_controller/base.rb:126:in `process'
/Users/liborpich

scenario:

bahuouu0nq

@miq-bot assign @mzazrivec

LINKS

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

@miq-bot
Copy link
Member

miq-bot commented Jul 18, 2018

Checked commit lpichler@267e723 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@mzazrivec mzazrivec added this to the Sprint 91 Ending Jul 30, 2018 milestone Jul 19, 2018
@mzazrivec mzazrivec merged commit d7d1f71 into ManageIQ:master Jul 19, 2018
@mzazrivec
Copy link
Contributor

@lpichler is this gaprindashvili/yes ?

@lpichler lpichler deleted the fix_selection_of_labels_chargeback_assignments_without_labels branch July 20, 2018 09:59
@lpichler
Copy link
Contributor Author

@miq-bot add_label gaprindashvili/yes

@lpichler
Copy link
Contributor Author

@miq-bot remove_label gaprindashvili/yes

@lpichler
Copy link
Contributor Author

@mzazrivec I think that no, it doesn't look like a blocker, it is just producing error message.

@lpichler
Copy link
Contributor Author

lpichler commented Aug 7, 2018

@miq-bot add_label gaprindashvili/yes, blocker

@lpichler
Copy link
Contributor Author

lpichler commented Aug 7, 2018

@simaishi @JPrause now it is blocker because it is part of fix #4416 of BZ https://bugzilla.redhat.com/show_bug.cgi?id=1612889

simaishi pushed a commit that referenced this pull request Aug 8, 2018
…back_assignments_without_labels

Fix selection of container images label in Chargeback assignments
(cherry picked from commit d7d1f71)

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

simaishi commented Aug 8, 2018

Gaprindashvili backport details:

$ git log -1
commit d5caefc798ccf87d8cd6c98dac61cfa52f230a5a
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Thu Jul 19 10:48:00 2018 +0200

    Merge pull request #4311 from lpichler/fix_selection_of_labels_chargeback_assignments_without_labels
    
    Fix selection of container images label in Chargeback assignments
    (cherry picked from commit d7d1f7140ab3ee3f6e5ed2d8b0068733902410c0)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1612889

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.

None yet

4 participants