jscheffl commented on code in PR #46755:
URL: https://github.com/apache/airflow/pull/46755#discussion_r1955904981


##########
providers/edge/src/airflow/providers/edge/plugins/edge_executor_plugin.py:
##########
@@ -146,9 +147,31 @@ def remove_worker(self, worker_name: str):
     @expose("/status/maintenance/<string:worker_name>/change_comment", 
methods=["POST"])
     @has_access_view(AccessView.JOBS)
     def change_maintenance_comment(self, worker_name: str):
+        from flask_login import current_user
+
         from airflow.providers.edge.models.edge_worker import 
change_maintenance_comment
 
         maintenance_comment = request.form.get("maintenance_comment")
+        if maintenance_comment:

Review Comment:
   Can you please extract the code of re-writing the comment into a separate 
function (can be in the same module) and add a pytest for it? Otherwise this is 
un-tested code.



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