Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Oct 30, 2024

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Oct 30, 2024
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Oct 30, 2024

Gen AI suggestions to solve the build error:

Based on the error message, it appears the pgvector extension isn't being installed in the correct PostgreSQL extension directory. The error specifically shows:

ERROR:  extension "vector" is not available
DETAIL:  Could not open extension control file "/usr/share/postgresql17/extension/vector.control"

The issue is that the extension files are being installed to PostgreSQL 16's directories (/usr/share/postgresql16/), but the test is trying to use PostgreSQL 17.

To fix this, you should:

  1. Update the package dependencies to explicitly require PostgreSQL 16:
dependencies:
  runtime:
    - postgresql-16
  1. Update the test pipeline to use PostgreSQL 16 specifically:
pipeline:
  - name: "Initialize PostgreSQL database"
    runs: |
      cd /home/build
      useradd wolfi
      sudo -u wolfi /usr/lib/postgresql16/bin/pg_ctl initdb -D /tmp/pgdata

  - name: "Start PostgreSQL server" 
    runs: |
      cd /home/build
      sudo -u wolfi /usr/lib/postgresql16/bin/pg_ctl start -D /tmp/pgdata -l /tmp/pglog
      sleep 5

  - name: "Create pgvector extension"
    runs: |
      cd /home/build
      /usr/lib/postgresql16/bin/psql -c 'CREATE EXTENSION vector;' postgres
  1. Make sure the installation paths in the build section point to PostgreSQL 16 directories.

This should resolve the version mismatch and allow the extension to be found and loaded properly during testing.

@github-actions
Copy link
Contributor

Package pgvector-16: Click to expand/collapse

Package pgvector-16:

.PKGINFO metadata:

  (
  	"""
  	# Generated by melange
  	pkgname = pgvector-16
- 	pkgver = 0.7.4-r0
+ 	pkgver = 0.8.0-r0
  	arch = x86_64
- 	size = 354099
+ 	size = 366944
  	origin = pgvector-16
  	pkgdesc = Open-source vector similarity search for PostgreSQL
  	url = 
- 	commit = 5673bc3b112a17249259ad7ebdc68d54f0f5f442
- 	builddate = 1722892846
+ 	commit = 458ad6df6144c5724b2d6a236cb8b6f468a80d7a
+ 	builddate = 1730345736
  	license = PostgreSQL
  	depend = so:libc.so.6
- 	datahash = b0fa00c1e76258448b0163eadd329baab12d8f23f96934769a93c42c366530db
+ 	datahash = d712c771a1d39d32efd687653b61e6a9047c581022bb1ae7bbbc367386057bba
  	"""
  )

Added: /usr/share/postgresql16/extension/vector--0.7.4--0.8.0.sql
Added: /usr/share/postgresql16/extension/vector--0.8.0.sql
Modified: /usr/lib/postgresql16/vector.so
Modified: /usr/share/postgresql16/extension/vector.control
Deleted: /usr/share/postgresql16/extension/vector--0.7.4.sql

@octo-sts octo-sts bot added bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed labels Oct 31, 2024
@powersj powersj self-assigned this Oct 31, 2024
Copy link
Member

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@powersj powersj merged commit f87656a into main Oct 31, 2024
@powersj powersj deleted the wolfictl-992431d4-e6aa-4214-bc44-79107cd23585 branch October 31, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants