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 initial GET /v3/apps/:guid/processes/:type/stats endpoint #3307

Merged
merged 1 commit into from
May 29, 2024

Conversation

gogolok
Copy link
Contributor

@gogolok gogolok commented May 28, 2024

Is there a related GitHub Issue?

#2340

What is this change about?

It adds the endpoint GET /v3/apps/:guid/processes/:type/stats and returns the stats that are already available in the ProcessStats.

Does this PR introduce a breaking change?

No

Acceptance Steps

cf push an app and try to access the stats endpoint.
It should deliver the same result as cf curl /v3/processes/:guid/stats

Tag your pair, your PM, and/or team

None


When("we wait for the metrics to be ready", func() {
BeforeEach(func() {
Eventually(func(g Gomega) {
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend moving this Eventually into the JustBeforeEach above (line 255). Thus whenever stats are available we could check them with a single It. Besides being more "idiomatic", this would speed testing up as testing stats would push a single app (with two Its the test app is pushed twice)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to do that. Can you please check whether this is how you intended it to be used?

Copy link
Member

@danail-branekov danail-branekov May 29, 2024

Choose a reason for hiding this comment

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

Yes, this is what I meant. If you could just reorder BeforeEach and JustBeforeEach in the e2e test, I am going to merge it

@danail-branekov
Copy link
Member

Thanks for the PR, @gogolok

It looks good, I have just put a small comment on the e2e test.

@gogolok gogolok force-pushed the apps_process_stats branch from 3ae63ff to ff5a43a Compare May 29, 2024 10:48
@gogolok gogolok requested a review from danail-branekov May 29, 2024 10:50
}).Should(Succeed())
})

BeforeEach(func() {
Copy link
Member

Choose a reason for hiding this comment

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

Final nitpick, could you move BeforeEach above JustBeforeEach? I find it more logical.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed the order

@gogolok gogolok force-pushed the apps_process_stats branch from ff5a43a to 984fd07 Compare May 29, 2024 11:02
@gogolok gogolok requested a review from danail-branekov May 29, 2024 11:02
@danail-branekov danail-branekov enabled auto-merge (rebase) May 29, 2024 11:04
@gogolok
Copy link
Contributor Author

gogolok commented May 29, 2024

@danail-branekov
Copy link
Member

Not sure why the job got cancelled, I had not noticed that. Retriggering it now

@danail-branekov danail-branekov merged commit de464f7 into cloudfoundry:main May 29, 2024
11 checks passed
@gogolok gogolok deleted the apps_process_stats branch May 29, 2024 13:20
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