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: ensure historic usage charts assume the correct timezone (DET-10407) #9650

Merged
merged 5 commits into from
Jul 15, 2024

Conversation

corban-beaird
Copy link
Contributor

@corban-beaird corban-beaird commented Jul 12, 2024

Ticket

DET-10407

Description

An escalation was reported that the data being presented in the historic usage charts was excluding expected start & end dates of the provided range. This adjusts the terminology in the frontend & query parameters to be reflective of this inclusion.

Additionally, this PR adjust the Date.parse() call for the X axis on the Historic Usage Charts to ensure that the comparison between times is done based on the local timezone, so that when the information is rendered in the Line Chart all communicated information is visible.

Test Plan

  • Navigate to the Cluster tab
  • Ensure that the selected dates are included in the charts:
    • Examples:
      • Monthly, From: '2024-01', To: '2024-02', should include data points for '2024-01-01' & '2024-02-01'
      • Daily, From: '2024-01-01', To" '2024-02-01', should start with a point from 2024-01-01 12:00am and end with 2024-02-01 12:00am

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

@corban-beaird corban-beaird requested a review from a team as a code owner July 12, 2024 18:40
@cla-bot cla-bot bot added the cla-signed label Jul 12, 2024
@determined-ci determined-ci requested a review from a team July 12, 2024 18:40
@determined-ci determined-ci added the documentation Improvements or additions to documentation label Jul 12, 2024
Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 4b05253
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6691931ef748c8000750a68c
😎 Deploy Preview https://deploy-preview-9650--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.

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 98 lines in your changes missing coverage. Please review.

Project coverage is 52.99%. Comparing base (13aa327) to head (4b05253).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9650      +/-   ##
==========================================
- Coverage   57.01%   52.99%   -4.02%     
==========================================
  Files         761     1255     +494     
  Lines      103084   152888   +49804     
  Branches     3233     3234       +1     
==========================================
+ Hits        58771    81027   +22256     
- Misses      44162    71710   +27548     
  Partials      151      151              
Flag Coverage Δ
backend 44.19% <ø> (+10.04%) ⬆️
harness 72.77% <ø> (ø)
web 51.37% <0.00%> (-0.01%) ⬇️

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

Files Coverage Δ
.../src/pages/Cluster/ClusterHistoricalUsageChart.tsx 0.00% <0.00%> (ø)
...c/pages/Cluster/ClusterHistoricalUsage.settings.ts 0.00% <0.00%> (ø)
...luster/ClusterHistoricalUsageCsvModalComponent.tsx 0.00% <0.00%> (ø)
...react/src/pages/Cluster/ClusterHistoricalUsage.tsx 0.00% <0.00%> (ø)
...rc/pages/Cluster/ClusterHistoricalUsageFilters.tsx 0.00% <0.00%> (ø)

... and 494 files with indirect coverage changes

Copy link
Contributor

@keita-determined keita-determined left a comment

Choose a reason for hiding this comment

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

added few comments, otherwise lgtm

                 @@@@@@                       @@@@@@                  
                @@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@                  
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                 
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                 
                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                  
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                
               @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@               
              @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@               
             @@@@@@@@@@@%#***#%%@@@@@@%#****#@@@@@@@@@@@              
             @@@@@@@@*:::::::::::::::::::::::::-@@@@@@@@              
             @@@@@@@-:::.  .::::::::::::::.  .:::*@@@@@@              
              @@@@@=:::.:***.::::::::::::.+**-.:::%@@@@@              
              @@@@@-:::.=***-.::::::::::.:****.:::#@@@@               
  @@@@@@ @@@@@@@@@@+:::.:***:.:::::::::::.+**=.:::%@@@@ @@@@  @@@@@   
     @@@@@@@@   @@@@::::.. ..:::::+=::::::.  .::::@@@@   @@@@@@@@     
@@               @@@@-::::::::::::::::::::::::::-@@@@               @@
                   @@@@#::::::::::+=::::::::::=@@@@                   
            @@+       @@@@@@@@%#*******#%@@@@@@@                      
             @@%%@          @@@@@@@@@@@@@@                            
            :: @@*%        @@@@@@@@@@@@@@@@                           
                @@#@@@   @@@@@@@@@@@@@@@@@@                           
                 @@@@@@@@@@@@@@@@@@@@@@@@@@@                          
                   @@@@@@@@@@@@@@@@@@@@ @@@@                          
                          @@@@@@@@@@@@@ @@@@                          
                          @@@@@@@@@@@@@ @@@@                          
                          @@@@@@@@%@@@@ @@@@                          
                     :::::%@@%-@@@++@@@-@@@#:::::                     
                 :::::::*@@@#-+@@@--@@@+-%@@@+:::::::                 
                ::::::::----:*@@+::::+@@*:----:::::::::               
               :::::::::::-------::::-------:::::::::::               
                :::::::::::---:---::---:----::::::::::                
                  :::::::::---:--------:---:::::::::                  
                       ::::---:--------:----::::                      

Copy link
Contributor

@keita-determined keita-determined left a comment

Choose a reason for hiding this comment

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

....................................................:+#####+-.......................................
...................................................=#%*=-=*#%+......................................
...................................................*%%. ...=%#=.....................................
...................................................+%%. ....+%#-....................................
...................................................+%%:  ....#%+:...................................
...................................................+%%:  ....=%#-...................................
..................................................:*%%.  ....:#%=...................................
.................................................:+%%:  .....-%%=...................................
.................................................+%#:  ......+%*:...................................
...............................................:*%#:. .......#%+:...................................
..............................................:#%*:  .......:%%=....................................
.............................................-#%*:   .......+%#******+**+**+**+=-...................
............................................+#%+.    .......******************#%%#-.................
....................:-+++++++++++++++++++=-#%#-                       .........:#%*:................
............. .....=%%%%%%%%%%%%%%%%%%%%%%%%+..                        .........+%*-................
...................+%#++++++++++++++++*#%#-.                         ..........=%%+.................
...................*%#++++++++++++++++*#+...                       .........:+#%%+..................
...................+%#++++++++++++++++*#+...                         .........-#%#..................
...................+%#++++++++++++++++*#+...                         ..........#%*..................
...................*%#++++++++++++++++*#+...                        .........-*%#:..................
...................+%#++++++++++++++++*#+...                       ........:*%%%-...................
...................*%#++++++++++++++++*#+...                        .........-#%*...................
...................+%#++++++++++++++++*#+...                        .........=#%=...................
...................*%#++++++++++++++++*#+...                      .........:=#%+....................
...................*%#++++++++++++++++*#+...                     .........:+#%#:....................
...................+%#++++++++++++++++*#+...                       .........+%%-....................
...................*%#++++++++++++++++*#*=:.                       ........:*%#:....................
...................+%#++++++++++++++++*#%%%%*-:.................:::::::::=*%%#-.....................
...................*%#*+++++++++++++++*%%+-*##%%%%%%%%%%%%%%%%%%%%%%%%%%%##*=:......................
...................:#%%%%%%%%%%%%%%%%%%%*:..........................................................

@corban-beaird corban-beaird merged commit 0494cdf into main Jul 15, 2024
82 of 95 checks passed
@corban-beaird corban-beaird deleted the corban/historic-usage-graphs-inclusion-fix branch July 15, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants