Skip to content
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

Don't install pgx as root or under / #421

Merged
merged 2 commits into from
May 17, 2022
Merged

Don't install pgx as root or under / #421

merged 2 commits into from
May 17, 2022

Conversation

rtwalker
Copy link
Contributor

In #408, almost all of the CI tests are failing with permission denied errors, e.g. here, when trying to compile crates after running cargo test.
This PR changes the CI Docker image to:

  • run all cargo commands as the "postgres" user (instead of "root")
  • move the pgx installations from /pgx/0.X to /home/postgres/pgx/0.X

We were getting some permission denied errors on cargo install
commands that I think are related to having pgx installed in / (and
running the cargo install pgx commands as the root user instead of
user "postgres").

Our solution is to put all of the `cargo ...` statements after
`USER postgres` and moving the pgx installations from `/pgx/0.X` to
`/home/postgres/pgx/0.X`
@@ -34,28 +31,31 @@ RUN set -ex \
&& cd timescaledb \
&& git checkout 2.5.x \
&& cd ~/timescaledb \
&& ./bootstrap -DPG_CONFIG=~/.pgx/12.10/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \
&& ./bootstrap -DPG_CONFIG=~/.pgx/12.11/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \
Copy link
Contributor

Choose a reason for hiding this comment

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

oof

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was wondering how long it'd be until something broke after the minor versions were all bumped :)

@rtwalker
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented May 17, 2022

Build succeeded:

@bors bors bot merged commit 6f6598b into main May 17, 2022
@bors bors bot deleted the rw/fix-ci-image branch May 17, 2022 14:06
bors bot added a commit that referenced this pull request May 23, 2022
427: Fix failing update-tester in CI r=rtwalker a=rtwalker

In #421 we moved the pgx installations but neglected to also make the change in our ci.yml file.

Co-authored-by: Ryan Walker <rwalker@timescale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants