Skip to content

Add metrics: total number of entites#957

Merged
rosalieper merged 9 commits into
mainfrom
T392807-entity-count
Sep 3, 2025
Merged

Add metrics: total number of entites#957
rosalieper merged 9 commits into
mainfrom
T392807-entity-count

Conversation

@rosalieper
Copy link
Copy Markdown
Contributor

Bug: T392807

@rosalieper
Copy link
Copy Markdown
Contributor Author

I fixed the failing test by adding forceDelete() on the wiki created during the test. I wish using RefreshDatabase did the thing but in the case of testSavesEntityCountsCorrectly I have no idea why there is no DB cleanup after the tests. In anycase, I will love to know another way around this but I am ok with this moving foward as is as this hack is just about cleaning up the DB after a test.

@deer-wmde
Copy link
Copy Markdown
Contributor

I fixed the failing test by adding forceDelete() on the wiki created during the test. I wish using RefreshDatabase did the thing but in the case of testSavesEntityCountsCorrectly I have no idea why there is no DB cleanup after the tests. In anycase, I will love to know another way around this but I am ok with this moving foward as is as this hack is just about cleaning up the DB after a test.

I tried to solve this, but I also couldn't figure it out. I am also okay with moving forward.

@rosalieper rosalieper merged commit d551359 into main Sep 3, 2025
5 checks passed
@rosalieper rosalieper deleted the T392807-entity-count branch September 3, 2025 07:20
deer-wmde pushed a commit that referenced this pull request Dec 15, 2025
* Add migrations for new columns in the wiiki_daily_metrics table

* added logic for counting and saving entities count in the metrics

* Add test for entity count function in metrics

* Reduce database transactions conflicts

* fix tests

* remove unuseful comments

* a little refactoring

* update number of pages of wiki in the test to reflect the number of entities. placed the DB cleanup before assertion in the test

* Update test: UpdateWikiDailyMetricJobTest.php
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