-
Notifications
You must be signed in to change notification settings - Fork 897
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
Refresh new target do not run post_refresh #16436
Conversation
@miq-bot add_label gaprindashvili/yes |
app/models/vm_or_template.rb
Outdated
@@ -1092,7 +1092,7 @@ def refresh_ems_sync | |||
end | |||
|
|||
def self.post_refresh_ems(ems_id, update_start_time) | |||
update_start_time = update_start_time.utc | |||
update_start_time = update_start_time.utc - 1.minute |
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.
This seems really hacky, lets see if there's a better way to do this.
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 am open for suggestions. We use time to determine which the vm was created so I wonder what we can do 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.
Yeah I'm thinking if we could try to get update_start_time from when refresh_new_target started, haven't checked if that is feasible yet
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.
@agrare @pkliczewski any updates on your side?
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.
@pkliczewski could you just call #post_create_actions_queue
from refresh_new_target
if the vm was created instead of messing with the ems_refresh_start_time?
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.
@agrare will try
@pkliczewski this looks much cleaner, did you confirm it works? If you make these changes the specs are passing locally for me:
|
@agrare I checked that there are no failures. Will update the spec. |
In case when we run refresh_new_target a vm is created before the refresh was run so we need to make sure it is picked up by post_refresh. Bug-Url: https://bugzilla.redhat.com/1510459
Checked commit pkliczewski@4284854 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Refresh new target do not run post_refresh (cherry picked from commit 013c7b4) https://bugzilla.redhat.com/show_bug.cgi?id=1514509
Gaprindashvili backport details:
|
In case when we run refresh_new_target a vm is created before the
refresh was run so we need to make sure it is picked up by post_refresh.
Bug-Url:
https://bugzilla.redhat.com/1510459