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


##########
.pre-commit-config.yaml:
##########
@@ -1015,6 +1004,12 @@ repos:
         language: python
         pass_filenames: true
         files: ^(airflow-core|airflow-ctl|task-sdk|providers|shared)/.*\.py$
+      - id: check-no-new-airflow-core-utils-modules
+        name: Check that no new modules are added under 
airflow-core/src/airflow/utils
+        entry: ./scripts/ci/prek/check_no_new_airflow_core_utils_modules.py

Review Comment:
   I strongly prefer to use python for those- with nice colorful explanation,  
actionable output and more context. I used to write a lot of those one-liners 
and after a short while they usually grew to two, three and then fifteen-liners 
where it was absolutely not clear what they were doing and hiding some subtle 
bugs.
   
   First change was usually "how to give better mesage to the user".
   
   Eventually, they turn into Python scripts, eventually - with rich and 
colors.  
   
   And especially now with AI - when it takes seconds to generate such scripts 
and seconds to update them with new "intentions" ... How to say it.. Code is 
cheap. Code is throwaway. It adds  almost 0 overhead to have more code 
nowadays. 
   
   So .. I guess we can skip all of it and go straight to end game -> nice 
python script with colorful output specifying the intentions and ways to fix..
   
   Also such explicit behaviour with clearly described whys will get agents 
pause - read the mesage and ask the user what to do - providing them options 
and even - possibly - suggesting helpful refactors and moving the utils user 
uses to another util - instead of adding new module or moving it to shared - 
when the description is provided .. (or offer to add util). 
   
   I think (and I would say **finally**) adding more context and explanation is 
way benefitial than less of it ... because people usually bailed out when they 
saw long message, but agents will read them ... and act.



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