Fix playwright test flakiness#1495
Merged
jcscottiii merged 4 commits intomainfrom May 16, 2025
Merged
Conversation
2a91627 to
d10a68b
Compare
During the saved search playwright tests, we kill and reopen the ports needed for the database (as well as all other ports). We do this because beforehand, we did not port forward the ports for the database and only the ports needed to connect to the app (the backend already had access to the database internally) But instead of doing that, we now port forward the database ports. Then we have a new helper makefile target to check if the port is live. We use `nc` instead of curl because it did not work with grpc. The devcontainer Dockerfile has been updated to install that dependency (devs will need to rebuild their devcontainer) Hopefully, this will reduce the times when the port fails to forward again on subsequent tries since we never have to forward it again. One thing to note: Now developers will need to run make port-forward-manual first before dev_fake_data and other commands after running start-local
d10a68b to
12f5bce
Compare
DanielRyanSmith
approved these changes
May 16, 2025
Collaborator
DanielRyanSmith
left a comment
There was a problem hiding this comment.
Thank you for looking into this. 🙂
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During the saved search playwright tests, we kill and reopen the ports needed for the database (as well as all other ports).
We do this because beforehand, we did not port forward the ports for the database and only forwarded the ports needed to connect to the app (the backend already had access to the database internally)
But instead of doing that, we now port forward the database ports during
make port-forward-manual. To help with that, I modified the helper makefile target to check if the port is live. We usencinstead of curl because it did not work with grpc (which the spanner emulator uses). The devcontainer Dockerfile has been updated to install that dependency (devs will need to rebuild their devcontainer)I also started to add readinessProbes for some of the pods. And for the database and auth pods, I modified the initial delay before checking for readiness since sometimes those take some time.
Hopefully, this will reduce the times when the port fails to forward again on subsequent tries since we never have to forward it again.
Resources:
A few things to note: