diff --git a/sdk/python/feast/templates/postgres/feature_repo/feature_store.yaml b/sdk/python/feast/templates/postgres/feature_repo/feature_store.yaml index 0663ff0ad97..a2fc2f51b61 100644 --- a/sdk/python/feast/templates/postgres/feature_repo/feature_store.yaml +++ b/sdk/python/feast/templates/postgres/feature_repo/feature_store.yaml @@ -2,7 +2,7 @@ project: my_project provider: local registry: registry_type: sql - path: postgresql://postgres:mysecretpassword@127.0.0.1:55001/feast + path: postgresql://DB_USERNAME:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME cache_ttl_seconds: 60 sqlalchemy_config_kwargs: echo: false diff --git a/sdk/python/tests/unit/local_feast_tests/test_init.py b/sdk/python/tests/unit/local_feast_tests/test_init.py index 4543a239796..1f3c0993845 100644 --- a/sdk/python/tests/unit/local_feast_tests/test_init.py +++ b/sdk/python/tests/unit/local_feast_tests/test_init.py @@ -67,3 +67,17 @@ def test_repo_init_with_underscore_in_project_name() -> None: ) result = runner.run(["apply"], cwd=repo_dir) assert result.returncode != 0 + + +def test_postgres_template_registry_path_is_parameterized() -> None: + template_fs_yaml = ( + Path(__file__).resolve().parents[3] + / "feast" + / "templates" + / "postgres" + / "feature_repo" + / "feature_store.yaml" + ) + contents = template_fs_yaml.read_text(encoding="utf-8") + expected = "path: postgresql://DB_USERNAME:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME" + assert expected in contents