cncf / devstats.archive

📈CNCF-created tool for analyzing and graphing developer contributions
https://devstats.cncf.io/
Apache License 2.0
445 stars 147 forks source link

[bug] - Developer Activity Counts by Companies gets wrong time #375

Closed shalevr closed 1 year ago

shalevr commented 1 year ago

When I use the Developer Activity Counts by Companies for all contributions for the last day and I get the wrong time.

I edit this query%5Cn)%20sub%22,%22refId%22:%22A%22,%22resultFormat%22:%22table%22,%22select%22:%5B%5B%7B%22params%22:%5B%22value%22%5D,%22type%22:%22field%22%7D,%7B%22params%22:%5B%5D,%22type%22:%22mean%22%7D%5D%5D,%22tags%22:%5B%5D,%22timeColumn%22:%22time%22,%22where%22:%5B%7B%22name%22:%22$__timeFilter%22,%22params%22:%5B%5D,%22type%22:%22macro%22%7D%5D,%22datasource%22:%7B%22type%22:%22postgres%22,%22uid%22:%22P172949F98CB31475%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-5y%22,%22to%22:%22now%22%7D%7D&orgId=1) so I will get the time also and I see dates from 2012 instead of the date today.

image

It seems that all the values are actually from the last day and just the time that mentions there is wrong

lukaszgryglicki commented 1 year ago

Hi, will take a look on this next week, I'm on KubeCon, thanks for reporting.

lukaszgryglicki commented 1 year ago

I checked this, time value here is for internal usage, and note that the table is not displaying this - this time is for internal ordering and it always differs by 1 hour. I could close this now, but I will just refresh this dashboard manually to ensure that you are getting 100% up-to-date data.

shalevr commented 1 year ago

Thank you for the check! Do you know maybe how I can convert this time to time that I can work with? or do you know the time format?

lukaszgryglicki commented 1 year ago

This dashboard is not displaying time, it counts contributions per contributor so there is no single time. You cannot get time from this recalculated table, actually, you are just trying to use the snapshot table used to display data on the dashboard for your purposes, but there is nothing you can do with this table - it is "display only" snapshot table so Grafana get display data with single select. If you want to play with data, see the documentation panel at the bottom - there is an SQL link there which will point you to the actual query that is used to generate (precalculate) data for this dashboard (this is run periodically to update dashboards).

lukaszgryglicki commented 1 year ago

All data refreshed for this dashboard.