Page MenuHomePhabricator

Deleting a connected testcase makes non-deleted testcases fail
Open, LowPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Have a function with an implementation.
  • Have a testcase, connected to the function, that you want to delete.
  • Also have a testcase, connected to the function and passing, that you want to keep.
  • Delete the testcase you wanted to delete.
  • Go to the implementation's page.

What happens?:

What should have happened instead?:

  • The deleted testcase should not show at all. It certainly shouldn't make the kept testcase fail.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia): on wikifunctions.org: MediaWiki 1.44.0-wmf.11; WikiLambda fa9b745.

Other information (browser name/version, screenshots, etc.):

  • Disconnecting the testcase, then deleting, is a workaround.
  • Seems similar to, but distinct from, T379873

Event Timeline

It's not distinct, it's the same bug

I think it's distinct: this bug is when you go to the implementation page after a testcase is deleted, the other is when you go to the testcase page after the implementation is deleted.

I think it's distinct: this bug is when you go to the implementation page after a testcase is deleted, the other is when you go to the testcase page after the implementation is deleted.

I mean, sure, there's that difference, but the root issue is still the same. Perhaps the bugs can be merged?

Feeglgeef renamed this task from Deleting a connected testcase makes non-deleted testcases fail to References to deleted objects are not purged.Jan 11 2025, 10:54 PM
Feeglgeef updated the task description. (Show Details)
  1. You merged into the wrong bug.
  2. The difference seems pretty important!
  3. I doubt you know for sure that this is *the same* bug.

Why don't you stop touching things, and I'll try to clean this up.

Stop.

Can you explain to me how these are different bugs? I don't get it? The root issue is that objects are not purged when a deletion occurs. Is this general ticket not much more helpful with solving the issue?

  1. You merged into the wrong bug.
  2. The difference seems pretty important!
  3. I doubt you know for sure that this is *the same* bug.

Why don't you stop touching things, and I'll try to clean this up.

I obviously can't know for sure but the exact same thing is happening (objects are not being purged from a function when deleted) and the exact same thing is expected (we want the function to be removed of the reference to something that doesn't exist). I'm also not sure what you mean, it doesn't really matter which bug is merged, I changed the description anyway.

This also happened in a composition definition with a reference to a configuration that I deleted, so I'm fairly certain this isn't just with test, implementations, and functions.

I looked at the source code to see if you were correct.

You do not appear to be: implementations and testers have separate functions in the front-end code.

Of course, I could be wrong, and someone who knows/has worked on the code is welcome to merge these if I am!

In the meantime, I'll revert your changes.

mdaniels5757 renamed this task from References to deleted objects are not purged to Deleting a connected testcase makes non-deleted testcases fail.Jan 11 2025, 11:13 PM
mdaniels5757 updated the task description. (Show Details)

Yes, but them being displayed is not the issue. The issue is that they are being referenced to at all. Sure, this bug could be fixed as a frontend bug, but the actual root error is then not, and the other issue I mentioned is not fixed. See T379873#10341096

They appear to be separately handled in the backend code too, it just took longer to find...

They appear to be separately handled in the backend code too, it just took longer to find...

What exactly do you mean? We would want any references to a deleted object to disappear, no?

Please leave them separate but linked as they currently are. If it turns out they are solved with the same code change, great, they can both be closed at the same time.