Skip to content

Conversation

@Benjamintf1
Copy link
Member

@Benjamintf1 Benjamintf1 commented Dec 12, 2025

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 main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

… 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
@Benjamintf1
Copy link
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.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side note: I wonder if it makes sense to have this left_join under the unless omniscient condition?

@Benjamintf1 Benjamintf1 merged commit 7348c43 into main Dec 15, 2025
16 of 17 checks passed
@Benjamintf1 Benjamintf1 deleted the remove-duplicate-shared-routes branch December 15, 2025 18:32
@Benjamintf1
Copy link
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants