-
Notifications
You must be signed in to change notification settings - Fork 900
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 VimPerformanceOperatingRanges after upgrade. #13821
Conversation
After the backport of ManageIQ#12792 and ManageIQ#13700, a user can be in a state where their VimPerformanceOperatingRanges are inconsistent. Although it doesn't really harm anything, this data migration makes it consistent once again.
Checked commit Fryguy@ee49af0 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 db/migrate/20170207215322_fix_vpor_time_profile_ids.rb
spec/migrations/20170207215322_fix_vpor_time_profile_ids_spec.rb
|
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.
👍 LGTM, just have one question.
tp.profile[:days].try(:sort) == ALL_DAYS && | ||
tp.profile[:hours].try(:sort) == ALL_HOURS && | ||
tp.profile[:tz] == DEFAULT_TZ | ||
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.
Do we also need `tp.profile_type == "global" here to ensure it's the default one that we match?
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.
It's not in the usual default check, but I can add it in... Can't hurt.
@gtanzillo Bump? 🐢 |
@Fryguy this migration fails for me when running on an large mbu db:
But on rails console this is not nil?!
|
After the backport of #12792 and #13700, a user can be in a state where
their VimPerformanceOperatingRanges are inconsistent. Although it
doesn't really harm anything, this data migration makes it consistent
once again.
@gtanzillo Please review.