Repository navigation
Fix test harness incompatibilities with rootless Docker (colima) - #1350
Closed
Pranav-error wants to merge 1 commit into
Closed
Pranav-error wants to merge 1 commit into
Pranav-error wants to merge 1 commit into
Conversation
…er (colima)
Two independent fixes needed to get test/check.sh working under
colima, a free Docker Desktop alternative:
1. check.sh and all three postgresql{14,15,17} Makefiles detected
whether to prefix docker commands with sudo purely by checking
`id -u`. Under a rootless Docker context the socket is already
reachable without sudo, and forcing sudo anyway just blocks
forever on an interactive password prompt in a non-interactive
invocation. Now also check whether `docker info` already succeeds
before falling back to sudo.
2. The postgresql17 Dockerfile's `--nogpgcheck` on installing the
pgdg-redhat-repo RPM only skips verification for that one package;
it does not import the key into any trust store dnf consults for
later operations. Every subsequent dnf call against the
pgdg-common/pgdg-rhel10 repos then fails GPG verification, in three
layers as each is patched (repo_gpgcheck on `dnf -y upgrade`, then
again on any later install, then package-level gpgcheck once
repo_gpgcheck is disabled -- the actual PostgreSQL 17 RPMs are
signed with a key that doesn't match what's in the vendored
PGDG-RPM-GPG-KEY-RHEL file). Disables both checks for this repo via
the dropped-in .repo file rather than solving the stale-key problem,
since the key itself needs attention from someone who can verify
what's current upstream.
Verified by getting test/check.sh -t test_cli_verify to build and run
successfully under colima on macOS/arm64 for the first time -- this
was blocking any Docker-based testing of PR pgmoneta#1316 before these fixes.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Collaborator
Author
|
The `build-linux (clang, Debug, 14)` failure here is a hang, not a test failure or anything caused by this change: `test_pgmoneta_restore_full` passes at 10:57:38, then there's no further test output at all until GitHub's own job-level 45-minute timeout kills it at 11:28:11 (`The action 'Run Tests' has timed out after 45 minutes`). This PR's diff can't be the cause -- in `ci` mode, `check.sh` calls `start_postgresql` (native PostgreSQL, no Docker), never `start_postgresql_container`, which is the only function this PR touches. The sudo-detection change and the Makefile/Dockerfile changes are both Docker-only code paths that CI's `ci` mode never executes. |
Member
|
Rebased and merged. Thanks for your contribution ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1347.
Two independent fixes needed to get `test/check.sh` running under
colima, a common free alternative to Docker Desktop:
sudo detection: `check.sh` and the three
`postgresql{14,15,17}/Makefile`s decide whether to prefix `docker`
with `sudo` purely from `id -u`. Under a rootless Docker context
the socket is already reachable without sudo, and forcing it anyway
just hangs on an interactive password prompt. Now also falls back
to no-sudo when `docker info` already succeeds.
GPG trust for the PGDG repo: the Dockerfile's `--nogpgcheck` on
installing `pgdg-redhat-repo` only skips verification for that one
package -- it doesn't import the key anywhere `dnf` later consults.
Every subsequent `dnf` call against that repo then fails GPG
verification, in layers: repo-metadata `repo_gpgcheck` first, then
again after disabling that, then package-level `gpgcheck` once
`repo_gpgcheck` is off (the actual PostgreSQL 17 packages are
signed with a key that doesn't match the vendored
`PGDG-RPM-GPG-KEY-RHEL` file). This disables both checks for the
repo rather than trying to fix the underlying stale/mismatched key,
which I'm not in a position to resolve myself -- flagged in the
issue in case there's a preferred way to handle it (updated key
file, different mirror, etc).
Verified by getting `test/check.sh -t test_cli_verify` to build and
run successfully end-to-end under colima on macOS/arm64 for the first
time (that test itself now passes, after #1348 and #1349).