treeverse / lakeFS

lakeFS - Data version control for your data lake | Git for data
https://docs.lakefs.io
Apache License 2.0
4.34k stars 342 forks source link

Use the Friendly Name for the Committer instead of the Committer ID in the Blame windows UI #7831

Open mickaellcr opened 3 months ago

mickaellcr commented 3 months ago

Hello everyone!

We are using the OIDC Okta for the authentication. So by default, we can add a Friendly name to the UI, (so a nice name, instead of an ID). But I couldn't find how to add the email. Why ?

Because in the Blame windows of a file, as you can see here :

image

the committer is an ID instead of the username. A quick look at the code and I can see that the Committer() is either the email, or the ID, but not the friendly name.

Is it possible to:

If you need more information, feel free to ping me.

Thanks a lot!

arielshaqed commented 3 months ago

We definitely need something like that. But using friendly name for this will be challenging - AFAIK it is not unique.

Would it be acceptable to provide an API to do this translation on the client side?

talSofer commented 3 months ago

Let's display the friendly name next to the committer id to avoid ambiguity. For example: ssdd88222 (Tal S)

arielshaqed commented 3 months ago

Sorry for continuing to harp on this, but this is really quite important. The committer field is an identifier. As such, its assignment should be as immutable as possible. Real names are mutable[^1][^2]. I prefer avoid using them as identifiers.

Proposal

We can place the friendly name on a field of commit "user metadata". So in @talSofer's example the committer field would be ssdd88222, which is as immutable an identity as we have, and lakeFS would add a field ::lakefs::_commit::friendly_name to user metadata with the value Tal S. So "Tal S" would appear on the GUI, but in a different place. I would probably just deserialize all non-empty fields off of the user data struct.

Here's an example: lakeFS web UI showing a commit with metadata key `::lakefs::_commit::friendly_name` mapped to `ariels`

We might add a type suffix to the key to allow nicer rendering for fields in ::lakefs::_commit::, like we do for URLs.

[^1]: For a fun read, Falsehoods Programmers Believe About Names is unfortunately a classic by now. [^2]: For example, ariels was born with one Hebrew surname, now goes by a different Hebrew surname on official documents, uses both of them when talking to people he does not know, and has the same set of 3 surnames again in Latin characters.