Skip to content

Commit

Permalink
CI(build-tools): don't install Postgres 14 (#6540)
Browse files Browse the repository at this point in the history
## Problem

We install Postgres 14 in `build-tools` image, but we don't need
it. We use Postgres binaries, which we build ourselves.

## Summary of changes
- Remove Postgresql 14 installation from `build-tools` image
  • Loading branch information
bayandin committed Jun 26, 2024
1 parent d7e349d commit 5af9660
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
7 changes: 0 additions & 7 deletions Dockerfile.build-tools
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ RUN curl -fsSL 'https://apt.llvm.org/llvm-snapshot.gpg.key' | apt-key add - \
&& bash -c 'for f in /usr/bin/clang*-${LLVM_VERSION} /usr/bin/llvm*-${LLVM_VERSION}; do ln -s "${f}" "${f%-${LLVM_VERSION}}"; done' \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# PostgreSQL 14
RUN curl -fsSL 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' | apt-key add - \
&& echo 'deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& apt update \
&& apt install -y postgresql-client-14 \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" \
&& unzip -q awscliv2.zip \
Expand Down
11 changes: 9 additions & 2 deletions test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3075,9 +3075,16 @@ def __init__(
host: str = "127.0.0.1",
port: int = 5432,
):
assert shutil.which(path)
search_path = None
if (d := os.getenv("POSTGRES_DISTRIB_DIR")) is not None and (
v := os.getenv("DEFAULT_PG_VERSION")
) is not None:
search_path = Path(d) / f"v{v}" / "bin"

self.path = path
full_path = shutil.which(path, path=search_path)
assert full_path is not None

self.path = full_path
self.database_url = f"postgres://{host}:{port}/main?options=project%3Dgeneric-project-name"

async def run(self, query: Optional[str] = None) -> asyncio.subprocess.Process:
Expand Down

1 comment on commit 5af9660

@github-actions
Copy link

Choose a reason for hiding this comment

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

2998 tests run: 2872 passed, 0 failed, 126 skipped (full report)


Flaky tests (1)

Postgres 14

  • test_timeline_size_quota_on_startup: release

Code coverage* (full report)

  • functions: 32.8% (6898 of 21018 functions)
  • lines: 50.3% (53926 of 107202 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
5af9660 at 2024-06-26T17:16:07.264Z :recycle:

Please sign in to comment.