ci: run the Postgres aggregate tests (add a Postgres service)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with the unit-test job in the GitHub Actions workflow file and add the postgres:16-alpine service with the env block from the issue. Then find where the tests read CAMPUS_TEST_POSTGRES_URI (the aggregate test module added in PR #16) to confirm the URI matches the service. Done when the Postgres aggregate tests run and pass in CI rather than being skipped.
Written by the indexing model from the issue text.
Description
Problem
PR #16 added TableInterface.aggregate() with 164 test cases that run against a real PostgreSQL when CAMPUS_TEST_POSTGRES_URI is set. CI does not set it, so every one of them is skipped there.
They were run locally against postgres:16-alpine and all passed, on text, TIMESTAMPTZ and TIMESTAMP columns, with results identical to SQLite.
Why it matters
The PostgreSQL and SQLite backends build different SQL for time buckets and percentiles. Only the PostgreSQL run shows that the two agree, and the tables this was built for (spans, on campus.audit) are PostgreSQL in both environments.
Two behaviours are only observable on PostgreSQL:
SET LOCAL TIME ZONE 'UTC'. Removing it failed 13 cases on the nativeTIMESTAMPtable, where naive timestamps came out 8 hours off under anAsia/Singaporesession.- The Postgres error path (
sanitize_driver_error).
Proposal
Add a postgres:16-alpine service to the unit-test job and export CAMPUS_TEST_POSTGRES_URI for it. The tests create and drop their own tables and leave the database empty.
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: test
POSTGRES_DB: campus_test
ports:
- 5432:5432
env:
CAMPUS_TEST_POSTGRES_URI: postgresql://postgres:test@localhost:5432/campus_test
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 33m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day