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

[GAPRINDASHVILI] Compare decimal columns correctly in batch saver #17214

Merged

Conversation

cben
Copy link
Contributor

@cben cben commented Mar 27, 2018

Backport (again) #17020, the only difference being @Ladas's .to_s test fix #17194 (see separate commits).

I didn't remember what exactly this test was suppossed to test :-), so wasn't sure that .to_s fix retains the test meaning, took me a couple days to understand & experiment...

  • The .to_s is fine, the lazy_find done here is not the part tested.

  • Turns out the test as I wrote it only checked the addition to map_ids_to_inventory_objects. It still checks it — breaks without it.

  • The addition to update_or_destroy_records! isn't checked because test does just 1 refresh and all quota-related records are new.
    I can't simply wrap the test in 2.times do ... end, other parts break.

    => I'll maybe try to change the test to pre-create one of quotas before refresh. But that would be a separate PR to master first.

    EDIT: however, this part is checked by manageiq-providers-kubernetes specs, so I think it's good enough as is.

https://bugzilla.redhat.com/show_bug.cgi?id=1559544 (gaprindashvili)

@cben cben changed the base branch from master to gaprindashvili March 27, 2018 21:31
@simaishi simaishi requested a review from Ladas March 27, 2018 22:01
@simaishi simaishi self-assigned this Mar 27, 2018
@simaishi simaishi requested a review from agrare March 27, 2018 22:02
@miq-bot
Copy link
Member

miq-bot commented Mar 28, 2018

This pull request is not mergeable. Please rebase and repush.

cben and others added 2 commits March 29, 2018 00:55
…zable_keys""

This reverts commit 9eab6ed,
again merging pull request ManageIQ#17020 from cben/deserializable_keys

Compare decimal columns correctly in batch saver
(cherry picked from commit d3f7348)

https://bugzilla.redhat.com/show_bug.cgi?id=1559544
@cben cben force-pushed the GAPRINDASHVILI-deserializable_keys branch from df46123 to 2d79f26 Compare March 28, 2018 21:57
@miq-bot
Copy link
Member

miq-bot commented Mar 28, 2018

Checked commits cben/manageiq@b45b8de~...2d79f26 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
5 files checked, 8 offenses detected

spec/models/manager_refresh/save_inventory/saver_strategies_spec.rb

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

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

👍 looks great

@cben
Copy link
Contributor Author

cben commented Mar 29, 2018

miq-bot Y U NO pay attention?
@miq-bot remove-label unmergeable

@simaishi simaishi merged commit e7a00dc into ManageIQ:gaprindashvili Mar 29, 2018
@simaishi simaishi added this to the Sprint 83 Ending Apr 9, 2018 milestone Mar 29, 2018
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.

5 participants