Skip to content

fix: revert bulk upsertDocuments auth#11640

Merged
ChiragAgg5k merged 1 commit into1.9.xfrom
revert-upsert-auth
Mar 25, 2026
Merged

fix: revert bulk upsertDocuments auth#11640
ChiragAgg5k merged 1 commit into1.9.xfrom
revert-upsert-auth

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 25, 2026

Greptile Summary

This PR reverts the authentication types for the bulk upsertDocuments endpoint back to [AuthType::ADMIN, AuthType::KEY], removing AuthType::SESSION and AuthType::JWT that had been added in a previous change. The fix aligns upsertDocuments with the other two bulk document endpoints (deleteDocuments and updateDocuments), both of which already only permit ADMIN and KEY auth types.

  • The single-line change restores consistency across all three bulk document operations — Upsert, Update, and Delete — which now all share the same [AuthType::ADMIN, AuthType::KEY] auth configuration.
  • Client-side authentication methods (SESSION, JWT) are no longer accepted for bulk upserts, which is intentional given that bulk operations are designed for server-side usage.

Confidence Score: 5/5

  • This PR is safe to merge — it is a targeted one-line revert that restores consistency with the other bulk endpoints.
  • The change is minimal, intentional, and correct: it removes SESSION and JWT auth types from the bulk upsert endpoint so that all three bulk document operations (Upsert, Update, Delete) are consistently restricted to ADMIN and KEY auth. No logic changes, no new code paths, and no tests are affected.
  • No files require special attention.

Important Files Changed

Filename Overview
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php Reverts the auth types for the bulk upsert endpoint to [AuthType::ADMIN, AuthType::KEY], removing the previously added AuthType::SESSION and AuthType::JWT, making it consistent with the other bulk endpoints (Delete and Update).

Reviews (1): Last reviewed commit: "fix: revert bulk upsertDocuments auth" | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit ee3d4df - 7 flaky tests
Test Retries Total Time Details
UsageTest::testVectorsDBStats 1 10.18s Logs
LegacyConsoleClientTest::testCreateIndexes 1 246.87s Logs
LegacyConsoleClientTest::testEnforceCollectionAndDocumentPermissions 1 90ms Logs
LegacyConsoleClientTest::testTimeout 1 123.91s Logs
LegacyCustomClientTest::testAttributeResponseModels 1 243.54s Logs
LegacyCustomClientTest::testOrQueries 1 240.31s Logs
LegacyCustomServerTest::testCreateIndexes 1 241.61s Logs

@github-actions
Copy link
Copy Markdown

✨ Benchmark results

  • Requests per second: 1,682
  • Requests with 200 status code: 302,797
  • P99 latency: 0.10065237

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,682 1,214
200 302,797 218,618
P99 0.10065237 0.186001315

@ChiragAgg5k ChiragAgg5k merged commit 52efca0 into 1.9.x Mar 25, 2026
42 checks passed
@ChiragAgg5k ChiragAgg5k deleted the revert-upsert-auth branch March 25, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants