Refuse direct PostgreSQL pool opens in the lint
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
Start from the existing forbidigo rule against sql.Open in the repository's lint configuration; the payload does not name that file, so search for forbidigo. Add a matching entry for pgxpool.New, pgxpool.NewWithConfig, stdlib.OpenDB and stdlib.OpenDBFromPool, scoped to production code and excluding test files. Done when the linter flags those calls in production code, test files stay clean, and the existing lint run passes.
Written by the indexing model from the issue text.
Description
What
Add a forbidigo rule against pgxpool.New, pgxpool.NewWithConfig, stdlib.OpenDB and stdlib.OpenDBFromPool in production code, beside the rule against sql.Open. Test code keeps its own pools, since some tests need settings dbkit refuses, such as a pool of one connection.
Why
Every production connection now goes through one pool capped by GOPHENBERG_DATABASE_MAX_CONNS. The rule keeps a second pool from coming back unnoticed.
- Dominant language
- Go
- Stars
- 293
- Forks
- 50
- Avg merge
- 23h 28m
- Merged PRs (30d)
- 133
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
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.
More from gopherium/gophenberg
-
Say a long jump stays down only when its new build reached the databasePossibly taken @Erfouni claimed this 4 days ago. Openhelp wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
gopherium/gophenberg#573 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
gopherium/gophenberg#554 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
gopherium/gophenberg#543 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
gopherium/gophenberg#538 · 1 comment ·
Maintainers usually reply within 1 day
-
Import resume test fails when the wall clock steps backPossibly taken A pull request linked to this issue is open or already merged. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
gopherium/gophenberg#486 ·
Maintainers usually reply within 1 day
All issues in gopherium/gophenberg
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
dragonflydb/dragonfly-operator#619 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
cloudfoundry/bosh-bootloader#701 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
baremetal: private network check rejects offer-specific options (Private Network 10Gbps / 25Gbps)Possibly taken @lbarrosby claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
scaleway/terraform-provider-scaleway#4587 ·
Maintainers usually reply within 1 day
-
blocked-needs-validation bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
projectcapsule/capsule#2280 ·
Maintainers usually reply within 1 day