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

Push and scale app and run-task #2303

Conversation

Benjamintf1
Copy link
Member

@Benjamintf1 Benjamintf1 commented Aug 2, 2022

  • push accepts --log-rate-limit / -l flag.
  • scale accepts --log-rate-limit / -l flag.
  • run-task accepts --log-rate-limit / -l flag.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 10, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@Benjamintf1 Benjamintf1 marked this pull request as ready for review August 11, 2022 15:24
@Benjamintf1 Benjamintf1 changed the title Push and scale app Push and scale app and run-task Aug 11, 2022
@molssongroup
Copy link

/easycla

@rroberts2222 rroberts2222 force-pushed the push-and-scale-app branch 13 times, most recently from 7739f18 to 4c24ae0 Compare August 19, 2022 22:00
…cloudfoundry#2278)

Bumps [rack](https://github.com/rack/rack) from 2.2.3 to 2.2.3.1.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](rack/rack@2.2.3...2.2.3.1)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rroberts2222 and others added 4 commits August 19, 2022 22:02
* since `cf push` uses manifests this commit also adds support for log
  rate limit in manifests

Signed-off-by: Carson Long <lcarson@vmware.com>
Signed-off-by: Rebecca Roberts <robertsre@vmware.com>
* app summary displayer can now handle rendering log rate and log rate
  limit metrics for running instances
* app summaries will show `0 of 0` if the cloud controller does not
  support log rate limit container metrics

Signed-off-by: Rebecca Roberts <robertsre@vmware.com>
Signed-off-by: Matthew Kocher <mkocher@vmware.com>
Signed-off-by: Rebecca Roberts <robertsre@vmware.com>
Signed-off-by: Matthew Kocher <mkocher@vmware.com>

Signed-off-by: Rebecca Roberts <robertsre@vmware.com>
* update help text to suggest using ='s with -1 to avoid flag parsing problem

Signed-off-by: Ben Fuller <benjaminf@vmware.com>
Signed-off-by: Matthew Kocher <mkocher@vmware.com>
* this affects non-manifest based commands

Signed-off-by: Matthew Kocher <mkocher@vmware.com>
@@ -197,7 +249,7 @@ var _ = Describe("app summary displayer", func() {
It("lists instance stats for process types that have > 0 instances", func() {
Expect(testUI.Out).To(Say(`type:\s+web`))
Expect(testUI.Out).To(Say(`sidecars: `))
Expect(testUI.Out).To(Say(`state\s+since\s+cpu\s+memory\s+disk\s+details`))
Expect(testUI.Out).To(Say(`state\s+since\s+cpu\s+memory\s+disk\s+logging\s+details`))
Copy link
Contributor

Choose a reason for hiding this comment

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

(Very) Nitpicky: Perhaps we can have a constant with the "title column" state\s+since\s+cpu\s+memory\s+disk\s+logging\s+details ?
I'm not against of the current implementation. It's just an idea.

@@ -3,7 +3,7 @@ GEM
specs:
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
rack (2.2.3)
rack (2.2.3.1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm, I think this came from rebasing our changes against main, I'm thinking it'll drop out when we rebase before merging it into main.

@@ -58,8 +59,8 @@ func ParseV3AppProcessTable(input []byte) AppTable {
// instance row
columns := splitColumns(row)
details := ""
if len(columns) >= 7 {
details = columns[6]
if len(columns) >= 8 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it 8 the number of columns we have? if that's the case, could we create a constant for that instead of hardcoding it ?

@@ -105,7 +105,7 @@ var _ = Describe("restart command", func() {
Eventually(session).Should(Say(`type:\s+web`))
Eventually(session).Should(Say(`instances:\s+1/1`))
Eventually(session).Should(Say(`memory usage:\s+\d+(M|G)`))
Eventually(session).Should(Say(`\s+state\s+since\s+cpu\s+memory\s+disk\s+details`))
Eventually(session).Should(Say(`\s+state\s+since\s+cpu\s+memory\s+disk\s+logging\s+details`))
Copy link
Contributor

Choose a reason for hiding this comment

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

Same (very) nitpicky suggestion as above. 😄

Copy link
Contributor

@jdgonzaleza jdgonzaleza left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@pivotalgeorge pivotalgeorge left a comment

Choose a reason for hiding this comment

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

Looks good + units pass for me

@jdgonzaleza jdgonzaleza merged commit 03bb10e into cloudfoundry:feature/logging-rate-limits Aug 29, 2022
Copy link
Member

@a-b a-b left a comment

Choose a reason for hiding this comment

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

LGTM

@Benjamintf1 Benjamintf1 deleted the push-and-scale-app branch August 30, 2022 17:08
jdgonzaleza pushed a commit that referenced this pull request Sep 7, 2022
* Bump rack from 2.2.3 to 2.2.3.1 in /fixtures/applications/example-app (#2278)

* `cf push` command accepts log rate limit flag

* since `cf push` uses manifests this commit also adds support for log
  rate limit in manifests

* `cf scale` command accepts log rate limit flag

* app summary displayer can now handle rendering log rate and log rate
  limit metrics for running instances

* app summaries will show `0 of 0` if the cloud controller does not
  support log rate limit container metrics

* `cf run-task` command accepts log rate limit flag

* update help text to suggest using ='s with -1 to avoid flag parsing problem

* Flag parser accepts 0B, -1B, 0T, etc for flags

* this affects non-manifest based commands

* Extract constants for instance stats columns

* Extract constant for column count

Signed-off-by: Carson Long <lcarson@vmware.com>
Signed-off-by: Rebecca Roberts <robertsre@vmware.com>
Signed-off-by: Ben Fuller <benjaminf@vmware.com>
Signed-off-by: Matthew Kocher <mkocher@vmware.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.

9 participants