Repository navigation
Commit 6b212f5
fix: Refresh the SQL registry cache after deleting a permission
delete_permission ran its own DELETE and returned, so unlike the other
delete_* methods it never bumped the project's last-updated metadata or
refreshed the cache in sync mode. list_permissions(allow_cache=True)
kept returning the deleted permission.
Route it through _delete_object like the other object types. That alone
wasn't enough: _delete_object refreshed the cache inside the open write
transaction, so the refresh read a snapshot that still contained the
deleted row. Refresh after the transaction commits instead, matching
_apply_object. This also fixes stale cached reads after delete_entity,
delete_data_source and the other deletes that go through _delete_object.
Signed-off-by: LuisFigueroaG <[email protected]>1 parent e2a53bb commit 6b212f5
2 files changed
Lines changed: 43 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1751 | 1751 | | |
1752 | 1752 | | |
1753 | 1753 | | |
1754 | | - | |
1755 | | - | |
1756 | | - | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1757 | 1759 | | |
1758 | 1760 | | |
1759 | 1761 | | |
| |||
1927 | 1929 | | |
1928 | 1930 | | |
1929 | 1931 | | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
1937 | | - | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
1938 | 1935 | | |
1939 | 1936 | | |
1940 | 1937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
350 | 384 | | |
351 | 385 | | |
352 | 386 | | |
| |||
0 commit comments