Repository navigation
don't return the same route multiple times when shared to more then 2 spaces - #4702
Merged
Merged
Conversation
… spaces * simular to what's been done with service instances #3955, if a route is shared to more then two spaces, it will show up many times in the result * still needs a test before it can be merged
Member
Author
|
i've tested this against a live environment and saw it does what i expect it to, need to add to the route unit tests to fix it. |
tcdowney
approved these changes
Dec 15, 2025
sethboyles
reviewed
Dec 15, 2025
| def fetch(message, readable_space_guids_dataset: nil, eager_loaded_associations: [], omniscient: false) | ||
| dataset = Route.dataset.eager(eager_loaded_associations). | ||
| join(:spaces, id: Sequel[:routes][:space_id]). | ||
| left_join(:route_shares, route_guid: Sequel[:routes][:guid]).qualify |
Member
There was a problem hiding this comment.
side note: I wonder if it makes sense to have this left_join under the unless omniscient condition?
sethboyles
approved these changes
Dec 15, 2025
Member
Author
|
wait, i thought it said 17 out of 17!?!?! |
ari-wg-gitbot
added a commit
to cloudfoundry/capi-release
that referenced
this pull request
Dec 15, 2025
Changes in cloud_controller_ng:
- don't return the same route multiple times when shared to more then 2 spaces
PR: cloudfoundry/cloud_controller_ng#4702
Author: Benjamin Fuller <ben.fuller@broadcom.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
A short explanation of the proposed change:
similar to what's been done with service instances Test that shared service isntances don't result in duplicate results #3955, if a route is shared to more then two spaces, it will show up many times in the result
still needs a test before it can be merged
An explanation of the use cases your change solves
if a route is shared to two spaces, it will show up
Links to any other associated PRs
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests