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

add 'current_droplet' to app's relationships #3863

Merged

Conversation

gmllt
Copy link
Member

@gmllt gmllt commented Jun 27, 2024

The only way to retrieve the current droplet of an application via the API is to go through the /v3/apps/:app_guid/droplets/current or /v3/apps/:app_guid/relationships/current_droplet endpoints.

In a context where we want to retrieve all the applications (more than 3000 in my case) and their current droplet, it is therefore necessary to make one request per application (more than 3000 requests).

This PR aims to make the current_droplet relationship visible on all endpoints presenting the app object :

  • /v3/apps
  • /v3/apps/:app_guid
  • /v3/stacks/:stack_id/apps
  • ...

See issue #3860

  • 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

@gmllt gmllt force-pushed the add-current-droplet-relationship branch from 48c0cf9 to 2d0df2c Compare June 27, 2024 16:51
@gmllt gmllt changed the title draft add 'current_droplet' to app's relationships add 'current_droplet' to app's relationships Jun 27, 2024
@gmllt gmllt force-pushed the add-current-droplet-relationship branch 2 times, most recently from dee18a6 to a592d39 Compare June 27, 2024 17:51
@gmllt gmllt force-pushed the add-current-droplet-relationship branch from a592d39 to a6196c5 Compare June 27, 2024 18:10
docs/v3/source/includes/resources/apps/_object.md.erb Outdated Show resolved Hide resolved
docs/v3/source/includes/resources/apps/_object.md.erb Outdated Show resolved Hide resolved
spec/unit/presenters/v3/app_presenter_spec.rb Outdated Show resolved Hide resolved
spec/request/apps_spec.rb Outdated Show resolved Hide resolved
spec/request/apps_spec.rb Outdated Show resolved Hide resolved
spec/request/apps_spec.rb Outdated Show resolved Hide resolved
spec/request/apps_spec.rb Outdated Show resolved Hide resolved
spec/request/apps_spec.rb Outdated Show resolved Hide resolved
@philippthun philippthun linked an issue Jun 28, 2024 that may be closed by this pull request
@philippthun philippthun merged commit d543a66 into cloudfoundry:main Aug 8, 2024
9 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Aug 8, 2024
Changes in cloud_controller_ng:

- add 'current_droplet' to app's relationships
    PR: cloudfoundry/cloud_controller_ng#3863
    Author: Gilles Miraillet <gilles.miraillet@orange.com>
@gmllt gmllt deleted the add-current-droplet-relationship branch August 9, 2024 09:05
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.

Add current droplet guid in apps relationships
2 participants