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

fix: remove formatDatetime #10011

Merged
merged 2 commits into from
Oct 4, 2024
Merged

fix: remove formatDatetime #10011

merged 2 commits into from
Oct 4, 2024

Conversation

keita-determined
Copy link
Contributor

@keita-determined keita-determined commented Oct 2, 2024

Ticket

CM-550

Description

Remove formatDatetime because it would cause inconsistent date/datetime format in the future, and no need to manually manipulate dateString.

Test Plan

  • Check if all date strings are formatted the same as before
    • Model header
    • Model version header
    • Timestamp in log viewer
    • Checkpoint modal

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Oct 2, 2024
Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 95a4bac
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66fdc6d670b51b00082cd62c
😎 Deploy Preview https://deploy-preview-10011--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@keita-determined keita-determined marked this pull request as ready for review October 2, 2024 22:19
@keita-determined keita-determined requested a review from a team as a code owner October 2, 2024 22:19
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 50.53%. Comparing base (987b2a5) to head (95a4bac).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
webui/react/src/pages/ModelDetails/ModelHeader.tsx 0.00% 1 Missing and 1 partial ⚠️
...c/pages/ModelVersionDetails/ModelVersionHeader.tsx 0.00% 1 Missing and 1 partial ⚠️
webui/react/src/components/TrialLogPreview.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10011      +/-   ##
==========================================
- Coverage   54.57%   50.53%   -4.05%     
==========================================
  Files        1259      949     -310     
  Lines      157233   128576   -28657     
  Branches     3620     3616       -4     
==========================================
- Hits        85807    64971   -20836     
+ Misses      71293    63472    -7821     
  Partials      133      133              
Flag Coverage Δ
harness ?
web 54.32% <54.54%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
webui/react/src/components/CheckpointModal.tsx 80.61% <100.00%> (+0.34%) ⬆️
webui/react/src/utils/datetime.ts 68.81% <ø> (-7.22%) ⬇️
webui/react/src/components/TrialLogPreview.tsx 71.32% <0.00%> (-0.21%) ⬇️
webui/react/src/pages/ModelDetails/ModelHeader.tsx 0.00% <0.00%> (ø)
...c/pages/ModelVersionDetails/ModelVersionHeader.tsx 0.00% <0.00%> (ø)

... and 310 files with indirect coverage changes

Copy link
Contributor

@EmilyBonar EmilyBonar left a comment

Choose a reason for hiding this comment

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

LGTM, though I'm not 100% clear on the reasoning behind the removal.

@keita-determined
Copy link
Contributor Author

LGTM, though I'm not 100% clear on the reasoning behind the removal.

  1. To avoid the manual calculation. For example, we can do the same thing without having stripTimezone and formatDatetime with dayjs, so these are unnecessary wrappers. using dayjs is more reliable. Especially, datetime handling is complicated. it's safer to use dayjs instead.
  2. so far, outputUTC are not used, but it might cause timezone inconsistency in the web app. and even if we wanna do this, we can directly use dayjs without these functions.

@keita-determined keita-determined merged commit f609a2d into main Oct 4, 2024
87 of 99 checks passed
@keita-determined keita-determined deleted the fix/remove-formatDatetime branch October 4, 2024 17:36
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.

2 participants