Repository navigation
fix(deploy): rewrite -r ../requirements.txt to code_source so root runtime deps install on deploy (#11135) - #11237
Merged
Merged
Conversation
…ot runtime deps install on deploy (was stripped) (#11135)
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
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.
Thinking Path
#11135 —
autobot-backend/requirements.txt:60is-r ../requirements.txt(repo-root, ~23 runtime deps: paramiko, asyncssh, pypdf, python-docx/pptx, openpyxl, protobuf…). On deploy the sibling../requirements.txtdoesn't exist next to the syncedautobot-backend/, and the backend role'spost_sync_cmdstripped^-rlines — so those deps were silently dropped. Same class as #11117, which correctly rewrote-c ../constraints/to the resolvablecode_sourcepath but only stripped-r.What Changed
In
services/role_registry.pythe backendpost_sync_cmdnow:-r(grep filters only the editableautobot_shared), and-r ../requirements.txt→-r {BASE}/code_source/requirements.txtvia the samesedthat already rewrites-c ../constraints/(both siblings live incode_source, the full-repo clone).Root
requirements.txthas no nested-c/-r/-eincludes, so it resolves cleanly.Verification
grep | sedpipeline on the realrequirements.txt:-c ../constraints/shared.txt→code_source/constraints/…,-r ../requirements.txt→/opt/autobot/code_source/requirements.txt,-e autobot_sharedstripped (0 residual). ✅tests/services/test_role_registry.py→ 17 passed (new regression test asserts the backend post_sync rewrites-rand no longer strips it, and preserves the-crewrite).black+flake8clean.Review note
Model Used
Opus 4.8
Closes #11135