potiuk commented on code in PR #73074:
URL: https://github.com/apache/airflow/pull/73074#discussion_r4499053580


##########
airflow-core/src/airflow/cli/commands/info_command.py:
##########
@@ -252,6 +260,7 @@ def _system_info(self):
         operating_system = OperatingSystem.get_current()
         arch = Architecture.get_current()
         uname = platform.uname()
+        uname = 
uname._replace(node=self.anonymizer.process_hostname(uname.node))

Review Comment:
   A correction to my suggestion above, since it has some problems:
   
   - Please don't run the hostname replacement over the whole URL in 
`process_url`. A plain substring replace has the same problem #73599 fixed for 
the username: on a machine named `postgres`, the scheme would become 
`${HOSTNAME}ql+psycopg2://`. Compare only the URL's host, without the port, and 
replace it if it matches the machine's hostname.
   - My `db01.corp.example` example was misleading. This only catches a 
database host that is the same machine, and a separate database host is out of 
scope here.
   - The `uname` line isn't covered automatically, because `_system_info` 
doesn't pass it through `process_path`. It needs that call too.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by @potiuk before posting
   



-- 
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