-
Notifications
You must be signed in to change notification settings - Fork 898
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
choose build pod by name AND namespace #15575
choose build pod by name AND namespace #15575
Conversation
f3b2c4c
to
9fb39d3
Compare
@cben @moolitayer PTAL at this one liner |
Checked commit enoodle@9fb39d3 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@enoodle is there a ticket associated with this bug? |
@@ -157,7 +157,8 @@ def save_container_groups_inventory(ems, hashes) | |||
h[:container_node_id] = h.fetch_path(:container_node, :id) | |||
h[:container_replicator_id] = h.fetch_path(:container_replicator, :id) | |||
h[:container_project_id] = h.fetch_path(:project, :id) | |||
h[:container_build_pod_id] = ems.container_build_pods.find_by(:name => h[:build_pod_name]).try(:id) | |||
h[:container_build_pod_id] = ems.container_build_pods.find_by(:name => h[:build_pod_name], | |||
:namespace => h.fetch_path(:project, :name)).try(:id) |
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 weird that we have a namespace
string and not container_project_id
like everywhere else. We should probably fix that
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 👍
@moolitayer This is a bug only in the backend that doesn't have an effect on the ui user experience, I am not sure if I can open a bug for that. |
@blomquisg @Fryguy PTAL |
LGTM 👍 |
BZ added |
ping @blomquisg |
…identification choose build pod by name AND namespace (cherry picked from commit ed83f8b) https://bugzilla.redhat.com/show_bug.cgi?id=1478568
Fine backport details:
|
…ild_pod_identification choose build pod by name AND namespace (cherry picked from commit ed83f8b) https://bugzilla.redhat.com/show_bug.cgi?id=1478568
This will ensure that the ContainerBuildPod associated with a ContainerGroup is from the same namespace.
Tests are in ManageIQ/manageiq-providers-openshift#36 due to the inexistance of tests for this file in this repo.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1474076