backend.ai icon indicating copy to clipboard operation
backend.ai copied to clipboard

Let's provide users' `last_used`.

Open agatha197 opened this issue 2 years ago • 2 comments

What Operating System(s) are you seeing this problem on?

Linux (x86-64)

Backend.AI version

996b053

Describe the bug

Keypair's last_used doesn't seem to work because I got always a null value from that.

To Reproduce

query last_used from the keypair table.

Expected Behavior

return last used date.

Anything else?

No response

agatha197 avatar May 08 '23 12:05 agatha197

Could you elaborate what's the concrete criteria of last_used? It was intentionally removed a long time ago to reduce the database write overhead whenever an API request is made (!). If possible, it might be better to replace it with last_login for web users. If we need to revive last_used preserving its original semantics, we should use Redis for this purpose. Even in this case, we should have an admin configuration to turn on/off this feature (e.g., disable for cloud-scale services).

achimnol avatar May 15 '23 03:05 achimnol

@achimnol I think it would be better to replace it with last_login. The last_used value is shown on the keypair list page of the control panel, and the value is always null. So I added this issue.

agatha197 avatar May 15 '23 03:05 agatha197