dosubot[bot] commented on issue #38491:
URL: https://github.com/apache/superset/issues/38491#issuecomment-4017289903

   <!-- Greeting -->
   Hi @bschreder! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   Thanks for reporting this! Your analysis of the issues is correct. Looking 
at the history:
   
   1. **EXAMPLES_HOST issue**: The `docker-compose-light.yml` names the 
database service `db-light`, but the `EXAMPLES_HOST` environment variable 
defaults to `db`. This causes the hostname resolution error you're seeing. The 
fix is to set `EXAMPLES_HOST=db-light`.
   
   2. **Examples user creation**: The 
[examples-init.sh](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-entrypoint-initdb.d/examples-init.sh#L26-L34)
 script creates the user, and as you noted, the psql command needs the proper 
database context.
   
   Interestingly, [PR #37645](https://github.com/apache/superset/pull/37645) 
previously identified these exact issues with `docker-compose-light.yml`, but 
that PR was closed without being merged. The original design in [PR 
#34324](https://github.com/apache/superset/pull/34324) intended to use DuckDB 
for examples instead of PostgreSQL, which would have avoided the user creation 
issue entirely.
   
   If you have a fix ready, a PR addressing both the `EXAMPLES_HOST` 
configuration and the examples user creation would be welcome!
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/438865b1-d112-4878-91e3-19b04e0bda2b?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Thanks%20for%20reporting%20this%21%20Your%20analysis%20of%20the%20issues%20is%20correct.%20Looking%20at%20the%20history%3A%0A%0A1.%20%2A%2AEXAMPLES_HOST%20issue%2A%2A%3A%20The%20%60docker-compose-light.yml%60%20names%20the%20database%20service%20%60db-light%60%2C%20but%20the%20%60EXAMPLES_HOST%60%20environment%20variable%20defaults%20to%20%60db%60.%20This%20causes%20the%20hostname%20resolution%20error%20you%27re%20seeing.%20The%20fix%20is%20to%20set%20%60EXAMPLES_HOST%3Ddb-light%60.%0A%0A2.%20%2A%2AExamples%20user%20creation%2A%2A%3A%20The%20%5Bexamples-init.sh%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-entrypoint-initdb.d/examples-init.sh%23L26-L34%29%20script%20creates%20the%20user%2C%20a
 
nd%20as%20you%20noted%2C%20the%20psql%20command%20needs%20the%20proper%20database%20context.%0A%0AInterestingly%2C%20%5BPR%20%2337645%5D%28https%3A//github.com/apache/superset/pull/37645%29%20previously%20identified%20these%20exact%20issues%20with%20%60docker-compose-light.yml%60%2C%20but%20that%20PR%20was%20closed%20without%20being%20merged.%20The%20original%20design%20in%20%5BPR%20%2334324%5D%28https%3A//github.com/apache/superset/pull/34324%29%20intended%20to%20use%20DuckDB%20for%20examples%20instead%20of%20PostgreSQL%2C%20which%20would%20have%20avoided%20the%20user%20creation%20issue%20entirely.%0A%0AIf%20you%20have%20a%20fix%20ready%2C%20a%20PR%20addressing%20both%20the%20%60EXAMPLES_HOST%60%20configuration%20and%20the%20examples%20user%20creation%20would%20be%20welcome%21)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on X](https://img.shields.io/badge/X-share-black)](https://
 
twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38491)


-- 
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