WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
392 stars 631 forks source link

Tests against 'num_ref' property of LiftWing data are failing #6000

Open ragesoss opened 1 month ago

ragesoss commented 1 month ago

In recent builds — such as https://github.com/WikiEducationFoundation/WikiEduDashboard/actions/runs/11304166699/job/31442185321#step:14:4022 — it looks like all the tests that use the num_ref data from the LiftWing API are failing. Perhaps the API format has changed?

Determine the cause of these failing tests and make any necessary updates.

Formasitchijoh commented 1 month ago

@ragesoss can i take this

123ZOKzok commented 1 month ago

@ragesoss can i take this

Formasitchijoh commented 1 month ago

@ragesoss

Findings from the Issue

After analyzing the response from the get_revision_data and get_number_of_references_from_revision_ids method (which pulls data from the LiftWing and ReferenceCounter APIs), no structural changes were observed in the API responses. However, multiple tests failed or returned nil values in the latest build, and the test run time extended to 2 hours 16 minutes—about four times longer than current build time.

Possible Reasons for the Build Failure:

VCR Cassette Issue:

Inconsistent Test Behavior:

When run individually, all tests passed, suggesting either:

screen-pass pass-2-al

Incorrect VCR Values:

Possible solution to this, will be to

Clear and re-record the VCR cassettes to capture fresh API responses, ensuring no erroneous data from previous builds is reused, especially when test failures or inconsistencies arise