haydenflinner opened a new pull request, #44896:
URL: https://github.com/apache/superset/pull/44896

   This is a hack that would have made more sense before #44100, submitting 
just in case it's useful.
   --
   
   ### SUMMARY
   The chart's default metadata DB driver is postgresql+psycopg2, but released 
plain-tag images (<=6.1.0, all -lean tags) ship no database drivers, so every 
pod fails with ModuleNotFoundError: psycopg2 out of the box (apache/superset 
discussion #31431).
   
   The default bootstrapScript now installs psycopg2-binary via uv (with a pip 
fallback for pre-uv images) when the resolved metadata DB URI/driver is 
PostgreSQL and psycopg2 is not already importable. On images that bundle the 
driver the check is a no-op needing no network; when install fails or lands off 
sys.path the script exits with a clear error instead of surfacing the 
ModuleNotFoundError deep in app init.
   
   
   
   ### TESTING INSTRUCTIONS
      helm unittest helm/superset
      New cases in `tests/initscript_test.yaml` assert the psycopg2 guard 
renders for
      the default driver, postgres `database.uri`/`database.driver` values, and 
is
      omitted entirely for non-PostgreSQL metadata DBs. Manually verifiable with
      `helm template` — `superset_bootstrap.sh` in the config secret contains 
the
      install block by default and drops it with e.g. `--set 
database.driver=mysql+mysqldb`.
   
   ### ADDITIONAL INFORMATION
      - [x] Has associated issue: discussion #31431
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to