Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-codspeed-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- uses: CodSpeedHQ/action@v3
with:
run: CACHE_URI=redis://redis DATABASE_URI=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB uv run pytest test/unit_tests --codspeed
run: CACHE_URI=redis://redis DATABASE_URI=postgresql+psycopg://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB uv run pytest test/unit_tests --codspeed
token: ${{ secrets.CODSPEED_TOKEN }}
env:
POSTGRES_DB: orchestrator-core-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-pytest-celery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
REDIS_PORT: 6379
run: |
CACHE_URI=redis://redis:6379 \
DATABASE_URI=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB \
DATABASE_URI=postgresql+psycopg://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB \
CELERY_BROKER_URL=$CELERY_BROKER_URL \
CELERY_RESULT_BACKEND=$CELERY_RESULT_BACKEND \
uv run pytest test/integration_test/test_with_pytest_celery.py -v
2 changes: 1 addition & 1 deletion .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: uv sync --all-extras --dev

- name: Run tests
run: CACHE_URI=redis://redis DATABASE_URI=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB uv run pytest --cov-branch --cov=orchestrator --cov-report=xml --ignore=test --ignore=orchestrator/devtools --ignore=examples --ignore=docs
run: CACHE_URI=redis://redis DATABASE_URI=postgresql+psycopg://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB uv run pytest --cov-branch --cov=orchestrator --cov-report=xml --ignore=test --ignore=orchestrator/devtools --ignore=examples --ignore=docs
env:
POSTGRES_DB: orchestrator-core-test
POSTGRES_USER: nwa
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ createdb orchestrator-core -O nwa # set password to 'nwa'
Configure the database URI in your local environment:

```
export DATABASE_URI=postgresql://nwa:nwa@localhost:5432/orchestrator-core
export DATABASE_URI=postgresql+psycopg://nwa:nwa@localhost:5432/orchestrator-core
```

### Step 3 - Create main.py
Expand Down Expand Up @@ -88,7 +88,7 @@ createdb orchestrator-core-test -O nwa # set password to 'nwa'
# on your local machine
git clone https://github.com/workfloworchestrator/orchestrator-core
cd orchestrator-core
export DATABASE_URI=postgresql://nwa:nwa@localhost:5432/orchestrator-core-test
export DATABASE_URI=postgresql+psycopg://nwa:nwa@localhost:5432/orchestrator-core-test
uv sync --all-extras --all-groups
uv run pytest
```
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Set the password to something simple, like `nwa`.

Ensure the application can reach the database:
```
export DATABASE_URI=postgresql://nwa:nwa@localhost:5432/orchestrator-core-test
export DATABASE_URI=postgresql+psycopg://nwa:nwa@localhost:5432/orchestrator-core-test
```

``` shell
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/agentic.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Initialize the migration environment and database tables.
<div class="termy">

```shell
export DATABASE_URI=postgresql://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core
export DATABASE_URI=postgresql+psycopg://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core

python main.py db init
python main.py db upgrade heads
Expand All @@ -97,7 +97,7 @@ python main.py db upgrade heads
<div class="termy">

```shell
export DATABASE_URI=postgresql://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core
export DATABASE_URI=postgresql+psycopg://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core
export OAUTH2_ACTIVE=False

uvicorn --reload --host 127.0.0.1 --port 8080 main:app
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Initialize the migration environment and database tables.
<div class="termy">

```shell
export DATABASE_URI=postgresql://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core
export DATABASE_URI=postgresql+psycopg://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core

python main.py db init
python main.py db upgrade heads
Expand All @@ -86,7 +86,7 @@ python main.py db upgrade heads
<div class="termy">

```shell
export DATABASE_URI=postgresql://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core
export DATABASE_URI=postgresql+psycopg://nwa:PASSWORD_FROM_STEP_2@localhost:5432/orchestrator-core
export OAUTH2_ACTIVE=False

uvicorn --reload --host 127.0.0.1 --port 8080 main:app
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/cli/generator/generator/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

def create_migration_file(message: str, head: str) -> Path | None:
if not environ.get("DATABASE_URI"):
environ.update({"DATABASE_URI": "postgresql://nwa:nwa@localhost/orchestrator-core"})
environ.update({"DATABASE_URI": "postgresql+psycopg://nwa:nwa@localhost/orchestrator-core"})
if not environ.get("PYTHONPATH"):
environ.update({"PYTHONPATH": "."})
logger.info(
Expand Down
2 changes: 2 additions & 0 deletions orchestrator/log_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def logger_config(name: str, default_level: str = "INFO") -> tuple[str, dict]:
logger_config("httpcore"),
logger_config("orchestrator.graphql.autoregistration"),
logger_config("sqlalchemy.engine", default_level="WARNING"),
logger_config("sqlalchemy.pool", default_level="WARNING"),
logger_config("psycopg.pool", default_level="WARNING"),
logger_config("uvicorn"),
logger_config("LiteLLM", default_level="WARNING"),
]
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AppSettings(BaseSettings):
EXECUTOR: str = ExecutorType.THREADPOOL
WORKFLOWS_SWAGGER_HOST: str = "localhost"
WORKFLOWS_GUI_URI: str = "http://localhost:3000"
DATABASE_URI: PostgresDsn = "postgresql://nwa:nwa@localhost/orchestrator-core" # type: ignore
DATABASE_URI: PostgresDsn = "postgresql+psycopg://nwa:nwa@localhost/orchestrator-core" # type: ignore
MAX_WORKERS: int = 5
MAIL_SERVER: str = "localhost"
MAIL_PORT: int = 25
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies = [
"orjson==3.10.18",
"pgvector>=0.4.1",
"prometheus-client==0.22.1",
"psycopg2-binary==2.9.10",
"psycopg-binary>=3.2.10",
"pydantic-forms>=1.4.0",
"pydantic-settings~=2.9.1",
"pydantic[email]~=2.11.7",
Expand Down
2 changes: 1 addition & 1 deletion test/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def db_uri(worker_id):
Database uri to be used in the test thread

"""
database_uri = os.environ.get("DATABASE_URI", "postgresql://nwa:nwa@localhost/orchestrator-core-test")
database_uri = os.environ.get("DATABASE_URI", "postgresql+psycopg://nwa:nwa@localhost/orchestrator-core-test")
if worker_id == "master":
# pytest is being run without any workers
return database_uri
Expand Down
2 changes: 1 addition & 1 deletion test/unit_tests/services/test_expose_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MySettings(BaseSettings):
db_password: PydanticSecretStr = "test_password" # noqa: S105
debug_mode: bool = True
secret_test: str = "test_secret" # noqa: S105
uri: PostgresDsn = "postgresql://user:password@localhost/dbname"
uri: PostgresDsn = "postgresql+psycopg://user:password@localhost/dbname"
cache_uri: RedisDsn = "rediss://user:password@localhost/dbname"

my_settings = MySettings()
Expand Down
Loading
Loading