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

Use space subqueries for fetchting service credential bindings #3106

Merged

Conversation

johha
Copy link
Contributor

@johha johha commented Dec 14, 2022

As a regular user the select query for service credential bindings is filtered by a list of space guids (spaces the user has access to).
This can produce very long db queries. Instead we can use subqueries to filter the spaces directly in the db. The same approach is used in service lists, see #2580.

  • 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

@johha johha force-pushed the space-subquery-for-service-binding branch from b3ee59a to e46c6af Compare December 14, 2022 16:39
As a regular user the select query for service credential bindings is
filtered by a list of space guids (spaces the user has access to).
This can produce very long queries. Instead we can use subqueries to filter the spaces directly on the db.
The same approach is used in the list services endpoint, see cloudfoundry#2580.
@johha johha force-pushed the space-subquery-for-service-binding branch from e46c6af to ecbc749 Compare December 15, 2022 08:07
@johha johha marked this pull request as ready for review December 15, 2022 10:01
@johha johha requested a review from philippthun December 19, 2022 16:40
@johha johha force-pushed the space-subquery-for-service-binding branch from d0229e4 to 8a28d92 Compare December 20, 2022 15:25
@johha johha requested a review from philippthun December 20, 2022 15:30
@johha johha merged commit 90aec7f into cloudfoundry:main Dec 21, 2022
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