Bulk removal of MCP clients: filter before the transaction per client, and skip only a foreign key refusal

Offen
#3,448 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
58/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
csharp

Rechercherichtung

Start with src/FluentCMS.Core/Identity/Oidc/McpClients.cs and trace RemoveOpenApprovedAsync and RemoveUnusedAsync, focusing on where the span and open-approved filter are applied and how save failures are handled. Add tests that count which clients the query touches and confirm only a foreign key refusal is skipped; other save failures should propagate. Done when both behaviors are covered and the bulk removal still respects the 100-client ceiling.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:identity plugin type:bug

Follow-ups of the bulk removal of self-registered MCP clients (#3397, #3434), found in its second review. src/FluentCMS.Core/Identity/Oidc/McpClients.cs.

  • The span is applied after a transaction is opened per client. RemoveOpenApprovedAsync opens an IdentityChanges transaction and reads again every client the open policy approved, those outside the span included. The ceiling of 100 bounds the deletes, not the scan: a call costs up to maxClients (which can be set to 100000) empty transactions. A cost, not a wrong answer.
  • Any save failure is taken as "a consent arrived". catch (DbUpdateException) in the bulk removal and in RemoveUnusedAsync takes every failure of the save, a failed outbox write included, as the foreign key refusal it was written for. A failure that lasts would answer 200 with { removed: 0, more: false } and one warning 9009 per client.

Wanted

  • The span and the open-approved filter applied in the query, so that a call touches only its candidates, with a test that counts.
  • Only a foreign key refusal skipped; another failure thrown, with a test.

Bundle 26.

Vorherrschende Sprache
C#
Sterne
567
Forks
107
Ø Merge
1 Std. 19 Min.
Gemergte PRs (30 T.)
353

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus fluentcms/FluentCMS

Alle Issues in fluentcms/FluentCMS

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.