-
Notifications
You must be signed in to change notification settings - Fork 361
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
Feat: log rate limits #2900
Feat: log rate limits #2900
Conversation
e42958b
to
e341e31
Compare
aea5d28
to
820ebce
Compare
@sethboyles we think this is ready to go! Can you please take a look? |
820ebce
to
76e9f9e
Compare
|
Updates the `/v3/organization_quotas/` and `/v3/space_quotas/` endpoints to allow setting and retrieving of a new parameter (`log_rate_limit_in_bytes_per_second`). This will eventually permit the user to set log line production limits in bytes per second, rather than lines per second. Updates v3/processes and v3/tasks endpoints to support `log_rate_limit_in_bytes_per_second` An unlimited log rate limit is represented as -1 Tracker Story ID: [#182311424] Tracker Story ID: [#182353823] Tracker Story ID: [#182311433] Tracker Story ID: [#182624538] Tracker Story ID: [#182624530] Github Issue: cloudfoundry/capi-release#245 Signed-off-by: Carson Long <[email protected]> Signed-off-by: Kenneth Lakin <[email protected]> Signed-off-by: Duane May <[email protected]> Signed-off-by: Matthew Kocher <[email protected]> Signed-off-by: Ben Fuller <[email protected]> Signed-off-by: Seth Boyles <[email protected]> Co-authored-by: Matthew Kocher <[email protected]>
- We accept -1 without a byte suffix to mean unlimited - We also return -1 in the rendered manifest [#182624538](https://www.pivotaltracker.com/story/show/182624538) Github Issue: cloudfoundry/capi-release#245 Co-authored-by: Rebecca Roberts <[email protected]> Co-authored-by: Andrew Crump <[email protected]>
- We found scaling_operation? to be a misleading name - Just refer to started? to make it clearer when validation will be performed [#182624538](https://www.pivotaltracker.com/story/show/182624538) Co-authored-by: Andrew Crump <[email protected]>
[#182311441](https://www.pivotaltracker.com/story/show/182311441) Co-authored-by: Rebecca Roberts <[email protected]>
[#182311441](https://www.pivotaltracker.com/story/show/182311441) Co-authored-by: Matthew Kocher <[email protected]>
- The log rate limit from the application web process is applied to the staging task - The staging log rate limit can be customized when creating a build, for consistency with memory and disk limits [#182311441](https://www.pivotaltracker.com/story/show/182311441) Co-authored-by: Rebecca Roberts <[email protected]>
[#182311441](https://www.pivotaltracker.com/story/show/182311441) cloudfoundry/capi-release#245 Co-authored-by: Rebecca Roberts <[email protected]>
- Found that if there is a new version of Diego and an old version of cloud controller, the field would not be provided and defaulted to 0. - Wrapped the integer in a MessageType so it would default to null. Co-authored-by: Duane May <[email protected]>
* Add Log Rate container metrics. These metrics allow users to see how much each application is logging. * Remove support for getting metrics from Traffic Controller. Log Cache has been the default for retreiving metrics for a long time. Removing "temporary" config flag and support for the old way of connecting to Traffic Controller for metrics We did the two above items together because we did not want to add support for getting the new container metrics from Traffic Controller. The code was manually creating Traffic Controller protobufs and shoving Log Cache data into them, which we had to move away from to make this work without delving into Traffic Controller protobufs. Signed-off-by: Duane May <[email protected]> Co-authored-by: Duane May <[email protected]> Signed-off-by: Matthew Kocher <[email protected]> Co-authored-by: Matthew Kocher <[email protected]> Signed-off-by: Ben Fuller <[email protected]> Co-authored-by: Ben Fuller <[email protected]>
All our archeology seems to indicate that dashes should be preferred in manifests as they are yaml and yaml prefers kebab-case to snake_case. We also uncovered some oddities around setting process level properties on the top level app object. We added tests to document that disk and memory don't show up in the diff when changed on the app instead of the process. We also discovered that proprties like health-check that shouldbe kebab-case were not working at the app level and fixed them to be consistent. Signed-off-by: Rebecca Roberts <[email protected]> Co-authored-by: Rebecca Roberts <[email protected]>
76e9f9e
to
be468d6
Compare
be468d6
to
d1f388c
Compare
Awesome! I'll go ahead and mark it as 'ready for review' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at this in detail but have some questions just from a 5 minute skim
@@ -0,0 +1,5 @@ | |||
Sequel.migration do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need five separate migrations? I assume they came to be because of the many commits, but if all five are needed for the feature, it seems like it should be one migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I pushed a change to combine the migrations.
Signed-off-by: Rebecca Roberts <[email protected]> Co-authored-by: Rebecca Roberts <[email protected]> wip: group with app manifest message updates for unlimited
- Adds validation to messages for builds, manifest processes and tasks - Avoids 'An unknown error occurred' caused by the database insert failing due to an out of range error. [#182969510](https://www.pivotaltracker.com/story/show/182969510) Co-authored-by: Matthew Kocher <[email protected]>
Fixes: Using the `raise_error` matcher without providing a specific error or message risks false positives [#182969510](https://www.pivotaltracker.com/story/show/182969510) Co-authored-by: Rebecca Roberts <[email protected]>
e8afa9c
to
e30a91f
Compare
Hello! Please let the cli team when this PR since it's related with cloudfoundry/cli#2303 |
@Benjamintf1 for the docs, should we mark this as experimental or upcoming? Are the changes in upstream components like Diego merged in? |
@sethboyles I'd lean towards no, but defer to your process for introducing new features. The Diego work has been merged, and released in v2.66.0. That's the only upstream component. Note: Ben's on vacation for the next couple weeks. |
That's good enough for me. Thanks! |
Hey @ctlong , We are seeing a couple of errors with manifests. When supplying The other issue we are seeing is if we set
However, with this branch, we are seeing this error rendered in the
And then the error is not picked up by We looked at the code a little and are not sure how this odd error happened |
The cf CLI would provide these values as strings, however directly curling the endpoint with the values as integers would result in a 500. Co-authored-by: Carson Long <[email protected]>
Co-authored-by: Carson Long <[email protected]>
@sethboyles Thanks! We pushed some more changes to address these issues. |
@acrmp thanks! Confirmed that both issues are fixed. Sending an int value like
I think coercing (oh the joys of yaml...) |
@sethboyles Thanks. I pushed a fix. |
Noticed a 500 on processes/scale when sending
|
checked the other endpoints: |
@sethboyles While looking at the issue with sending
|
We noticed it with |
that is to say I'm not super concerned if it's not supposed to be valid. If it's not, we can toss a generic story in the backlog to deal with all three of these fields if you'd rather get this PR merged sooner than later |
Signed-off-by: Andrew Crump <[email protected]>
@sethboyles We don't think null is valid in this case. But we have put in a fix so that the error is not produced in this case. @acrmp & Duane |
- this [pr](cloudfoundry/cloud_controller_ng#2900) added log rate limits which are now part of the expected manifest Co-authored-by: Michael Oleske <[email protected]> Co-authored-by: David Alvarado <[email protected]>
We stopped using it as of #2900 Co-authored-by: Joseph Palermo <[email protected]> Co-authored-by: Merric de Launey <[email protected]>
We stopped using it as of #2900 Co-authored-by: Joseph Palermo <[email protected]> Co-authored-by: Merric de Launey <[email protected]>
We stopped using it as of #2900 Co-authored-by: Joseph Palermo <[email protected]> Co-authored-by: Merric de Launey <[email protected]> Co-authored-by: Joseph Palermo <[email protected]>
We stopped using it as of cloudfoundry#2900 Co-authored-by: Joseph Palermo <[email protected]> Co-authored-by: Merric de Launey <[email protected]> Co-authored-by: Joseph Palermo <[email protected]>
Introduce log rate limits to org and space quotas, and tasks and processes.
cloudfoundry/capi-release#245
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
branchI have run CF Acceptance Tests
cc/ @sethboyles