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

Include task_id in result of ResourceActionWorkflow#process_request #17788

Merged
merged 1 commit into from
Aug 1, 2018

Conversation

skateman
Copy link
Member

@skateman skateman commented Aug 1, 2018

When invoking a custom button action with a dialog through the API, it is needed to access the created task. This one-liner should include the required task id in the result which can be propagated further in the API.

@miq-bot add_reviewer @pkomanek
@miq-bot add_reviewer @ZitaNemeckova
@miq-bot add_label gaprindashvili/yes, bug

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

Copy link
Member

@gmcculloug gmcculloug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I am good with this change, one small comment. Will merge when @eclarizio has a change to review/approve.

subject { ResourceActionWorkflow.new({}, admin, resource_action, :target => target) }
let(:resource_action) { @resource_action }
let(:task) { double }

before { allow(task).to receive(:id).and_return(0) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but I think we should have the test return a non-zero value which is more inline with what we would expect from the db.

@miq-bot
Copy link
Member

miq-bot commented Aug 1, 2018

Some comments on commit skateman@25be312

spec/models/resource_action_workflow_spec.rb

  • ⚠️ - 107 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Aug 1, 2018

Some comments on commit skateman@25be312

spec/models/resource_action_workflow_spec.rb

  • ⚠️ - 107 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Aug 1, 2018

Checked commit skateman@25be312 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. 🏆

Copy link
Member

@eclarizio eclarizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gmcculloug gmcculloug merged commit afb552b into ManageIQ:master Aug 1, 2018
@gmcculloug gmcculloug added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 1, 2018
@skateman skateman deleted the custom-button-task-id branch August 2, 2018 05:42
@gmcculloug
Copy link
Member

Removed gaprindashvili/yes label as these changes are being reverted in #17794

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

Successfully merging this pull request may close these issues.

4 participants