-
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
Prevent queueing things for a zone that doesn't exist in the region #17987
Conversation
0d1d1b0
to
c388f33
Compare
spec/models/miq_queue_spec.rb
Outdated
it "without a matching region" do | ||
expect { MiqQueue.create!(:state => "ready", :zone => "Missing Zone") }.to raise_error(ActiveRecord::RecordInvalid) | ||
end | ||
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.
@bdunne I glanced at the tests but didn't see one for a message with a nil zone... does that pass this validation and not raise an error?
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.
👍 Done
c388f33
to
bf66236
Compare
Checked commit bdunne@bf66236 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
LGTM for master. cc @gtanzillo |
Fixing a test that was broken due to a PR that added validation to zone when putting a task into MiqQueue. (ManageIQ/manageiq#17987)
Fix for ui-classic ManageIQ/manageiq-ui-classic#4669 . Is this |
Broken by validations added in ManageIQ/manageiq#17987
@bdunne As per ManageIQ/manageiq-api#472 (comment), I'm assuming this should be
Can you please create a separate PR for Gaprindashvili branch? |
Prevent queueing things for a zone that doesn't exist in the region https://bugzilla.redhat.com/show_bug.cgi?id=1635764 (cherry picked from commit 01c28d5)
@bdunne is this still in conflict for gaprindashvili backport? |
Backported to Gaprindashvili via #18068 |
…_failing_on_missing_zone Fix MetricsCapture and Refresher specs failing due to a missing zone Stubbing MiqServer.my_zone to return a dummy string was affecting the zone with which events were added to MiqQueue, which broke now that MiqQueue requires a real zone (ManageIQ/manageiq#17987).
…ing_zone Fix specs failing on a missing zone Stubbing MiqServer.my_zone to return a dummy string was affecting the zone with which events were added to MiqQueue, which broke now that MiqQueue requires a real zone (ManageIQ/manageiq#17987).
Stubbing MiqServer.my_zone to return a dummy string was affecting the zone with which events were added to MiqQueue, which broke now that MiqQueue requires a real zone (ManageIQ/manageiq#17987).
Looks like this is generating a sql call for every insert into miq_queue. Wonder if we want to do some sort of caching for this value |
https://bugzilla.redhat.com/show_bug.cgi?id=1628658