-
-
Notifications
You must be signed in to change notification settings - Fork 376
Fix ubuntu ci and start testing PG18 #2893
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
Conversation
- Add PG 18 to testing - Purge old PostgreSQL install so new one is already 5432 - remove 20.04, that is no longer available - Use apt.postgresql.org -testing repo, so can test PG18
WalkthroughThe Ubuntu GitHub Actions workflow was updated to add PostgreSQL 18 to the test matrix, remove Ubuntu 20.04, and revise the PostgreSQL repository setup and installation steps. The workflow now uses a fixed port for PostgreSQL and sets APT pinning for the PostgreSQL repository. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Ubuntu Runner
participant PostgreSQL Repo
GitHub Actions->>Ubuntu Runner: Start workflow with matrix (PostgreSQL versions, Ubuntu 22.04)
Ubuntu Runner->>Ubuntu Runner: Set APT pinning for PostgreSQL repo
Ubuntu Runner->>Ubuntu Runner: Purge existing PostgreSQL packages
Ubuntu Runner->>PostgreSQL Repo: Add pgdg-testing repo for matrix version
Ubuntu Runner->>PostgreSQL Repo: Add repository key via gpg --dearmor
Ubuntu Runner->>Ubuntu Runner: Install specific PostgreSQL version
Ubuntu Runner->>Ubuntu Runner: Set PGPORT=5432
Ubuntu Runner->>Ubuntu Runner: Start PostgreSQL, prepare databases/roles
Ubuntu Runner->>Ubuntu Runner: Run tests
Possibly related PRs
Suggested labels
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ubuntu.yml
(2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ubuntu.yml
[error] 32-32: too few spaces after comma
(commas)
[error] 32-32: too few spaces after comma
(commas)
[error] 32-32: too few spaces after comma
(commas)
[error] 32-32: too few spaces after comma
(commas)
[error] 32-32: too few spaces after comma
(commas)
[error] 48-48: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
.github/workflows/ubuntu.yml (2)
34-34
: Approve matrix update for OS versions.
Removing Ubuntu 20.04 and running onubuntu-latest
(currently 24.04) andubuntu-22.04
is appropriate now that 20.04 runners are deprecated.
84-84
: Explicitly pin PGPORT to 5432 for consistency.
LockingPGPORT=5432
simplifies the startup logic and aligns with the default port after purging older clusters.
@coderabbitai Create an issue with the comments |
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@cvvergara I've created a GitHub issue that contains the key comments and information from PR #2893. The issue is titled "Comments from PR #2893: Fix ubuntu ci and start testing PG18" and includes a summary of the changes made in the PR, such as adding PostgreSQL 18 to the test matrix, removing Ubuntu 20.04 support, updating the repository setup, and implementing fixed port usage for PostgreSQL in the CI workflow. I've assigned the issue to you for further tracking. 🏁 Script executed:
Length of output: 1397 @cvvergara The issue has been successfully created! You can view it at: #2894 The issue includes all the comments from PR #2893 about the CI updates for Ubuntu and PostgreSQL 18 testing, as well as the original PR summary. It has been assigned to you as requested. |
psql codelinted Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
.github/workflows/ubuntu.yml (2)
39-46
: Make pin file creation idempotent.
Using>>
to append the pin configuration will accumulate duplicate entries across workflow runs. Switch to>
so the file is overwritten each time, ensuring a clean, single pin block.
51-53
: Ensure non-interactive purge and valid APT source entry.
- Add
-y
tosudo apt-get purge postgresql-*
to prevent hanging prompts.- Remove
${{ matrix.psql }}
from thedeb
line; version labels don’t belong in the component list.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ubuntu.yml
(2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ubuntu.yml
[error] 48-48: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
.github/workflows/ubuntu.yml (2)
32-32
: YAML sequence formatting improved for readability.
The spaces after commas in thepsql
matrix enhance readability and satisfy linting rules.
34-34
: Remove unsupported Ubuntu 20.04 from the matrix.
Verify that droppingubuntu-20.04
aligns with your support policy and update any related documentation or downstream scripts accordingly.
@@ -81,6 +81,7 @@ jobs: | |||
run: | | |||
sudo service postgresql start | |||
export PG_RUNNER_USER=`whoami` | |||
export PGPORT=5432 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Explicit PostgreSQL port binding.
Setting PGPORT=5432
makes connections predictable. For consistency, consider adding -p ${PGPORT}
to all psql
invocations so every command targets the same port explicitly.
🤖 Prompt for AI Agents
In .github/workflows/ubuntu.yml at line 84, the environment variable PGPORT is
set to 5432, but psql commands do not explicitly specify the port. To ensure all
psql commands connect to the intended port consistently, update every psql
invocation in the workflow to include the option -p ${PGPORT}, explicitly
binding them to port 5432.
Summary by CodeRabbit