You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by tu...@apache.org on 2021/02/02 13:29:17 UTC
[airflow] branch v1-10-stable updated: Treat default value in
HostnameCallable rule as good one (#13670)
This is an automated email from the ASF dual-hosted git repository.
turbaszek pushed a commit to branch v1-10-stable
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v1-10-stable by this push:
new bdae805 Treat default value in HostnameCallable rule as good one (#13670)
bdae805 is described below
commit bdae805a4d829f6fa714bf8be3df591d03de5685
Author: Tomek Urbaszek <tu...@gmail.com>
AuthorDate: Tue Feb 2 14:29:07 2021 +0100
Treat default value in HostnameCallable rule as good one (#13670)
---
airflow/upgrade/rules/hostname_callable_rule.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/airflow/upgrade/rules/hostname_callable_rule.py b/airflow/upgrade/rules/hostname_callable_rule.py
index fbc571a..a316e52 100644
--- a/airflow/upgrade/rules/hostname_callable_rule.py
+++ b/airflow/upgrade/rules/hostname_callable_rule.py
@@ -24,10 +24,15 @@ from airflow.upgrade.rules.base_rule import BaseRule
class HostnameCallable(BaseRule):
title = "Unify hostname_callable option in core section"
- description = ""
+ description = "hostname_callable option is using now only dots instead of dots and colons"
def check(self):
+ default = "socket:getfqdn"
hostname_callable_conf = conf.get("core", "hostname_callable")
+ if hostname_callable_conf == default:
+ # If users use default value there's nothing they should do
+ return None
+
if ":" in hostname_callable_conf:
return (
"Error: hostname_callable `{}` "