Skip to content

[Bug] plugin_hook_before on post update and delete causes intermittent CI failures. #5925

@dessalines

Description

@dessalines

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

I keep seeing CI errors related to post updates and deletes, not performing the correct action. I've narrowed it down to this line, which calls plugin_hook_before:

https://github.com/LemmyNet/lemmy/blob/main/crates/api/api_crud/src/post/update.rs#L144

This should return a form, but in actuality is it spawning an async function in a background thread with race conditions, that removes the correct update.

Steps to Reproduce

  1. Run CI
  2. See failure above.

Technical Details

NA

Version

main

Lemmy Instance URL

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions