Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Code review on PR #20424 (head ea73398): approve. Delta since ede6e36, read only: the SLM migration parser decodes user and password, with a test. Compose is the only raw URL writer left, recorded on #19812; it stays |
Auto-sync: merging
|
| side | commit | subject | issue refs |
|---|---|---|---|
| main | f83312d05 |
chore(guards): re-pin the reach floors the pre-push gate reported stale (#20264) | #20264 |
| this branch | 2d9fef863 |
chore(guards): re-pin the reach floors main's growth left stale (#19812) | #19812 |
repo_tests/direct_secrets_service_callers_17773_test.py
| side | commit | subject | issue refs |
|---|---|---|---|
| main | f83312d05 |
chore(guards): re-pin the reach floors the pre-push gate reported stale (#20264) | #20264 |
| this branch | 2d9fef863 |
chore(guards): re-pin the reach floors main's growth left stale (#19812) | #19812 |
|
Closed: 0 changed files; the content is on main via the merge train (PR #20458). |
Thinking Path
autobot-admin.pyget_db_urlput the password straight into the connection URL, so one containing@,:,/or%broke it, and the CLI connected to the wrong host or failed to parse.user_management/config.py_build_urlhad the same defect, so this fixes the class once rather than each copy.What Changed
autobot_shared/postgres_dsn.pybuild_postgres_dsnpercent-encodes user and password. No existing helper did this.autobot-admin.py, bothuser_management/config.pycopies andautobot_shared/db_url.pycall it.postgresqlrole's env file and task use onedb_url_credentialsdefault;provision-backend-db-single-box.ymlencodes in place.urlencodeleaves/raw (checked on the local Ansible), so both addreplace('/', '%2F').pre_migration_backup.yml: the shell cannot encode, so the discrete-vars branch passes credentials asPGUSER/PGPASSWORDinstead of in the URL.api/code_sync.py:pg_dumpgot the password fromurlparsewithout decoding, which an encoded URL would have broken. It now decodes the password and user.migrations/utils.pyparse_db_url: the SLM migration runner passed the URL's credentials topsycopg2undecoded, the same failure on update. It decodes both now.nl_database_service.pyreads external URLs from the secrets manager, not these, so it is not affected by this change; its own bug is bug(nl-db): the MySQL path passes the URL's password still percent-encoded #20428.Not fixed:
docker-compose.yml:596-600builds three URLs by interpolation, and compose cannot encode.docker/generate-secrets.shgenerates hex by default, so only a hand-set password breaks. So this PR saysRefs.Verification
postgres_dsn_19812_test.py,db_url_test.py,postgres_url_credentials_encoded_19812_test.pyandtest_code_sync_deploy_bugs.pywere run locally; CI reads the rest. The@:/%password test throughget_db_urlis intest_admin_db_credentials_19407.py. SQLAlchemy'smake_urlandrender_as_stringround-trip the password (test). No connection to a real Postgres was made.Worth reviewing:
autobot-admin.pyimports it fromautobot_shared, whichslm_managersyncs under the install root. A pinned standalone copy without the updated package hits the existing import-error message, which names where it looked.slm-secrets.envhas no%in its password or URL lines;db-credentials.envand the backend env are not readable by this session, so they were not checked.Model Used
Claude Opus 5.5
Refs #19812
🤖 Generated with Claude Code