kaxil commented on a change in pull request #10282:
URL: https://github.com/apache/airflow/pull/10282#discussion_r468917234
##########
File path: tests/test_local_settings.py
##########
@@ -42,6 +43,17 @@ def pod_mutation_hook(pod):
pod.namespace = 'airflow-tests'
"""
+SETTINGS_FILE_MUST_HAVE_OWNER_POLICY = """
+def task_must_have_owners(task: BaseOperator):
+ from airflow.configuration import conf
+ if not task.owner or \
+ task.owner.lower() == conf.get('operators', 'default_owner'):
+ raise AirflowClusterPolicyViolation(
+ f'''Task must have non-None non-default owner.
+ Current value: {task.owner}'''
Review comment:
```suggestion
f'Task must have non-None non-default owner. Current value:
{task.owner}'
```
Can be just a single line since we have 110 line as max-length
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]