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

Make IO tests more stable #3497

Merged
merged 2 commits into from
May 9, 2024

Conversation

wolfgangwalther
Copy link
Member

This tries to address #3424 by preventing test_admin_ready_includes_schema_cache_state from creating 100s of connection retries per second and thus somehow making postgrest unresponsive. This does not fix the underlying problem, but should at least make the tests not cause random failures anymore.

One thing that is not clear to me is: Why are the IO tests only failing recently and not before? The test here has been in there for a long time already. It might be connected to the much extended logging, maybe the huge number of connection retries only becomes a problem due to the big number of logs generated that way.

The statement timeout needs to be cleaned up after each test that
modifies it instead of before the test. Otherwise the changed timeout
leaks into other tests.
@wolfgangwalther wolfgangwalther force-pushed the io-test-stability branch 2 times, most recently from 87ae687 to 334537d Compare May 9, 2024 07:41
…g out

By increasing the delays in this test by factor 400x, postgrest will not
swamp pg with connection retries after the failed schema cache anymore.

This would happen because there is no backoff included after fatal
errors. Once it does, the io tests hang indefinitely in CI.
@wolfgangwalther
Copy link
Member Author

wolfgangwalther commented May 9, 2024

I just pushed a no-change amended commit to trigger a new run. I also opened 4 PRs in my own fork with the same branch, to run the pipeline a few more times. Normally, this should trigger at least one failed IO test given the rate it occurred recently. Let's see whether that will still be the case or not.

I also repeatedly ran the io tests locally in a loop for a few hours. This eventually kept hanging at the test fixed in this PR when I did it yesterday - but didn't happen this time around.

@wolfgangwalther
Copy link
Member Author

All of the PRs passed the tests fine - I think this will work. Will merge.

@wolfgangwalther
Copy link
Member Author

(please still have a look at the changes later, @steve-chavez, can't hurt)

@wolfgangwalther wolfgangwalther merged commit 747c78f into PostgREST:main May 9, 2024
24 checks passed
@wolfgangwalther wolfgangwalther deleted the io-test-stability branch May 9, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants