#62766 closed defect (bug) (fixed)
Build/Test Tools: Fix the date time log for performance tests commit
Reported by: | mukesh27 | Owned by: | mukesh27 |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | performance | Cc: |
Description
When a commit is made in the WordPress repository, performance data is recorded and displayed on the WordPress dashboard. However, the timestamp value sent with the commit is in an incorrect date format that the dashboard supports, causing it to display the wrong date. This issue needs to be fixed.
Original report: https://github.com/youknowriad/codevitals/issues/31
The WordPress dashboard fetches data through API requests, such as: https://www.codevitals.run/api/evolution/14?limit=10
.
However, the API is returning an incorrect measured_at
timestamp. For example, the response includes a timestamp like "1970-01-21T01:46:33.000Z"
, which does not match the actual commit date provided in the corresponding GitHub commit. For ex see: https://github.com/WordPress/wordpress-develop/actions/runs/12383856936/job/34567371506#step:41:23.
Example API Response
"id": 259315, "metric_id": 14, "value": 12.7313, "raw_value": 15.985, "branch": "trunk", "measured_at": "1970-01-21T01:46:33.000Z", "hash": "f6fb194a0755d82037247916305b51ae70b995d0", "project_id": 2
Attachments (1)
Change History (12)
This ticket was mentioned in PR #8072 on WordPress/wordpress-develop by @mukesh27.
3 weeks ago
#1
- Keywords has-patch added; needs-patch removed
#2
@
3 weeks ago
Changes make sense to me. It's also great that we can get rid of one more GH-Actions job step!
@flixos90 commented on PR #8072:
3 weeks ago
#4
Committed in https://core.trac.wordpress.org/changeset/59570
#5
@
3 weeks ago
- Resolution fixed deleted
- Status changed from closed to reopened
I approved this too early 🤦
The workflow failed, see https://github.com/WordPress/wordpress-develop/actions/runs/12585313776/job/35076824568. I think it's because the COMMITTED_AT
environment variable is using a Shell script as value, which does not work?
I'll revert the commit for now, so that this doesn't cause subsequent commits to not be sent to the dashboard, which would be worse than sending wrong timestamps.
@flixos90 commented on PR #8072:
3 weeks ago
#7
Reopening because the commit was reverted, see https://core.trac.wordpress.org/ticket/62766#comment:5
I believe we need to reinstate the extra workflow step and run the git
command as part of that, then use it as output to pipe it into the COMMITTED_AT
environment variable.
@mukesh27 commented on PR #8072:
2 weeks ago
#8
@felixarntz I have set the ENV variable in the previous step ( tested in https://github.com/WordPress/wordpress-develop/pull/8072/commits/07ec67dd92a1869070be3ab8b82a96af6342355e ). Hopefully, this fixes the issue. I'm not entirely sure how to test this locally.
#10
@
2 weeks ago
I just confirmed that this is now working as expected, see the relevant workflow that passes: https://github.com/WordPress/wordpress-develop/actions/runs/12640532442
You can also inspect the data in the Code Vitals dashboard to verify that the commit data in the API for the latest commit(s) has the correct date attached, per the screenshot above: The last commit is the one that fixed this, and it has the correct measured_at
value, in contrast to the previous one(s) with incorrect 1970 dates.
@flixos90 commented on PR #8072:
2 weeks ago
#11
Committed in https://core.trac.wordpress.org/changeset/59582, and working as expected now, see https://core.trac.wordpress.org/ticket/62766#comment:10
Trac ticket: https://core.trac.wordpress.org/ticket/62766