Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependency between statuses and status configurations #1067

Open
xmo-odoo opened this issue Feb 26, 2025 · 0 comments
Open

Fix dependency between statuses and status configurations #1067

xmo-odoo opened this issue Feb 26, 2025 · 0 comments
Labels

Comments

@xmo-odoo
Copy link
Collaborator

Currently the status computation (of both PR and staging) depend on repository.status_ids.* (essentially).

This means when adding, removing, or modifying a status configuration every PR, batch, and staging for the repository gets retrieved and updated even though status configurations are only relevant for:

  • pending stagings
  • non-merged non-closed PRs
  • active non-merged batches

This causes a huge amount of recomputation and commonly a MemoryError for a somewhat innocuous change.

Now the easy option here would be to just remove those dependencies and not recompute anything, only new PRs and stagings would take the change in account and TBF for most situations that's probably what we want anyway?

Alternatively, create a search-only m2m for the relationships, such that only the "active" records get selected and recomputed.

@xmo-odoo xmo-odoo moved this to accepted in Mergebot Feb 26, 2025
@xmo-odoo xmo-odoo moved this from accepted to done in Mergebot Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: done
Development

No branches or pull requests

1 participant