• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / minder / 8694895516
53%

Build:
DEFAULT BRANCH: main
Ran 15 Apr 2024 07:30PM UTC
Jobs 1
Files 166
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Apr 2024 07:23PM UTC coverage: 48.117% (+0.02%) from 48.096%
8694895516

push

github

web-flow
Do not delete user from OpenFGA in a DB transaction to avoid issues with minder auth delete (#3082)

* Do not delete user from OpenFGA in a DB transaction to avoid issues with minder auth delete

We've been occasionally hitting issues where `minder auth delete` would
delete the user entry but leave the project around. Recovering from this
state then requires database write permissions to manually clean up the
projects.

At least in the case that I reproduced by accident the flow went like
this:
- user issues auth delete
- the transaction starts
- the user projects are returned and contain a non-empty list
- the user entry is deleted from OpenFGA
- the user entry is staged for deletion from the DB as part of the
  transaction
- one of the projects are attempted to be deleted, but the deletion
  fails. This error rolls back the transaction and deleting the user.
- the end-user gets an error message, thinks 'a fluke' and runs auth
  delete again
- the new run starts, calls list project for user from OpenFGA which
  returns an empty list
- the user is deleted from the db and the transaction is commited
- the project are left behind because openFGA returned none for the user
  because as far as openFGA knows the user is gone
- the next auth login can't create the project for the user

This patch reorganizes the `DeleteUser` flow is such a way that if the
all the database operations are wrapped in a transaction, but the
OpenFGA delete user call is kept outside; the list of projects before the
transaction and deleting the user entry after it.

The call to delete unmanaged projects is changed so that only the
projects that have other subjects than the one being deleted are
deleted.

* code review suggestions

28 of 35 new or added lines in 2 files covered. (80.0%)

1 existing line in 1 file now uncovered.

8290 of 17229 relevant lines covered (48.12%)

37.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8694895516.1 15 Apr 2024 07:30PM UTC 0
48.12
GitHub Action Run
Source Files on build 8694895516
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8694895516
  • 4121d66d on github
  • Prev Build on main (#8691935057)
  • Next Build on main (#8695873319)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc