Skip to content

wikiMetrics: fix zero count occassions#972

Merged
deer-wmde merged 6 commits into
mainfrom
api/fix-wikimetrics-zero
Sep 5, 2025
Merged

wikiMetrics: fix zero count occassions#972
deer-wmde merged 6 commits into
mainfrom
api/fix-wikimetrics-zero

Conversation

@deer-wmde
Copy link
Copy Markdown
Contributor

We've seen[1] an error in the current WikiMetrics code in case there are zero entries for a type of entity metrics, but not zero in total: https://github.com/wbstack/api/blob/main/app/Metrics/App/WikiMetrics.php#L202

This PR attempts to provide a fix and extends the test case for this type of error.

[1] https://console.cloud.google.com/errors/detail/CIiQvbv5l_3pHA;locations=global;time=P30D?project=wikibase-cloud&utm_source=error-reporting-notification&utm_medium=email&utm_content=new-error

@deer-wmde deer-wmde marked this pull request as ready for review September 4, 2025 15:25
Copy link
Copy Markdown
Contributor

@rosalieper rosalieper left a comment

Choose a reason for hiding this comment

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

looks good to me. Thank you Dena!

@deer-wmde deer-wmde merged commit 077bb3c into main Sep 5, 2025
5 checks passed
@deer-wmde deer-wmde deleted the api/fix-wikimetrics-zero branch September 5, 2025 13:40
deer-wmde added a commit that referenced this pull request Dec 15, 2025
* add dataProvider for test

* add the fix

* lintin

* more linting

* even more linting

* linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants