You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run make local-up the backend errors out due to a pydantic validation error.
backend-1 | RAY_DASHBOARD_PORT
backend-1 | Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='${RAY_DASHBOARD_PORT:-8265}', input_type=str]
Reproduction
git checkout main && git pull
docker system prune -af # maybe you don't need this, I'm a scorched earth kinda guy
rm .env # to force a new env to be made from the .env.example file
make local-up
Relevant log output
backend-1 | File "/mzai/lumigator/python/mzai/backend/backend/main.py", line 11, in<module>
backend-1 | from backend.api.router import api_router
backend-1 | File "/mzai/lumigator/python/mzai/backend/backend/api/router.py", line 3, in<module>
backend-1 | from backend.api.routes import (
backend-1 | File "/mzai/lumigator/python/mzai/backend/backend/api/routes/completions.py", line 4, in<module>
backend-1 | from backend.api.deps import MistralCompletionServiceDep, OpenAICompletionServiceDep
backend-1 | File "/mzai/lumigator/python/mzai/backend/backend/api/deps.py", line 11, in<module>
backend-1 | from backend.db import session_manager
backend-1 | File "/mzai/lumigator/python/mzai/backend/backend/db.py", line 8, in<module>
backend-1 | from backend.settings import settings
backend-1 | File "/mzai/lumigator/python/mzai/backend/backend/settings.py", line 173, in<module>
backend-1 | settings = BackendSettings()
backend-1 | ^^^^^^^^^^^^^^^^^
backend-1 | File "/mzai/lumigator/python/mzai/backend/.venv/lib/python3.11/site-packages/pydantic_settings/main.py", line 84, in __init__
backend-1 |super().__init__(
backend-1 | File "/mzai/lumigator/python/mzai/backend/.venv/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__
backend-1 | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
backend-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1 | pydantic_core._pydantic_core.ValidationError: 1 validation error for BackendSettings
backend-1 | RAY_DASHBOARD_PORT
backend-1 | Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='${RAY_DASHBOARD_PORT:-8265}', input_type=str]
backend-1 | For further information visit https://errors.pydantic.dev/2.9/v/int_parsing
localstack-1 | 2025-01-13T13:49:40.941 INFO --- [ asgi_gw_0] localstack.request.aws : AWS s3.CreateBucket => 200
After investigation: #595 removed the sourcing of the .env file, which means that the bash terminal running the docker compose commands has not loaded the contents of the .env (unless the user had manually sourced the .env before running).
Tested by having this in my .env file:
BRAKE=2
S3_BUCKET=${S3_BUCKET:-lumigator-storage}
then run make local-up
then run docker exec -it lumigator-backend-1 bash in a separate terminal.
I included the .env directly in the Makefile, without noticing that some vars had bash-specific syntax afaict :-/
Some of the keys were included, but others were interpreted in very strange ways and kept present but empty, which messed up with e.g. AWS credentials.
Description
When I run
make local-up
the backend errors out due to a pydantic validation error.Reproduction
Relevant log output
Expected behavior
I would expect it to not have a validation error.
System Info
Macos 15.2
commit 7917bd4
Have you searched for similar issues before submitting this one?
The text was updated successfully, but these errors were encountered: