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

choose build pod by name AND namespace #15575

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/models/ems_refresh/save_inventory_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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

end

save_inventory_multi(ems.container_groups, hashes, :use_association, [:ems_ref],
Expand Down