Skip to content

release: pg_idkit v0.3.0#90

Merged
t3hmrman merged 17 commits into
mainfrom
prep-release-v0.3.0
May 23, 2025
Merged

release: pg_idkit v0.3.0#90
t3hmrman merged 17 commits into
mainfrom
prep-release-v0.3.0

Conversation

@t3hmrman
Copy link
Copy Markdown
Member

@t3hmrman t3hmrman commented Apr 1, 2025

This is a release prep branch for pg_idkit release v0.3.0.

Upon merging, this branch will cause a tag to be placed on the commit in main. After the tag has been placed, a build will run that generates artifacts and publishes a release.

Before this release is ready, here is the checklist:

  • Update README.md to use the newest version of Postgres, if it has changed (ex. 16.2 -> 17.0)
  • Update README.md to soon-to-be-released pg_idkit (ex. pg_idkit-0.2.0 -> pg_idkit-0.2.1)
  • Update generate-rpm configuration in Cargo.toml version references (ex. --0.2.0.sql -> --0.2.1.sql)
  • Update default version in `justfile

See CHANGELOG for changes made to this release before it goes out.

@t3hmrman t3hmrman added the release-pr Related Pull Requests label Apr 1, 2025
@t3hmrman t3hmrman self-assigned this Apr 1, 2025
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 6 times, most recently from aefd577 to c21c032 Compare April 2, 2025 05:23
@t3hmrman
Copy link
Copy Markdown
Member Author

t3hmrman commented Apr 2, 2025

The good news is that docker images work file as normal.

Unfortunately, the archive releases (zipped pg_idkit) build but do not work. The compressed archives for the extensions do not seem to load, with different issues on musl vs in gnu libc powered containers.

On Musl

Errors are popping up related to relocation issues and missing symbols:

/ # ldd /usr/local/lib/postgresql/pg_idkit.so
        /lib/ld-musl-aarch64.so.1 (0xe705980d9000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xe70597fe4000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-aarch64.so.1 (0xe705980d9000)
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 7
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 7
... lots more
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
Error relocating /usr/local/lib/postgresql/pg_idkit.so: PostmasterContext: symbol not found
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
Error relocating /usr/local/lib/postgresql/pg_idkit.so: errstart: symbol not found
Error relocating /usr/local/lib/postgresql/pg_idkit.so: ErrorContext: symbol not found
Error relocating /usr/local/lib/postgresql/pg_idkit.so: unsupported relocation type 6
... lots more
Error relocating /usr/local/lib/postgresql/pg_idkit.so: FlushErrorState: symbol not found
Error relocating /usr/local/lib/postgresql/pg_idkit.so: make_timestamptz_at_timezone: symbol not found
Error relocating /usr/local/lib/postgresql/pg_idkit.so: GetDatabaseEncoding: symbol not found
Error relocating /usr/local/lib/postgresql/pg_idkit.so: TopTransactionContext: symbol not found

The musl variant should be a static lib to begin with...

On Glibc

Using the postgres:17-bullseye container, there are a couple issues:

  • Expected directories for the packaged zip file are obviously quite different from musl (.control files in /usr/share/postgresql/17/extension/pg_idkit.control, shared lib should be under /usr/lib/postgresql/17/lib, zip needs to be unzipped to /usr, etc)
  • shared object file not loading (when in the right place) -- ERROR: could not load library "/usr/lib/postgresql/17/lib/pg_idkit.so": /usr/lib/postgresql/17/lib/pg_idkit.so: cannot open shared object file: No such file or directory

The glibc variant looks to be a static lib:

root@3a34f40a5d34:/# file /usr/lib/postgresql/17/lib/pg_idkit.so
/usr/lib/postgresql/17/lib/pg_idkit.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=06d82a885e2d86d2361bee4c400cf01a1dd75632, not stripped
root@3a34f40a5d34:/# ldd /usr/lib/postgresql/17/lib/pg_idkit.so
        not a dynamic executable

Path forward

It looks like the build may need to be reproduced & debugged locally from the builder images:

  • ghcr.io/vadosware/pg_idkit/builder-musl:0.1.x
  • ghcr.io/vadosware/pg_idkit/builder-gnu:0.1.x

While things build (and test!) fine, the artifacts are not pulling in enough shared libs (?) or failing for some other reason.

  • Fix use issues for zipped release on musl-backed distros
  • Fix use issues for zipped release on gnu-backed distros
  • Add documentation for running from a released archive
  • Update CI to test archive artifacts
  • Update CI to test container artifacts

We may need to introduce something like xtask to make these tests a bit easier to write/execute -- manipulating CI YAML is slow and error-prone.

@t3hmrman t3hmrman added the blocked Currently blocked by another issue label Apr 2, 2025
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch from c21c032 to da80aec Compare May 21, 2025 06:51
@t3hmrman
Copy link
Copy Markdown
Member Author

t3hmrman commented May 21, 2025

Well, this was silly, it turns out that the released artifacts were working just fine -- it was an architecture problem -- we don't have aarch64 builds (yet), and I was trying to run the artifacts on my mac without rosetta/other x86 emulation turned on 😮‍💨

The CI is fine, but I'll add some checks on the artifacts in-band.

@t3hmrman t3hmrman enabled auto-merge (squash) May 21, 2025 06:52
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 2 times, most recently from dbb1d67 to 6b1775c Compare May 21, 2025 07:11
Signed-off-by: vados <vados@vadosware.io>
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch from 6b1775c to fd503e7 Compare May 21, 2025 07:12
Signed-off-by: vados <vados@vadosware.io>
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 4 times, most recently from f6eb43f to b778153 Compare May 21, 2025 07:16
Signed-off-by: vados <vados@vadosware.io>
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 3 times, most recently from fb6b303 to 7cd614c Compare May 21, 2025 07:26
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 8 times, most recently from b59480f to 284ed2c Compare May 22, 2025 12:02
t3hmrman added 2 commits May 22, 2025 21:02
This comimt removes the use of sccache as it was causing build
failures across linux distributions w/ glibc vs musl.
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 6 times, most recently from 47c3327 to 8b9da64 Compare May 22, 2025 13:48
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 2 times, most recently from 642e6bf to f838f88 Compare May 22, 2025 16:39
Signed-off-by: vados <vados@vadosware.io>
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch 3 times, most recently from c514b5a to 469131c Compare May 22, 2025 17:50
t3hmrman and others added 2 commits May 23, 2025 03:09
Signed-off-by: vados <vados@vadosware.io>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@t3hmrman t3hmrman force-pushed the prep-release-v0.3.0 branch from 469131c to 2bc93d5 Compare May 22, 2025 18:10
@t3hmrman t3hmrman disabled auto-merge May 23, 2025 02:54
@t3hmrman t3hmrman merged commit 0c0cb06 into main May 23, 2025
19 checks passed
@t3hmrman t3hmrman deleted the prep-release-v0.3.0 branch May 23, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Currently blocked by another issue release-pr Related Pull Requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant