fix: Stale api keys no longer display on the page once revoked#1934
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning
|
lucaseduoli
left a comment
There was a problem hiding this comment.
Could you create a test to create an API key, check if the service returns it, revoke it and then check again to see if it disappears?
Added unit test addressing the comment
Summary
Fixes #1877 , Updates the opensearch query to only fetch non revoked (revoked = False) api keys so the frontend recieves only non-revoked keys to display.
Demo (Before)
screen-capture.6.webm
Demo (After)
screen-capture.7.webm
Changes
api_key_service.pylist_keys opensearch query to also filter for keys that have revoked set to false