Visitar URL original
feat: Add integration tests for dbt import with local dbt project by Copilot · Pull Request #5877 · feast-dev/feast · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix test failures by removing pre-committed manifest and letting dbt …
…generate it

Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
  • Loading branch information
Copilot and franciscojavierarceo committed Jan 22, 2026
commit 586f82551fb945e09f94c1c0f6ad91cefd7bd67b
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore dbt artifacts
*.pyc
__pycache__/
36 changes: 19 additions & 17 deletions sdk/python/tests/integration/dbt/test_dbt_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ This directory contains a minimal dbt project used for testing the Feast dbt int
test_dbt_project/
├── dbt_project.yml # dbt project configuration
├── profiles.yml # dbt connection profiles (using DuckDB for testing)
├── seeds/ # CSV seed data for models
│ ├── driver_hourly_stats.csv
│ ├── customer_stats.csv
│ └── product_stats.csv
├── models/ # dbt SQL models
│ ├── driver_features.sql
│ ├── customer_features.sql
│ ├── product_features.sql
│ └── schema.yml # Model and column metadata
└── target/
└── manifest.json # Pre-generated dbt manifest
└── target/ # dbt build output (generated, not committed)
└── manifest.json # Generated by dbt build
```

## Models
Expand All @@ -41,12 +45,12 @@ The test project includes 3 models with different configurations:

## Pre-generated Manifest

The `target/manifest.json` file is **pre-generated** and committed to the repository. This allows tests to run without requiring:
- dbt CLI installation
- Database connections
- dbt compilation step
The `target/manifest.json` file is **generated by dbt during CI runs**. The manifest is created when `dbt build` is executed in the GitHub Actions workflow. This allows the integration tests to:
- Test actual dbt compilation and build process
- Validate the generated manifest structure
- Ensure compatibility between dbt output and Feast import

This approach keeps the tests fast and portable.
The target directory is tracked in git with a `.gitkeep` file, but the manifest.json itself is excluded via `.gitignore` since it's generated during test execution.

## Testing Different Data Sources

Expand All @@ -64,15 +68,13 @@ sdk/python/tests/integration/dbt/test_dbt_integration.py

Run them with:
```bash
pytest sdk/python/tests/integration/dbt/test_dbt_integration.py -v
```

## Updating the Manifest
# First, generate the manifest by running dbt
cd sdk/python/tests/integration/dbt/test_dbt_project
dbt build

If you need to update the manifest (e.g., to add new models or change metadata):

1. Make changes to the model SQL files or schema.yml
2. Manually edit `target/manifest.json` to reflect the changes
3. Ensure the manifest is valid JSON and follows dbt manifest schema v9
# Then run the tests
cd ../../..
pytest tests/integration/dbt/test_dbt_integration.py -v
```

**Note**: We don't actually compile with dbt CLI to keep tests simple and fast.
In CI, the manifest is automatically generated by the GitHub Actions workflow before running tests.
170 changes: 0 additions & 170 deletions sdk/python/tests/integration/dbt/test_dbt_project/target/manifest.json

This file was deleted.

Loading