Skip to content

[BUG] Garbage Collector removing relation still valid #1471

@gign0766

Description

@gign0766

Describe the bug
When a permission is present twice, one valid and the other expired, the Garbage Collector invalidate the relation in spite of relation their is still valid one

To Reproduce
Steps to reproduce the behavior:

Setup a Permify with a PostgreSQL database, configure the garbage collector as following :

database:
  engine: postgres
  uri: 
  garbage_collection:
     enabled: true
     interval: 10m
     window: 5m
     timeout: 5m

Add a relation, then add the same relation (for the same tenant) a bit later

For example :
image

The permission check work until the garbage collector run, after that, the permission is considered as invalid

Expected behavior
The expired relation should be removed from the database, but the permission check should still be allowed since there is a valid relation.

Additional context
The permify instance run with the helm chart as well as the postgres instance

Environment :

  • Permify : helmchart permify v0.3.5
  • Postgres : bitnami postgresql 12.5

Metadata

Metadata

Assignees

Labels

bugSometing isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions