-
Notifications
You must be signed in to change notification settings - Fork 141
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
Create TransformationMapping before Item (FIX CI FAILURE) #666
Create TransformationMapping before Item (FIX CI FAILURE) #666
Conversation
ba3258b
to
c72459a
Compare
@agrare yes, expect to specs which are needed for fix CI failure. @djberg96
@djberg96 so can you take my changes about thanks |
transformation_mapping.transformation_mapping_items = create_mapping_items(data["transformation_mapping_items"]) | ||
transformation_mapping.save! | ||
transformation_mapping_items = create_mapping_items(data["transformation_mapping_items"]) | ||
transformation_mapping_items.each { |tmi| tmi.update(:transformation_mapping => transformation_mapping) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just call .save!
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked what @djberg96 had where he passed the mapping to the TransformationMappingItem.new
, then yeah just .save!
at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used it 👍 (of course with @djberg96 approval :) )
@lpichler I think you need to do the same thing for |
c72459a
to
2606908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked commit lpichler@2606908 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
The PR of the beast! |
@lpichler @djberg96 can this be |
…ion_mapping_item Create TransformationMapping before Item (FIX CI FAILURE) (cherry picked from commit 5675728) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1768517
Ivanchuk backport details:
|
FIXing CI failure https://travis-ci.org/ManageIQ/manageiq-api/jobs/578155651
After this ManageIQ/manageiq#19204 it looks like that when we are creating
TransformationMapping
withTransformationMappingItems
( with DataStorage which requires createdTransformationMapping
)we need to create first
TransformationMapping
and then create
TransformationMappingItems
and then assignTransformationMapping
It looks like that there is also issue in create operation https://github.com/ManageIQ/manageiq-api/blob/ba3258bef9b483b3c0cf5d9c950f62d235bbba91/app/controllers/api/transformation_mappings_controller.rb
please review @agrare @thearifsmail @djberg96
@miq-bot assign @abellotti