Skip to content

Conversation

nookala
Copy link
Contributor

@nookala nookala commented Aug 13, 2025

Add rate limits to /v3/info

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:

Add rate limits configuration to /v3/info end point.
cf curl "/v3/info"
{"build":"10.2.0-build.7","cli_version":{"minimum":"6.23.0","recommended":"6.23.0"},"custom":{},"description":"https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-platform-for-cloud-foundry/10-2/tpcf/runtime-rn.html","name":"Small Footprint Tanzu Platform for Cloud Foundry","version":0,"osbapi_version":"2.15","rate_limits":{"enabled":true,"general_limit":4000,"reset_interval_in_minutes":60},"links":{"self":{"href":"https://api.sys.tas.7b5e3720.shepherd.tanzu.broadcom.net/v3/info"},"support":{"href":"https://tanzu.vmware.com/support"}}}

  • 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 rate limits to /v3/info
@nookala nookala marked this pull request as ready for review August 13, 2025 19:16
@Samze Samze requested a review from Copilot August 14, 2025 17:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds rate limiting configuration information to the /v3/info API endpoint to expose rate limiter status and limits to API consumers.

  • Extends the /v3/info response to include rate_limits object with enabled status, general limit, and reset interval
  • Refactors info controller to extract field population into a private method
  • Updates documentation to reflect the new rate limits fields in API responses

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
app/controllers/v3/info_controller.rb Refactors field population into private method and adds rate limiter configuration fields
app/presenters/v3/info_presenter.rb Adds rate_limits object to API response hash
spec/request/info_spec.rb Adds test coverage for rate limiter enabled/disabled scenarios
docs/v3/source/includes/api_resources/_info.erb Updates API documentation examples to include rate_limits field

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Samze Samze merged commit 497ac82 into cloudfoundry:main Aug 15, 2025
19 of 20 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Aug 15, 2025
Changes in cloud_controller_ng:

- Add rate limits to info end point
    PR: cloudfoundry/cloud_controller_ng#4514
    Author: Sriram Nookala <[email protected]>

Dependency updates in cloud_controller_ng:

- build(deps-dev): bump rubocop-rails from 2.32.0 to 2.33.3
    PR: cloudfoundry/cloud_controller_ng#4515
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.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.

2 participants