Open PPPSDavid opened 1 year ago
This issue is stale because it has been open 30 days with no activity. To keep this issue open remove stale label or comment.
This issue was closed because it has been stale for 14 days with no activity. If this issue is important or you have more to add feel free to re-open it.
Sorry for allowing this to close. This is a great idea! Its not a high priority for us at the moment, but I've added it to our backlog.
First check
Prefect Version
2.x
Describe the current behavior
Currently, Prefect's API client returns a "CreatedBy" object for a flow run, which has an
id
, and adisplayname
. If this flow run is created by a user from the Prefect Cloud UI, the "displayname" of the CreatedBy object seems to be the sluggified version of the user's email account used during registration. (e.g. abc@qwe.com -> abcquecom).We also noticed that in the
Organization
'sUser
tab, each user also has a human-readable user name (in our case the user's name on file with our firm), but this does not seem to be accessible via the API.Describe the proposed behavior
We can think of a couple of ways to close this gap:
CreatedBy
object to include the user's account name and email if possible. For flow runs from service account/Prefect schedule runs, these can just be None.Example Use
Our team is using Prefect cloud with account access to orchestrate our flows, and we want to perform operations like the following systematically via the Prefect Python client:
Given a flow run, get me the account name & email of the person who kicked off it.
This is important because we want to have accountability as to who runs what, and also this will enable us to have custom notification rules that notify the flow creator if anything goes wrong.
Additional context
No response