Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make start and end timestamps tz aware in the CLI #1590

Merged
merged 2 commits into from
May 28, 2021

Conversation

achals
Copy link
Member

@achals achals commented May 27, 2021

What this PR does / why we need it:

We log start and time information in the CLI, before converting the timestamps into tz-aware datetime objects. This results in a confusion when running feast materialize-incremental which only takes in an end_ts argument. The end_ts argument is tz-naive, but start_ts is tz-aware, which causes the time range that's logged to the console to be messed up.

This PR changes the behaviour to add tz information at the boundary of the CLI so that log messages in the deeper classes as well as in the CLI are consistent.

$ feast materialize 2021-05-12 2021-05-13
Materializing 1 feature views from 2021-05-11 17:00:00-07:00 to 2021-05-12 17:00:00-07:00 into the sqlite online store.

driver_hourly_stats:
100%|███████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 1371.05it/s]
$ feast materialize-incremental 2021-05-14
Materializing 1 feature views to 2021-05-13 17:00:00-07:00 into the sqlite online store.

driver_hourly_stats from 2021-05-12 17:00:00-07:00 to 2021-05-13 17:00:00-07:00:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Time stamps in messages logged to the console now contain timezone information.

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2021

Codecov Report

Merging #1590 (33b4642) into master (69a1d16) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1590   +/-   ##
=======================================
  Coverage   83.60%   83.60%           
=======================================
  Files          65       65           
  Lines        5757     5758    +1     
=======================================
+ Hits         4813     4814    +1     
  Misses        944      944           
Flag Coverage Δ
integrationtests 83.51% <100.00%> (+0.44%) ⬆️
unittests 77.37% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdk/python/feast/cli.py 46.15% <100.00%> (+0.37%) ⬆️
sdk/python/feast/type_map.py 41.72% <0.00%> (ø)

Continue to review full report at Codecov.

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

Signed-off-by: Achal Shah <[email protected]>
@achals achals force-pushed the tz-aware-from-cli branch from 08e788d to 33b4642 Compare May 27, 2021 23:45
@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@woop
Copy link
Member

woop commented May 28, 2021

/lgtm

@feast-ci-bot feast-ci-bot merged commit e451a11 into feast-dev:master May 28, 2021
@achals achals deleted the tz-aware-from-cli branch May 28, 2021 00:23
woop pushed a commit that referenced this pull request Jun 7, 2021
* Make start and end timestamps tz aware in the CLI

Signed-off-by: Achal Shah <[email protected]>

* make format

Signed-off-by: Achal Shah <[email protected]>
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.

4 participants