Skip to content

Remove id guid id roundtrips - #5318

Draft
svkrieger wants to merge 7 commits into
mainfrom
remove-id-guid-id-roundtrips
Draft

Remove id guid id roundtrips#5318
svkrieger wants to merge 7 commits into
mainfrom
remove-id-guid-id-roundtrips

Conversation

@svkrieger

Copy link
Copy Markdown
Contributor

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:

  • An explanation of the use cases your change solves

  • 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

Add readable_org_ids_for_domains_query and readable_security_group_ids_query,
mirroring the existing *_guids_query helpers but returning the flat id UNION
without the enclosing SELECT ... FROM organizations/security_groups WHERE id IN
wrapper. Prerequisite for removing id -> guid -> id round-trips from V3
read-permission filters.

Follow-up to #5157 and #5172.
Switch OrgListFetcher and the organization presenter args to the bare-id
readable_org_ids_query, collapsing the id -> guid -> id round-trip on the
non-admin GET /v3/organizations path into a single WHERE id IN (UNION).

Follow-up to #5157 and #5172.
Switch OrganizationQuotaListFetcher and OrganizationQuotaPresenter to the
bare-id readable_org_ids_query. The presenter's per-quota visible-org filter
previously ran an id -> guid -> id round-trip once per quota returned; it now
filters directly on organizations.id.

Follow-up to #5157 and #5172.
Switch DomainFetcher, DomainPresenter, DomainSharedOrgsPresenter and the
domains/default-domain paths on OrganizationsController to the bare-id
readable_org_ids(_for_domains)_query, removing the id -> guid -> id round-trip
from domain read-permission filtering.

Follow-up to #5157 and #5172.
Switch ServicePlanVisibilityFetcher to the bare-id readable_org_ids_query,
removing the id -> guid -> id round-trip from marketplace visibility checks.

Follow-up to #5157 and #5172.
Switch SecurityGroupListFetcher and SecurityGroupFetcher to the new bare-id
readable_security_group_ids_query, removing the id -> guid -> id round-trip
from the security group visibility filter. The single-resource guid lookup and
the guid-membership checks on individual actions are left untouched.

Follow-up to #5157 and #5172.
Switch IsolationSegmentOrganizationsFetcher (backing
GET /v3/isolation_segments/:guid/relationships/organizations for non-admins)
to the bare-id readable_org_ids_query. The IsolationSegmentListFetcher path is
left as-is: its organizations association is keyed on guid through the join
table, so no org id is in scope there.

Follow-up to #5157 and #5172.
@svkrieger
svkrieger force-pushed the remove-id-guid-id-roundtrips branch from 3301d77 to 687013f Compare July 30, 2026 10:12
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.

1 participant