SibtainOcn commented on code in PR #62964:
URL: https://github.com/apache/airflow/pull/62964#discussion_r2892572942


##########
airflow-core/src/airflow/executors/workloads/base.py:
##########
@@ -69,7 +69,7 @@ class BaseWorkloadSchema(BaseModel):
 
     model_config = ConfigDict(populate_by_name=True)
 
-    token: str
+    token: str = Field(repr=False)

Review Comment:
   Thanks for the review @kaxil! 
   
   I looked at @zach-overflow's SecretStr suggestion on  #62782  before going 
with Field(repr=False). The reason I went this route is that switching to 
SecretStr would change the type from str to SecretStr, which means all the 
places that currently read workload.token (there are about 6 across Python 
executors, the Go SDK, and edge providers) would need to be updated to 
workload.token.get_secret_value(). It also changes how JSON serialization works.
   
   Field(repr=False) gives the same redaction in repr/logs but with zero 
breaking changes since the token stays a plain str.
   
   If you'd prefer SecretStr for the stronger guarantees though, I'm happy to 
update this PR and adjust the downstream call sites too. Let me know!
   



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