Page MenuHomePhabricator

Delete tests disabled for more than 1 year
Open, Stalled, Needs TriagePublic

Description

TODO

  • @zeljkofilipin Will organize a discussion to find an automated solution to this in Sep-October

Problem

Every time we do a major framework improvement, it breaks existing code. (For a list of major framework improvements, see J317.) We usually update all broken code. If a test is disabled, it doesn't run, it doesn't break when the upgrade happens, so we don't fix it. After a year or two, there will be one or two major framework updates. If the code is enabled after being disabled for a year or two, there's a high chance it will not work.

The alternative to not updating disabled tests is enabling them during the migration. We make sure they work with the current framework, then we disable them again. That makes sure the test can be enabled, but it also wastes our time on code that nobody might care about any more.

Solution

  • Commented out code or skipped tests should not be in our codebase.
  • If a reminder for a team is needed, a task should be created. If the test is deleted, the code is not deleted from this universe. It's still in version control. The task can point to the commit that deletes the code. It's easy to get the code back.
  • 1 year should be enough time to fix a test.
  • If a test is not useful enough to be disabled for a year, it should be deleted.
  • I'm open to making the deadline shorter than 1 year.
  • when deleting the test, add to reviewers
    • the person that wrote it
    • the person that disabled it
    • people that made changes to it

Details

Related Changes in Gerrit:
SubjectRepoBranchLines +/-
mediawiki/extensions/AbuseFiltermaster+0 -6
mediawiki/extensions/Wikibasemaster+0 -66
mediawiki/extensions/CampaignEventsmaster+0 -8
mediawiki/extensions/CommunityRequestsmaster+1 -0
mediawiki/extensions/CheckUsermaster+1 -1
mediawiki/coremaster+0 -50
mediawiki/extensions/VisualEditormaster+0 -8
mediawiki/extensions/GrowthExperimentsmaster+0 -115
mediawiki/extensions/Echomaster+1 -28
mediawiki/extensions/CampaignEventsmaster+0 -40
mediawiki/extensions/AbuseFiltermaster+0 -6
mediawiki/extensions/Wikibasemaster+0 -66
mediawiki/extensions/GrowthExperimentsmaster+1 -118
mediawiki/extensions/CodeMirrormaster+0 -38
mediawiki/skins/MinervaNeuemaster+0 -97
mediawiki/skins/MinervaNeuemaster+1 -0
mediawiki/extensions/Wikibasemaster+2 -0
mediawiki/coremaster+1 -1
mediawiki/extensions/GrowthExperimentsmaster+3 -0
mediawiki/skins/MinervaNeuemaster+3 -2
mediawiki/extensions/VisualEditormaster+1 -0
integration/configmaster+1 -0
mediawiki/extensions/CodeMirrormaster+1 -0
mediawiki/skins/MinervaNeuemaster+1 -0
mediawiki/extensions/CampaignEventsmaster+1 -0
mediawiki/extensions/AbuseFiltermaster+1 -0
mediawiki/extensions/Echomaster+1 -0
mediawiki/extensions/MobileFrontendREL1_40+3 -0
mediawiki/extensions/MobileFrontendREL1_39+2 -3 K
mediawiki/extensions/WikibaseLexememaster+0 -38
mediawiki/skins/MinervaNeuemaster+0 -34
mediawiki/extensions/MobileFrontendmaster+2 -3 K
mediawiki/skins/MinervaNeuemaster+1 -31
mediawiki/extensions/RelatedArticlesmaster+1 -6
mediawiki/extensions/EntitySchemamaster+0 -34
mediawiki/extensions/WikibaseLexememaster+0 -17
integration/configmaster+0 -3
mediawiki/extensions/MobileFrontendmaster+1 -1
mediawiki/extensions/Wikibasemaster+1 -1
mediawiki/extensions/Echomaster+1 -1
mediawiki/coremaster+1 -1
mediawiki/extensions/EntitySchemamaster+0 -18
mediawiki/extensions/EntitySchemamaster+4 -4
mediawiki/skins/MinervaNeuemaster+4 -34
mediawiki/coremaster+0 -18
mediawiki/extensions/Wikibasemaster+0 -55
mediawiki/extensions/GrowthExperimentsmaster+0 -16
mediawiki/coremaster+0 -161
mediawiki/extensions/FileImportermaster+1 -12
mediawiki/extensions/WikibaseLexememaster+0 -39
mediawiki/extensions/Echomaster+0 -32
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

if a test is not useful enough to be disabled for a year, it should be deleted

I don't agree with this. Teams are busy. If you delete the test, it means there's almost zero chance of someone being able to go back and fix a flaky test that otherwise provided useful value in preventing regressions. I would leave them in place as documentation. I don't think it harms anything to leave them around.

I just picked 1 year as a reasonable time without much thought. If you think longer time is more reasonable, I'm open to discussion. (I think that time should be much shorter. 3 or 6 months.) After how long would it be reasonable to conclude nobody cares about a test? 2 years? 3 years?

I'd leave it indefinitely.

I don't agree that commented out code or skipped tests should be in our codebase. If a reminder for a team is needed, a task should be created. If the test is deleted, the code is not deleted from this universe. It's still in version control. The task can point to the commit that deletes the code. It's easy to get the code back.

It's documentation of something that, at some point, an individual or team thought was important. If it's disabled, it's due to a failure of implementation, but that doesn't take away from the importance of the test. For Selenium specifically, it means at a certain point the effort of trying to debug our WDIO setup is not worth the value we'd get out of the test.

I think I never explicitly stated the problem this task is trying to solve. Every time we do a major framework improvement, it breaks existing code. (For a list of major framework improvements, see Blog Post: Refactoring WebdriverIO Tests From Sync to Async Mode.) We usually update all broken code. If a test is disabled, it doesn't run, it doesn't break when the upgrade happens, so we don't fix it. After a year or two, there will be one or two major framework updates. If the code is enabled after being disabled for a year or two, there's a high chance it will not work.

The alternative to not updating disabled tests is enabling them during the migration. We make sure they work with the current framework, then we disable them again. That makes sure the test can be enabled, but it also wastes our time on code that nobody might care about any more.

I see. Then deleting makes sense. But alternatively, perhaps we could invest the effort in making the disabled tests more resilient and less flaky?

Change #1089338 had a related patch set uploaded (by Jared Blumer; author: Jared Blumer):

[mediawiki/extensions/GrowthExperiments@master] Remove skipped tests in addImage.js and delete homepage.js

https://gerrit.wikimedia.org/r/1089338

Change #1081080 abandoned by Zfilipin:

[mediawiki/extensions/GrowthExperiments@master] selenium: Delete tests disabled more than a year ago

https://gerrit.wikimedia.org/r/1081080

Change #1084066 abandoned by Zfilipin:

[mediawiki/extensions/Wikibase@master] selenium: Delete a test disabled almost a year ago

https://gerrit.wikimedia.org/r/1084066

Change #1083857 abandoned by Zfilipin:

[mediawiki/extensions/AbuseFilter@master] selenium: Delete tests disabled six months ago

https://gerrit.wikimedia.org/r/1083857

Change #1083859 abandoned by Zfilipin:

[mediawiki/extensions/CampaignEvents@master] selenium: Delete tests disabled six months ago

https://gerrit.wikimedia.org/r/1083859

Change #1089338 abandoned by Zfilipin:

[mediawiki/extensions/GrowthExperiments@master] Remove skipped tests in addImage.js and delete homepage.js

Reason:

Abandoning since the test will be moved to cypress.

https://gerrit.wikimedia.org/r/1089338

Change #1083861 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] selenium: Delete tests disabled more than two years ago

https://gerrit.wikimedia.org/r/1083861

zeljkofilipin changed the task status from Open to In Progress.Jan 15 2025, 10:19 AM
zeljkofilipin triaged this task as Low priority.
zeljkofilipin moved this task from Quarter 👔 to Deep work 🌊 on the User-zeljkofilipin board.

Change #1084068 merged by jenkins-bot:

[mediawiki/core@master] selenium: Delete a test disabled almost two years ago

https://gerrit.wikimedia.org/r/1084068

Change #1084065 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] selenium: Delete a test disabled more than a year ago

https://gerrit.wikimedia.org/r/1084065

zeljkofilipin changed the task status from In Progress to Open.Jan 17 2025, 11:27 AM
zeljkofilipin removed zeljkofilipin as the assignee of this task.
zeljkofilipin raised the priority of this task from Low to Needs Triage.
zeljkofilipin moved this task from Deep work 🌊 to Recurring ♻️ on the User-zeljkofilipin board.
zeljkofilipin changed the task status from Open to In Progress.Apr 2 2025, 11:57 AM
zeljkofilipin claimed this task.
zeljkofilipin triaged this task as Low priority.
zeljkofilipin moved this task from Recurring ♻️ to Deep work 🌊 on the User-zeljkofilipin board.

Change #1133412 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/CheckUser@master] selenium: Document when, how and why the test is skipped

https://gerrit.wikimedia.org/r/1133412

Change #1133415 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/CommunityRequests@master] selenium: Document when, how and why a test is skipped

https://gerrit.wikimedia.org/r/1133415

Change #1133412 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] selenium: Document when, how and why the test is skipped

https://gerrit.wikimedia.org/r/1133412

Change #1133415 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] selenium: Document when, how and why a test is skipped

https://gerrit.wikimedia.org/r/1133415

Change #1135030 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/AbuseFilter@master] selenium: Delete a test disabled more than a year ago

https://gerrit.wikimedia.org/r/1135030

Change #1135033 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/CampaignEvents@master] selenium: Delete a test disabled more than a year ago

https://gerrit.wikimedia.org/r/1135033

Change #1135034 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/Wikibase@master] selenium: Delete a test disabled more than a year ago

https://gerrit.wikimedia.org/r/1135034

zeljkofilipin changed the task status from In Progress to Open.Apr 10 2025, 4:56 PM
zeljkofilipin removed zeljkofilipin as the assignee of this task.
zeljkofilipin raised the priority of this task from Low to Needs Triage.
zeljkofilipin moved this task from Deep work 🌊 to Waiting 🏹 on the User-zeljkofilipin board.

Change #1135030 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] selenium: Delete a test disabled more than a year ago

https://gerrit.wikimedia.org/r/1135030

Change #1135033 abandoned by Daimona Eaytoy:

[mediawiki/extensions/CampaignEvents@master] selenium: Delete a test disabled more than a year ago

Reason:

Done in Ibb88968119e378837d05af24adca97dcc27eadbf

https://gerrit.wikimedia.org/r/1135033

zeljkofilipin changed the task status from Open to In Progress.Apr 29 2025, 9:11 AM
zeljkofilipin claimed this task.
zeljkofilipin triaged this task as Low priority.
zeljkofilipin moved this task from Backlog to In progress on the Test Platform (kvina 5) board.

Change #1135034 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] selenium: Delete a test disabled more than a year ago

https://gerrit.wikimedia.org/r/1135034

zeljkofilipin changed the task status from In Progress to Open.May 14 2025, 3:29 PM
zeljkofilipin removed zeljkofilipin as the assignee of this task.
zeljkofilipin raised the priority of this task from Low to Needs Triage.
zeljkofilipin moved this task from Backlog to Finishing touches on the Test Platform (sesa 6) board.
zeljkofilipin moved this task from Deep work 🌊 to Recurring ♻️ on the User-zeljkofilipin board.
thcipriani subscribed.

Complete for this round. Stalling this out for next round.

thcipriani changed the task status from Open to Stalled.May 28 2025, 3:14 PM

@zeljkofilipin Will organize a discussion to find an automated solution to this in Sep-October

This task should be replaced by a dashboard that would automatically refresh.