Optimize deployment. - #3116
Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the deployment process by consolidating build artifact handling within the container image build job. Instead of downloading pre-built packages from a remote repository, the job now builds Debian packages directly from artifacts stored in S3.
Changes:
- Removed dependency on
repo-buildjob for the container image build process - Added AWS credentials configuration and S3 artifact download steps
- Integrated Debian package building directly into the container image build workflow
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mkdir -p "${DEB_PATH}/pg-deeplake-${PG_VERSION}/DEBIAN/" | ||
| mkdir -p "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/lib/postgresql/${PG_VERSION}/lib/" | ||
| mkdir -p "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/share/postgresql/${PG_VERSION}/extension/" | ||
| install -m 644 "${ARTIFACT_DIR}"/pg_deeplake_"${PG_VERSION}".so "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/lib/postgresql/${PG_VERSION}/lib/pg_deeplake" |
There was a problem hiding this comment.
The source file includes a .so extension but the destination omits it. This creates pg_deeplake without the .so extension, which may cause PostgreSQL to fail loading the extension library. The destination should be pg_deeplake.so to match the expected library naming convention.
| install -m 644 "${ARTIFACT_DIR}"/pg_deeplake_"${PG_VERSION}".so "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/lib/postgresql/${PG_VERSION}/lib/pg_deeplake" | |
| install -m 644 "${ARTIFACT_DIR}"/pg_deeplake_"${PG_VERSION}".so "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/lib/postgresql/${PG_VERSION}/lib/pg_deeplake.so" |
| mkdir -p "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/lib/postgresql/${PG_VERSION}/lib/" | ||
| mkdir -p "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/share/postgresql/${PG_VERSION}/extension/" | ||
| install -m 644 "${ARTIFACT_DIR}"/pg_deeplake_"${PG_VERSION}".so "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/lib/postgresql/${PG_VERSION}/lib/pg_deeplake" | ||
| install -m 644 "${ARTIFACT_DIR}"/pg_deeplake*.sql "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/share/postgresql/${PG_VERSION}/extension/" |
There was a problem hiding this comment.
Using a wildcard pattern with install may fail if multiple SQL files match the pattern, as install expects a single source file when the destination is a directory. Consider using a loop or copying files individually to ensure all SQL files are properly installed.
| install -m 644 "${ARTIFACT_DIR}"/pg_deeplake*.sql "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/share/postgresql/${PG_VERSION}/extension/" | |
| for sql_file in "${ARTIFACT_DIR}"/pg_deeplake*.sql; do | |
| [ -e "${sql_file}" ] || continue | |
| install -m 644 "${sql_file}" "${DEB_PATH}/pg-deeplake-${PG_VERSION}/usr/share/postgresql/${PG_VERSION}/extension/" | |
| done |
|


🚀 🚀 Pull Request
Impact
Description
Things to be aware of
Things to worry about
Additional Context