appwrite
appwrite copied to clipboard
Feat Sync team deletion
What does this PR do?
Changed team and organization deleting logic to the API instead of queuing it to the deleting worker
Test Plan
Tested against local 1.5.5 instance,
- All of the projects were pulled using the CLI and pushed into a new Organization with different project IDs.
- A few resources and files were added manually
- Delete organization, delete everything.
Related PRs and Issues
Close #7939
Checklist
- [x] Have you read the Contributing Guidelines on issues?
- [x] If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?
@Meldiron, checked, the test is without sleep
https://github.com/appwrite/appwrite/blob/main/tests/e2e/Services/Teams/TeamsBase.php#L371-L388
@Meldiron, checked, the test is without
sleephttps://github.com/appwrite/appwrite/blob/main/tests/e2e/Services/Teams/TeamsBase.php#L371-L388
@byawitz, but that tests doesn't verify the memberships are deleted synchronously. Maybe you can add a users list memberships? Or at least manually test?
The test returns 404, which means the teams were deleted, and there's no way to delete them in an async way.
What should the test be different?
The test returns 404, which means the teams were deleted, and there's no way to delete them in an async way.
Even without your change, the current test returns 404 so the current test doesn't actually test anything about memberships?
What should the test be different?
A test that verifies the memberships are deleted would be great. I'm not totally sure on how to test, though. Maybe users.listMemberships()?
The tests check if the team for a given ID exists. When the endpoint returns 404, it means the team no longer exists.
Do you mean to add a whole new test for userMemberships?
Test added here
:sparkles: Benchmark results
- Requests per second: 1,681
- Requests with 200 status code: 302,570
- P99 latency: 0.079768253
:zap: Benchmark Comparison
| Metric | This PR | Latest version |
|---|---|---|
| RPS | 1,681 | 2,149 |
| 200 | 302,570 | 386,812 |
| P99 | 0.079768253 | 0.075311548 |