Visitar URL original
fix: Use UTC end bound and correct docs for disable_event_timestamp by patelchaitany · Pull Request #6956 · feast-dev/feast · GitHub
Skip to content

fix: Use UTC end bound and correct docs for disable_event_timestamp - #6956

Open
patelchaitany wants to merge 2 commits into
feast-dev:masterfrom
patelchaitany:fix/disable-event-timestamp-docs-and-utc
Open

patelchaitany wants to merge 2 commits into
feast-dev:masterfrom
patelchaitany:fix/disable-event-timestamp-docs-and-utc

Conversation

@patelchaitany

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

disable_event_timestamp (CLI --disable-event-timestamp, FeatureStore.materialize, feature server /materialize) was documented as materializing all data "using current datetime as event timestamp". No materialization engine reads the flag, so rows always keep their source event timestamps (see #6936).

This PR:

  1. Docs: Corrects the docstrings (feature_store.py, infra/provider.py), the CLI help, README.md, the README template, and the pages under docs/. The flag now only promises full-window materialization (1970-01-01 → now), and the docs say rows keep their source event timestamps. It also drops the "useful when source data lacks event timestamps" wording, because the offline pull still requires timestamp_field.
  2. Timezone fix: The CLI and the feature server computed the end bound with naive datetime.now(). make_tzaware() then treats that value as UTC, so on hosts west of UTC the window ended hours early and the newest rows were silently skipped. Both now use datetime(1970, 1, 1, tzinfo=timezone.utc) → _utc_now().

Implementing "overwrite with current time" is intentionally out of scope. It would need changes in every engine, it could hide stale data behind a fresh timestamp, and it still would not help sources that have no timestamp column.

Which issue(s) this PR fixes:

Fixes #6936

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
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Added test_parse_materialize_timestamps_disable_event_timestamp_uses_utc, which checks that both bounds are tz-aware UTC and that the end bound matches the real UTC now. I ran it together with the existing materialize CLI/server tests under TZ=America/Los_Angeles: 4 passed.

🤖 Generated with Claude Code

@patelchaitany
patelchaitany requested a review from a team as a code owner October 6, 2026 07:48
@codecov-commenter

codecov-commenter commented Oct 6, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.49%. Comparing base (69412f3) to head (df9c47d).

Files with missing lines Patch % Lines
sdk/python/feast/cli/cli.py 33.33% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6956   +/-   ##
=======================================
  Coverage   49.49%   49.49%           
=======================================
  Files         443      443           
  Lines       55450    55448    -2     
  Branches     8085     8085           
=======================================
+ Hits        27443    27445    +2     
+ Misses      26109    26106    -3     
+ Partials     1898     1897    -1     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 50.89% <60.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/feature_server.py 64.44% <100.00%> (+0.35%) ⬆️
sdk/python/feast/feature_store.py 46.46% <ø> (ø)
sdk/python/feast/infra/provider.py 92.30% <ø> (ø)
sdk/python/feast/cli/cli.py 56.17% <33.33%> (+0.20%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69412f3...df9c47d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@haoxu0 haoxu0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@haoxu0

haoxu0 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

can we explicitly say it is utc now?

@patelchaitany
patelchaitany force-pushed the fix/disable-event-timestamp-docs-and-utc branch from 39a5451 to cbae98f Compare October 7, 2026 05:30
@patelchaitany

Copy link
Copy Markdown
Contributor Author

can we explicitly say it is utc now?

Done, the docstrings and CLI help now say "from 1970-01-01 up to the current UTC time"

@patelchaitany
patelchaitany force-pushed the fix/disable-event-timestamp-docs-and-utc branch from cbae98f to 60a9ab4 Compare October 7, 2026 06:50
@ntkathole
ntkathole force-pushed the fix/disable-event-timestamp-docs-and-utc branch from 60a9ab4 to dcff28c Compare October 7, 2026 11:20
@patelchaitany
patelchaitany force-pushed the fix/disable-event-timestamp-docs-and-utc branch from dcff28c to d1a4c2f Compare October 7, 2026 12:34
disable_event_timestamp was documented as stamping rows with the
current datetime, but no materialization engine reads the flag; rows
keep their source event timestamps. Update docstrings, CLI help and
docs so the flag only promises full-window materialization.

Also compute the full-window bounds in UTC. The CLI and feature server
used naive datetime.now(), which make_tzaware() treats as UTC, so hosts
west of UTC skipped the newest rows.

Fixes feast-dev#6936

Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
@patelchaitany
patelchaitany force-pushed the fix/disable-event-timestamp-docs-and-utc branch from d1a4c2f to df9c47d Compare October 8, 2026 07:23

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disable_event_timestamp is plumbed into MaterializationTask but no materialization engine reads it

3 participants