Install palace-manager editable in the container (PP-4076)#3245
Merged
jonathangreen merged 1 commit intomainfrom Apr 15, 2026
Merged
Install palace-manager editable in the container (PP-4076)#3245jonathangreen merged 1 commit intomainfrom
jonathangreen merged 1 commit intomainfrom
Conversation
The Poetry to uv migration in #3221 switched the container install from editable (Poetry's default) to non-editable (uv sync --no-editable). That change broke palace.manager.scripts.startup's discovery of the startup_tasks/ directory — the script resolves STARTUP_TASKS_DIR via Path(__file__).parents[4], which assumes startup.py is at ${root}/src/palace/manager/scripts/startup.py (editable install). Under --no-editable, startup.py lives inside site-packages and parents[4] resolves to env/lib/python3.12/ instead of the project root, so startup_tasks/ is never found. Drop --no-editable to restore the working layout.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3245 +/- ##
=======================================
Coverage 93.30% 93.31%
=======================================
Files 498 498
Lines 46147 46147
Branches 6318 6318
=======================================
+ Hits 43059 43060 +1
Misses 2003 2003
+ Partials 1085 1084 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Drop
--no-editablefrom the finaluv syncindocker/Dockerfilesopalace-manageris installed editably in the container — same behavior we had under Poetry.Motivation and Context
Found while checking the uv changes that rolled out to Minotaur last night. The Poetry → uv migration in #3221 switched the in-container install from editable (Poetry's default) to non-editable (
uv sync --no-editable). That change quietly brokepalace.manager.scripts.startup's discovery of thestartup_tasks/directory:The script resolves
STARTUP_TASKS_DIRviaPath(__file__).parents[4], which assumesstartup.pyis at${root}/src/palace/manager/scripts/startup.py(editable install). Under--no-editable,startup.pylives insidesite-packagesandparents[4]resolves toenv/lib/python3.12/instead of the project root, sostartup_tasks/is never found.Restoring the editable install fixes the immediate breakage and matches the previous behavior. It also has the minor side benefit of making in-container debugging easier — you can edit files in place without rebuilding the image.
Future work
Eventually we'd like to build
palace-manageras a proper non-editable package that can be published the same waypalace-utilandpalace-opdswill be. Several path-resolution issues need to be sorted out first (alembic migrations, startup scripts, and similar file-layout assumptions) before that's feasible. For now, editable install is the simpler and safer choice.How Has This Been Tested?
startup.pynow resolvesSTARTUP_TASKS_DIRto/var/www/circulation/startup_tasks.2026_02_17_force_re_harvest_all_opds_for_distributors.py) is picked up.Checklist