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

Introduce a blocklist of "yanked" Postgres versions #1950

Conversation

eeeebbbbrrrr
Copy link
Contributor

Due to the out-of-band release set described here: https://www.postgresql.org/about/news/postgresql-172-166-1510-1415-1318-and-1222-released-2965/, we should refuse to compile on the prior point releases mentioned in this press release.

Due to the out-of-band release set described here:
https://www.postgresql.org/about/news/postgresql-172-166-1510-1415-1318-and-1222-released-2965/,
we should refuse to compile on the prior point releases mentioned in
this press release.
@eeeebbbbrrrr
Copy link
Contributor Author

This is not really an easy thing to test, but the code looks sound. If CI passes I'll go ahead and merge this and then cherry-pick into our v012-develop branch and release a v0.12.9.

@eeeebbbbrrrr
Copy link
Contributor Author

(I hacked the code locally to block v16.4...)

$ cargo pgrx run pg16
       Using CliArgument("pg16") and `pg_config` from /home/zombodb/.pgrx/16.4/pgrx-install/bin/pg_config
    Stopping Postgres v16
    Building extension with features pg16
     Running command "/home/zombodb/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo" "build" "--lib" "--features" "pg16" "--no-default-features" "--message-format=json-render-diagnostics"
   Compiling pgrx-bindgen v0.12.7 (/home/zombodb/_work/pgrx/pgrx-bindgen)
   Compiling pgrx-pg-sys v0.12.7 (/home/zombodb/_work/pgrx/pgrx-pg-sys)
error: failed to run custom build command for `pgrx-pg-sys v0.12.7 (/home/zombodb/_work/pgrx/pgrx-pg-sys)`

Caused by:
  process didn't exit successfully: `/home/zombodb/_work/pgrx/pgrx-examples/arrays/target/debug/build/pgrx-pg-sys-57f83704e3d20657/build-script-bindgen` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE
  cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
  cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH
  cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV
  cargo:rerun-if-env-changed=LLVM_CONFIG_PATH
  cargo:rerun-if-env-changed=LIBCLANG_PATH
  cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
  cargo:rerun-if-changed=include
  cargo:rerun-if-changed=pgrx-cshim.c
  cargo:rerun-if-changed=/home/zombodb/.pgrx/config.toml

  --- stderr
  build_paths=BuildPaths { manifest_dir: "/home/zombodb/_work/pgrx/pgrx-pg-sys", out_dir: "/home/zombodb/_work/pgrx/pgrx-examples/arrays/target/debug/build/pgrx-pg-sys-cda9ffbddfa54db9/out", src_dir: "/home/zombodb/_work/pgrx/pgrx-pg-sys/src/include", shim_src: "/home/zombodb/_work/pgrx/pgrx-pg-sys/pgrx-cshim.c", shim_dst: "/home/zombodb/_work/pgrx/pgrx-examples/arrays/target/debug/build/pgrx-pg-sys-cda9ffbddfa54db9/out/pgrx-cshim.c" }
  thread 'main' panicked at /home/zombodb/_work/pgrx/pgrx-bindgen/src/build.rs:244:13:
  Postgres v16.4 is incompatible with other versions in this major series and is not supported by pgrx.  Please upgrade to the latest version in the v16 series.
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It aint' pretty, but the error is there. None of the errors we generate through bindgen.rs are pretty, so there's that.

@eeeebbbbrrrr
Copy link
Contributor Author

haha. Looks like the GitHub CI runners all use our blocklisted Postgres versions. Awesome. sigh :(

https://github.com/pgcentralfoundation/pgrx/actions/runs/11974135781/job/33384570511?pr=1950#step:8:171
Screenshot 2024-11-22 at 9 15 08 AM

@eeeebbbbrrrr
Copy link
Contributor Author

eeeebbbbrrrr commented Nov 22, 2024

I'm stumped. Dunno why tests.yml works just fine but package-test.yml and runas.yml are picking up PG v14.14, which is now blacklisted.

It's because (at least) v14.14 is what's out on the YUM repos, but what's the difference for tests.yml?

@eeeebbbbrrrr
Copy link
Contributor Author

Okay, made an executive decision to use the official Postgres apt repos for those two tests, which seems like it's going to work.

@eeeebbbbrrrr eeeebbbbrrrr merged commit a0ecc8f into pgcentralfoundation:develop Nov 22, 2024
14 checks passed
eeeebbbbrrrr added a commit that referenced this pull request Nov 22, 2024
Due to the out-of-band release set described here:
https://www.postgresql.org/about/news/postgresql-172-166-1510-1415-1318-and-1222-released-2965/,
we should refuse to compile on the prior point releases mentioned in
this press release.
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.

1 participant