From 6b5b83ecd06fc82f49d6b2584121c2e92ac1d048 Mon Sep 17 00:00:00 2001 From: antznette1 Date: Wed, 17 Dec 2025 04:48:03 +0100 Subject: [PATCH 1/2] fix: parameterize Postgres registry path in init template Signed-off-by: antznette1 --- .../postgres/feature_repo/feature_store.yaml | 2 +- .../tests/unit/local_feast_tests/test_init.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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..af8aaa26611 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,16 @@ 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") + assert "path: postgresql://DB_USERNAME:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME" in contents From 42fd2f1d1f9a7d6c4ae397fa383901d20d5610ff Mon Sep 17 00:00:00 2001 From: antznette1 Date: Wed, 17 Dec 2025 04:58:41 +0100 Subject: [PATCH 2/2] style: format init template regression test Signed-off-by: antznette1 --- sdk/python/tests/unit/local_feast_tests/test_init.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 af8aaa26611..1f3c0993845 100644 --- a/sdk/python/tests/unit/local_feast_tests/test_init.py +++ b/sdk/python/tests/unit/local_feast_tests/test_init.py @@ -79,4 +79,5 @@ def test_postgres_template_registry_path_is_parameterized() -> None: / "feature_store.yaml" ) contents = template_fs_yaml.read_text(encoding="utf-8") - assert "path: postgresql://DB_USERNAME:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME" in contents + expected = "path: postgresql://DB_USERNAME:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME" + assert expected in contents