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

Run docker-compose based tests in multiple test workers #10398

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MMeent
Copy link
Contributor

@MMeent MMeent commented Jan 14, 2025

Previously they were run sequentially, which meant a very long runtime. Now, it's reduced by a good factor when the CPU time is available.

Problem

The runtime for https://github.com/neondatabase/neon/actions/runs/12773839881/job/35613450148?pr=10394 is 17 minutes, which is a really bad developer experience.

Summary of changes

We parallelize the tests, allowing for much faster completion when and where tests are parallelizable.

Previously they were run sequentially, which meant a very long runtime. Now,
it's reduced by a good factor when the CPU time is available.
@MMeent MMeent requested a review from a-masterov January 14, 2025 21:10
Copy link

7304 tests run: 6933 passed, 0 failed, 371 skipped (full report)


Flaky tests (2)

Postgres 17

  • test_physical_replication_config_mismatch_max_locks_per_transaction: release-arm64

Postgres 14

Code coverage* (full report)

  • functions: 32.9% (8145 of 24776 functions)
  • lines: 48.1% (68235 of 141903 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
22675f4 at 2025-01-14T22:04:22.516Z :recycle:

@MMeent MMeent marked this pull request as draft January 14, 2025 22:20
@MMeent
Copy link
Contributor Author

MMeent commented Jan 15, 2025

So, by adding -j $(nproc) we gain no profit in performance.

Yeah, I also noticed this, but only after creating the PR.
Instead, I've started upstreaming some test paralellization improvements upstream, using pg_regress' parallel schedules.

See e.g.

Copy link
Contributor

@a-masterov a-masterov left a comment

Choose a reason for hiding this comment

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

I agree that the extension testing process is quite long and annoying. Still, I have some doubts that just adding -j $(nproc) can significantly reduce the runtime, and that's why: the usual regression test just runs one pg_regress process and then pg_regress loads the schedule and runs the tests sequentially or parallelly. So, by adding -j $(nproc) we gain no profit in performance.
Practically, we see that the test-image test for this PR runs almost the same time as for 10394

PR-10394 PR-10398 PR-10392
x64-pg17 5 mins 4 mins 4 mins
x64-pg16 9 mins 8 mins 8mins
arm-pg17 13 mins 12 mins 13 mins
arm-pg16 18 mins. 18 mins 17 mins

It would be more profitable to redesign the schedule but in this case, we would maintain our versions of the regression tests or try to pass our patches upstream.

But I have a better idea: we can run the tests in parallel using the different timelines. And I would like to come up with a prototype soon.

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