Chef Automate provides a full suite of enterprise capabilities for maintaining continuous visibility into application, infrastructure, and security automation.
The client run status for the previous day seems to be missing if the run happened within 24 hours from now. As we can see it reports check in for only today while there was a client run yesterday and another one today. So we would expect 2 icons in the time series. Based on the UI, a user would expect that "Today" is 00:00Hrs to now.
Even in the infrastructure dashboard it clearly shows the client runs are from different days.
To Reproduce
Steps to reproduce the behavior:
Chef client run on X date.
Chef client run on the next day after X but within 24 hour period of the client run on X date.
Expected behavior
A user would expect the status data to be separated based on local time.
Versions (please complete the following information):
OS: [e.g. rhel6] any
Browser [e.g. chrome, safari] any
Automate Build Number: 20220223121207
Additional context
I took the liberty to look into it further and it seems like the request to node_runs_daily_status_time_series is returning something like this. Which tells us that the most recent status was 24hours back from now rather than 00:00Hrs to now for today.
On a side note, the infrastructure tab shows the client run timings in UTC - it should be localised. As a user I would probably be interested in seeing times in my local time zone.
Thanks @cmailank for reporting this.
Describe the bug
The client run status for the previous day seems to be missing if the run happened within 24 hours from now. As we can see it reports check in for only today while there was a client run yesterday and another one today. So we would expect 2 icons in the time series. Based on the UI, a user would expect that "Today" is 00:00Hrs to now.
Even in the infrastructure dashboard it clearly shows the client runs are from different days.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A user would expect the status data to be separated based on local time.
Versions (please complete the following information):
Additional context
I took the liberty to look into it further and it seems like the request to
node_runs_daily_status_time_series
is returning something like this. Which tells us that the most recent status was 24hours back from now rather than 00:00Hrs to now for today.Which is also confirmed by the function at https://github.com/chef/automate/blob/f4b4aa2db39887dfa66d5666200453e8e9323e40/components/config-mgmt-service/grpcserver/cfg_mgmt.go#L157 which uses the utility function https://github.com/chef/automate/blob/f4b4aa2db39887dfa66d5666200453e8e9323e40/components/config-mgmt-service/grpcserver/cfg_mgmt.go#L565-L573 that is written in such a way that it calculates X*24 hours ago from when the request was made to the server with UTC time.