feat: Add versioning support for DynamoDB online store by rpathade · Pull Request #6191 · feast-dev/feast
What this PR does / why we need it
Closes #6163
Feature view versioning was introduced in #6101, but version-qualified feature references (e.g.
driver_stats@v2:trips_today) only worked with the SQLite online store. All other online stores raised
VersionedOnlineReadNotSupported when a versioned ref was used.
This PR adds versioned read/write support to the DynamoDB online store, following the same pattern as the
SQLite reference implementation:
- Write path: when enable_online_feature_view_versioning is enabled, _get_table_name appends a _v{N} suffix
to the DynamoDB table name (e.g. project.driver_stats_v2), routing materialization to the correct versioned
table - Read path: version-qualified lookups (@v2) set projection.version_tag on the feature view before
online_read is called; _get_table_name picks this up and routes to the correct table. projection.version_tag
takes priority over current_version_number so explicit version requests are always honoured - Gate: _check_versioned_read_support in online_store.py now allows DynamoDBOnlineStore through, covering
both sync and async read paths
All existing read/write/update/teardown methods are covered by the single change to _get_table_name since
every method routes through it.
Which issue(s) this PR fixes
Part of #2728
Checks
- I've made sure the tests are passing.
- My commits are signed off (git commit -s)
- My PR title follows conventional commits format
Testing Strategy
- Unit tests — 6 new unit tests for _get_table_name covering: versioning disabled, projection.version_tag
priority, current_version_number fallback, version 0 edge case, no version info, custom template - Manual tests — end-to-end smoke test using moto (mocked DynamoDB) exercising write → read round trips
across v1/v2 isolation, fallback behaviour, and missing entity handling
Misc
The version suffix is composed before the table_name_template is applied, so custom table_name_template
values (e.g. "{project}__{table_name}") continue to work correctly with versioning enabled.