- Issue created by @mondrake
- 🇺🇸United States smustgrave
Nice! lets do it. https://git.drupalcode.org/issue/drupal-3499245/-/jobs/3994661
- 🇳🇱Netherlands bbrala Netherlands
No wait, shouldn't we expose this as a metrics report?
https://docs.gitlab.com/ee/ci/testing/metrics_reports.html
This would make this visible in the gitlab interface.
- 🇳🇱Netherlands bbrala Netherlands
And an example:
https://gitlab.com/gitlab-org/ci-sample-projects/metrics-reports
File format is extremely easy
- Merge request !1test: add some randomness to the metrics to proove data works → (Open) created by bbrala
- 🇳🇱Netherlands bbrala Netherlands
Did a. test here: https://git.drupalcode.org/project/deprecated_code/-/merge_requests with a mr to main and 1.x with different metrics.
Few things to note:
Metric changes are based on the target branch of the merge request, which means this will work pretty quite well to show the correct metrics based on the main branches (11.x, 11.1.x etc) without the need of any weirdness or logic.Seems also to be provable with a MR locally, but since the current job only submits artifacts when the job fails it might need a little more massaging. So lets follow up on that after this issue.
- 🇳🇱Netherlands bbrala Netherlands
I've checked the reporting thingie, it seems reports are always uploaded so my assumption (and therefor the use of a follow up) is invalid. I'm going to update the mr here to include the metrics for easy viewing.
- 🇮🇹Italy mondrake 🇮🇹
Nice! If we do this, we need however to have the stats calculated right also (and especially!) for the baseline resulting from changes in the MR. We need to get it right first, though, ✨ [CI] Generate full baseline upon PHPStan failure Active .
- 🇮🇹Italy mondrake 🇮🇹
@bbrala how will the delta be calculated though? i.e. suppose my MR reduces the baseline errors from x to y: how will we get the info that there was a change from x to y?
- 🇳🇱Netherlands bbrala Netherlands
I think i mentioned that earlier. It uses the stored metrics from the target branch of the mr as a base and shows the diff compared to that.
- 🇮🇹Italy mondrake 🇮🇹
Ah thanks, but where are they stored in the target branch? Not as a file in the git repo, right?
- Status changed to Needs review
9 days ago 10:08am 15 April 2025 - 🇮🇹Italy mondrake 🇮🇹
✨ [CI] Generate full baseline upon PHPStan failure Active got committed, this is actionable now.
- 🇳🇱Netherlands bbrala Netherlands
I love i see metrics report now in the mr. Marked as new as expected :)
- 🇺🇸United States smustgrave
That's so cool https://git.drupalcode.org/issue/drupal-3499245/-/jobs/4970368
Lets definitely add this!
The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇳🇱Netherlands bbrala Netherlands
Fixed theretical bug that might occur when we run out of phpstan errors. Unlikely, but possiblee.
Keeping RTBC since the change was so minimal.
- 🇳🇱Netherlands bbrala Netherlands
Sorry, didnt switch branch for another issue. Reverted
-
longwave →
committed 718a97e6 on 11.x
Issue #3499245 by mondrake, bbrala: [CI] Report PHPStan baseline...
-
longwave →
committed 718a97e6 on 11.x
- 🇳🇱Netherlands bbrala Netherlands
Awesome. :)
We perhaps should make a meta issue to see what metrics would be usefull to expose in the different jobs. There is possibly a lot more :)
- 🇮🇹Italy mondrake 🇮🇹
📌 [PP-1][CI] Spin off Drupal Components tests in a job of their own Postponed adds some more.