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

new cat for readiness health check feature - linux & windows #915

Merged
merged 9 commits into from
Aug 24, 2023

Conversation

ameowlia
Copy link
Member

@ameowlia ameowlia commented Aug 9, 2023

Are you submitting this PR against the develop branch?

✅ Yes.

What is this change about?

This PR adds a new CAT for readiness health checks, a feature that is coming out with new versions of CAPI and Diego soon.

Please provide contextual information.

What version of cf-deployment have you run this cf-acceptance-test change against?

⛔️⛔️⛔️TBD⛔️⛔️⛔️

Please check all that apply for this PR:

  • introduces a new test --- Are you sure everyone should be running this test?
  • changes an existing test
  • requires an update to a CATs integration-config

Did you update the README as appropriate for this change?

  • YES
  • N/A

If you are introducing a new acceptance test, what is your rationale for including it CATs rather than your own acceptance test suite?

We are adding a major new feature to CF. This CAT will test one basic workflow for that feature.

How many more (or fewer) seconds of runtime will this change introduce to CATs?

220-ish seconds. Sorry :(

What is the level of urgency for publishing this change?

  • Urgent - unblocks current or future work
  • Slightly Less than Urgent

Tag your pair, your PM, and/or team!

@geofffranks geofffranks force-pushed the readiness-checks branch 4 times, most recently from 2fcaee8 to 74e6ac7 Compare August 16, 2023 18:50
[#185045027](https://www.pivotaltracker.com/story/show/185045027)

Signed-off-by: Geoff Franks <gfranks@vmware.com>
Signed-off-by: Amelia Downs <adowns@vmware.com>
@ameowlia ameowlia changed the title DRAFT - cat for readiness health check feature cat for readiness health check feature - linux Aug 16, 2023
@ameowlia ameowlia changed the title cat for readiness health check feature - linux DRAFT - cat for readiness health check feature - linux Aug 16, 2023
geofffranks and others added 2 commits August 17, 2023 15:21
Signed-off-by: Amelia Downs <adowns@vmware.com>
Signed-off-by: Geoff Franks <gfranks@vmware.com>
@ameowlia ameowlia changed the title DRAFT - cat for readiness health check feature - linux new cat for readiness health check feature - linux & windows Aug 17, 2023
@ameowlia ameowlia marked this pull request as ready for review August 17, 2023 15:23
Copy link
Member

@ctlong ctlong left a comment

Choose a reason for hiding this comment

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

I've left a bunch of comments for your review. Generally it looks good.

🤔 I do wonder whether there's a way we can split up the tests to reduce the time this adds to CATs. I'm thinking that maybe the test could be split in two:

  1. Push an app that will fail the readiness health check (i.e. push with --no-start and set an env var that will cause readiness to health check to fail at first), then reactivate it with the proxy app c2c and see everything work.
  2. Push an app that will pass the readiness health check, then deactivate the readiness health check with the endpoint, and see it removed from the routing chain.

.gitignore Outdated Show resolved Hide resolved
apps/readiness_healthcheck.go Show resolved Hide resolved
apps/readiness_healthcheck.go Outdated Show resolved Hide resolved
apps/readiness_healthcheck.go Outdated Show resolved Hide resolved
windows/readiness_healthcheck.go Outdated Show resolved Hide resolved
windows/readiness_healthcheck.go Outdated Show resolved Hide resolved
windows/readiness_healthcheck.go Show resolved Hide resolved
apps/readiness_healthcheck.go Show resolved Hide resolved
windows/readiness_healthcheck.go Outdated Show resolved Hide resolved
ameowlia and others added 3 commits August 18, 2023 18:33
Signed-off-by: Geoff Franks <gfranks@vmware.com>
Signed-off-by: Amelia Downs <adowns@vmware.com>
Signed-off-by: Geoff Franks <gfranks@vmware.com>
@geofffranks
Copy link
Contributor

Feedback has been addressed/commented on. I looked into splitting them out into multiple tests to parallelize. Unfortunately we don't have any feedback from an app starting up that it has failed the initial readiness checks, other than absence of a message. Short of waiting for a while, we can't differentiate "readiness hasn't checked yet" and "readiness ran and failed." This makes the second test run slightly longer than when a single test runs both cases.

- convert various assertions to use gbytes.Say()
- remove fixed fixmes/todos
- make logic between windows + linux identical - using SSH to recover
  for time reduction + simplicity
- put SSH recovery steps in a condition based on test config enabling
  app SSH
- reduce max wait times where possible

Signed-off-by: Amelia Downs <adowns@vmware.com>
Signed-off-by: Geoff Franks <gfranks@vmware.com>
Signed-off-by: Amelia Downs <adowns@vmware.com>
@ctlong
Copy link
Member

ctlong commented Aug 21, 2023

I looked into splitting them out into multiple tests to parallelize... This makes the second test run slightly longer than when a single test runs both cases.

@geofffranks and I chatted about this and discovered that he accidentally ran his comparison with no parallelization, as ./bin/test does not run CATs in parallel by default. The --procs flag needs to be explicitly provided.

👉 I'm waiting for that comparison to be re-ran with parallelization before I review this PR again. 👈

@geofffranks
Copy link
Contributor

I re-ran with --procs 8 and as a single test, it executed in 104s. As a split test, it took 148s.

The main difference is that when split, the un-ready app has to wait in a Consistently() for 25s to ensure the app never becomes ready, which the original test doesn't have.

Going to leave this as a single test.

@ctlong
Copy link
Member

ctlong commented Aug 22, 2023

I'm still seeing the local path C:\Users\gfranks\source\repos\cf-acceptance-tests referenced throughout the changes to Nora. I don't know .NET well enough to know when it's avoidable or not, but hopefully most are 🤞

Can you all please search for the term gfranks in the assets/nora path (make sure to check hidden and ignored files!) and remove them wherever possible.


Edit:

$ rg -i --hidden --no-ignore --files-with-matches gfranks
NoraPublished/Nora.csproj.user
NoraPublished/Properties/PublishProfiles/NoraPublished.pubxml.user
NoraPublished/Properties/PublishProfiles/FolderProfile.pubxml
NoraPublished/Properties/PublishProfiles/FolderProfile.pubxml.user
Nora/Nora.csproj.user
Nora/Properties/PublishProfiles/FolderProfile.pubxml.user
Nora/Properties/PublishProfiles/FolderProfile.pubxml
Nora.Tests/obj/Release/Nora.Tests.csproj.FileListAbsolute.txt

Signed-off-by: Geoff Franks <gfranks@vmware.com>
ctlong
ctlong previously approved these changes Aug 22, 2023
@ctlong ctlong self-assigned this Aug 22, 2023
@ctlong
Copy link
Member

ctlong commented Aug 22, 2023

Aaaah shoot, can't believe I didn't catch this earlier 🤦

The base branch for this PR needs to be develop. Can you please change the base branch and rebase.

@ctlong ctlong self-requested a review August 22, 2023 18:48
@ctlong ctlong dismissed their stale review August 22, 2023 18:49

PR is against the wrong branch

@ameowlia ameowlia changed the base branch from main to develop August 23, 2023 14:10
ctlong
ctlong previously approved these changes Aug 23, 2023
go.mod Outdated Show resolved Hide resolved
Signed-off-by: Geoff Franks <gfranks@vmware.com>
ctlong
ctlong previously approved these changes Aug 23, 2023
@ctlong ctlong dismissed their stale review August 23, 2023 21:04

There are merge conflicts

@ctlong ctlong merged commit e0d4e3d into cloudfoundry:develop Aug 24, 2023
3 checks passed
@ameowlia ameowlia deleted the readiness-checks branch August 24, 2023 17:19
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.

3 participants