fix: patch-package install in docker build and better postgres patch #17523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
patch-package
is not running on the docker build currently. This is due to the check on our post-install script to prevent it from running if a global install is triggered. It turns out that the build is failing onnpm link
instead of the global install as we previously thought.This PR promotes patch-package to a normal dependency instead of a dev-dependency so it is able to patch packages when only regular (non-dev) dependencies are installed. In addition, we must also copy the patches folder for the build step to use.
This also adds a check for if query is an object but
query.origin
does not exist (described here: porsager/postgres#944 (comment)).Fixes report from discord: https://discord.com/channels/979116623879368755/1359070399916146729/1359701229504303377)
How Has This Been Tested?
I have tested and confirmed that the relevant files are properly patched at the end of the docker build. Still need an action to be run here to confirm the whole pipeline works.
Checklist:
src/services/
uses repositories implementations for database calls, filesystem operations, etc.src/repositories/
is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/
)