diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py index 897df0dd31..4b628b35d7 100755 --- a/airflow/bin/cli.py +++ b/airflow/bin/cli.py @@ -250,7 +250,10 @@ def serve_logs(args): def worker(args): # Worker to serve static log files through this simple flask app - sp = subprocess.Popen(['airflow', 'serve_logs']) + sp = subprocess.Popen( + ['airflow', 'serve_logs'], + env={'AIRFLOW_HOME': settings.AIRFLOW_HOME} + ) # Celery worker from airflow.executors.celery_executor import app as celery_app diff --git a/airflow/configuration.py b/airflow/configuration.py index cb03794db3..a5de703508 100644 --- a/airflow/configuration.py +++ b/airflow/configuration.py @@ -11,6 +11,7 @@ defaults = { 'base_url': 'http://localhost:8080', 'web_server_host': '0.0.0.0', 'web_server_port': '8080', + 'authenticate': False, }, 'scheduler': { 'statsd_on': False, diff --git a/airflow/default_login.py b/airflow/default_login.py index 2febaf9b2c..b1cd105562 100644 --- a/airflow/default_login.py +++ b/airflow/default_login.py @@ -63,7 +63,6 @@ def login(self, request): if not user: user = models.User( username=DEFAULT_USERNAME, - has_access=True, is_superuser=True) session.merge(user) session.expunge_all() diff --git a/airflow/models.py b/airflow/models.py index b7cdf5a40e..01b6d26c55 100644 --- a/airflow/models.py +++ b/airflow/models.py @@ -934,12 +934,12 @@ class BaseOperator(Base): '_sa_instance_state', '_upstream_list', '_downstream_list', 'dag'} for k in set(self.__dict__) - blacklist: if self.__dict__[k] != other.__dict__[k]: - logging.debug(str( + logging.debug(str(( self.dag_id, self.task_id, k, self.__dict__[k], - other.__dict__[k])) + other.__dict__[k]))) return -1 return 0 @@ -1426,6 +1426,7 @@ class DAG(Base): # backdoor cls = self.__class__ result = cls.__new__(cls) + setattr(result, '_sa_instance_state', getattr(self, '_sa_instance_state')) memo[id(self)] = result for k, v in self.__dict__.items(): if k not in ('user_defined_macros', 'params'):