Repository navigation
build(shared-notes-server): Add postgresql-14 as a dependency in opts… - #25117
Conversation
…-jammy.sh Needed for the operation of the component and also referenced in the after-install script. Therefore needs to have postgres prior.
WalkthroughThis pull request adds Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
build/packages-template/bbb-shared-notes-server/opts-jammy.sh (1)
5-5: ⚡ Quick winAdd PostgreSQL service readiness check to after-install.sh before database operations.
The after-install.sh script executes psql commands directly without verifying PostgreSQL is accepting connections. Although package dependency ordering typically ensures PostgreSQL is initialized before the post-install script runs, adding an explicit check (e.g., pg_isready or a connection test) makes the script more robust and handles edge cases where service startup might be delayed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build/packages-template/bbb-shared-notes-server/opts-jammy.sh` at line 5, Modify after-install.sh to verify PostgreSQL is accepting connections before running any psql commands: locate the database operation block in after-install.sh and precede it with a readiness check (e.g., call pg_isready or attempt a simple psql connection in a retry loop with a short sleep and timeout). Ensure the script fails with a clear error if the timeout is reached; this prevents running psql commands when Postgres is not yet ready.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@build/packages-template/bbb-shared-notes-server/opts-jammy.sh`:
- Line 5: Modify after-install.sh to verify PostgreSQL is accepting connections
before running any psql commands: locate the database operation block in
after-install.sh and precede it with a readiness check (e.g., call pg_isready or
attempt a simple psql connection in a retry loop with a short sleep and
timeout). Ensure the script fails with a clear error if the timeout is reached;
this prevents running psql commands when Postgres is not yet ready.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 46af8ceb-92fe-49d6-b7d5-a37ab450cf85
📒 Files selected for processing (1)
build/packages-template/bbb-shared-notes-server/opts-jammy.sh
🚨 Automated tests failed |



…-jammy.sh
What does this PR do?
Add
postgresql-14as a dependency ofbbb-shared-notes-server.It is needed for the operation of the component and also referenced in the after-install script. Therefore needs to have
postgresprior.Closes Issue(s)
Closes # none
Motivation
@danimo reported hitting on install: