Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix test flakiness resulting from credhub-service-broker asset's improper error handling #863

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

ctlong
Copy link
Member

@ctlong ctlong commented Jun 9, 2023

Are you submitting this PR against the develop branch?

Yes

What is this change about?

Refactors the credhub-service-broker asset for clarity, and to handle errors better. We were seeing a good amount of pipeline flakes recently that were resulting from the app going into a panic off one-time failures to connect to CredHub.

Please provide contextual information.

https://concourse.wg-ard.ci.cloudfoundry.org/teams/main/pipelines/cf-deployment/jobs/upgrade-cats/builds/340

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

v29.1.0

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?

N/A

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

Actually knocks about 2 seconds off the runtime per test using this app because of the switch from restarting to starting. Not including the windows suite this amounts to about 16 seconds total.

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!

None

Some differences in the way the new app works:
* Shares service UUID and plan UUID between catalog calls, rather than
  generating each time.
* Logs and returns internal server errors on certain failures.
* Only spins up credhub client on startup and reuses throughout.
* No manifest, as the old one was just setting a GOPACKAGENAME, which
  isn't necessary anymore.

In particular, that second bullet is important, as there were some
consistent flakes when running CATs due to a one-time failure to connect
with credhub that wasn't handled appropriately by the old app, and
resulted in a panic.

Also updates the tests to use this new app more appropriate, with the
`--no-start` flag and then starting it up after environment variables
are set. This should actually speed up runtime!
@ctlong ctlong requested a review from a team June 9, 2023 21:42
@ctlong ctlong merged commit 6cbb012 into develop Jun 21, 2023
@ctlong ctlong deleted the refactor-credhub-service-broker branch June 21, 2023 16:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants