jscheffl commented on PR #51738:
URL: https://github.com/apache/airflow/pull/51738#issuecomment-2978234508

   > I have a general qn regarding the way we are handling things here.
   > 
   > The `getuser` function uses `getpass.getuser()` to get the username of the 
current user and if there's a failure in running this for whatever reason, it 
raises an `AirflowConfigException` and we do not catch that anywhere and the 
dag run will hang / fail. This comment applies to all usages, mainly in API.
   > 
   > So we need to make a decision:
   > 
   >     1. Is the `triggering_user` so critical that we fail a dag run / hang 
it if the user cannot be retrieved? If the `getuser` has failed, its likely an 
environment issue and less to do with the airflow deployment. So do we continue 
blocking dag runs until that issue is fixed?
   > 
   >     2. Or do we modify `getuser` to return a None / default user in such 
cases and not block the flow?
   
   Hi, I do not think the triggering user is super critical. But to say the 
`getpass.getuser()` is only called and used for the CLI case when called via 
airflowctl or airflow CLI. In this case the evaluation is backing from the 
system Unix/Linux user. Have never seen this failing. There should be always a 
valid Linux user. Or is it not working on Mac? Do you know any environment 
where this is problematic? Then I am okay to catch and Exception and leave it 
`None` in these cases. Note that it also sources frmo a central utility that is 
used in other places as well. So if there is a problem then we might have more 
side effects in the past.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to