Skip to content

Conversation

@YassinNouh21
Copy link
Collaborator

Summary

  • Add comprehensive integration tests for dbt import functionality
  • Fix bugs in test assertions (entity.join_key, object count, entity comparison)
  • Add test coverage for error handling, type mapping edge cases, and code generation validation

Test Coverage

  • 37 tests covering:
    • Manifest parsing and filtering
    • All data source types (BigQuery, Snowflake, File)
    • Type mapping including Array, Bool, parameterized types
    • Error handling (missing manifest, invalid JSON)
    • Code generation with ast.parse() validation

Test plan

  • All 37 tests pass locally
  • Tests are isolated with pytest.ini to avoid loading heavy dependencies

Copilot AI and others added 8 commits January 16, 2026 20:15
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
…generate it

Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
@YassinNouh21 YassinNouh21 requested a review from a team as a code owner January 24, 2026 11:46
Bug fixes:
- Fix entity.join_keys -> entity.join_key (singular string attribute)
- Fix object count assertion (12 -> 9)
- Fix entity comparison to use .name (feature_view.entities returns strings)

New test coverage:
- Error handling: manifest not found, invalid JSON
- Type mapping edge cases: Bool, Array, unknown types, parameterized types
- Snowflake NUMBER with precision/scale handling
- created_timestamp_column parameter
- Custom timestamp field override
- Generated code validation with ast.parse()

Add pytest.ini for test isolation from parent conftest.py

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
- Remove 'dbt test' from workflow (dbt build already runs tests)
- Remove unused pytest import from conftest.py
- Tables are in-memory and disappear after dbt build completes

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
@YassinNouh21 YassinNouh21 force-pushed the copilot/add-integration-tests-for-dbt-import branch from 4423c32 to 37224b0 Compare January 24, 2026 11:53
YassinNouh21 and others added 7 commits January 24, 2026 14:06
The -c flag expects a directory path, not a config file name.
Since we're already in the feast_repo directory, feast will
automatically find the feature_store.yaml file.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Update tests to be flexible with actual dbt output instead of hardcoded values:
- Don't assert specific dbt_version - just verify it's present
- Use model.database and model.schema dynamically (varies by adapter)
- Verify full_table_name is built correctly from components
- Fix unused parameter warning in test_create_entity

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Tags in dbt must be placed inside a config block to appear
in the generated manifest.json. Without this, the tags were
not being included when dbt build runs in CI.

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
- Remove trailing whitespace from blank lines
- Add noqa: E402 comments for imports after pytest.importorskip

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Add pytest collection hook to automatically skip dbt tests when
the manifest.json file hasn't been generated yet. This prevents
failures in the unit-test-python workflow which doesn't run dbt build.

The dbt-integration-test workflow generates the manifest before
running tests, so tests will still execute there.

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
dbt deps
dbt build

- name: Setup Feast project for dbt import test

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Can you instead put most of the logic into the Makefile so that we can easily run make dbt-integration-test and swap that here?


filterwarnings =
error::_pytest.warning_types.PytestConfigWarning
error::_pytest.warning_types.PytestUnhandledCoroutineWarning

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this?

1. Move dbt integration test logic into Makefile
   - Add test-python-integration-dbt target to consolidate test steps
   - Makes it easy to run `make test-python-integration-dbt` locally
   - Simplifies GitHub Actions workflow

2. Restore pytest warning filter
   - Re-add error::_pytest.warning_types.PytestUnhandledCoroutineWarning
   - This was accidentally removed and should be kept

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Copy link
Collaborator Author

@YassinNouh21 YassinNouh21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed review comments in the latest commit:

Comment 1 (Makefile): Created test-python-integration-dbt target that consolidates all the dbt test logic. Now you can run make test-python-integration-dbt locally!

Comment 2 (pytest.ini): The error::_pytest.warning_types.PytestUnhandledCoroutineWarning line was accidentally removed. It's been restored.

@franciscojavierarceo
Copy link
Member

@YassinNouh21 can you post a screen shot of the feast UI and the dbt UI lineage graphs to see how they render?

Also looks like you may have this hooked up to mcp to handle this, which is pretty cool

@franciscojavierarceo
Copy link
Member

@YassinNouh21 you can spin up the UI locally with feast ui after you compile the dbt models. you should also be able to render the dbt ui locally.

@YassinNouh21
Copy link
Collaborator Author

image image

@franciscojavierarceo
Copy link
Member

hmm the protobuf issue sounds like a real concern, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants