You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2016/07/14 18:08:36 UTC
[1/2] incubator-airflow git commit: [AIRFLOW-337] Add __repr__ to
VariableAccessor and VariableJsonAccessor
Repository: incubator-airflow
Updated Branches:
refs/heads/master c32452aba -> aea1fa2d6
[AIRFLOW-337] Add __repr__ to VariableAccessor and VariableJsonAccessor
The VariableJsonAccessor and VariableAccessor were missing the __repr__
function that leads to a VariableError when printing out the context
being passed to for example a PythonOperator.
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/3079da06
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/3079da06
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/3079da06
Branch: refs/heads/master
Commit: 3079da06249d7ff87dfc4ed58c999f7b81f3159a
Parents: 3c91bbb
Author: Bolke de Bruin <bo...@xs4all.nl>
Authored: Thu Jul 14 19:30:46 2016 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Thu Jul 14 19:30:46 2016 +0200
----------------------------------------------------------------------
airflow/models.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/3079da06/airflow/models.py
----------------------------------------------------------------------
diff --git a/airflow/models.py b/airflow/models.py
index 60de65f..2736076 100644
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -1466,17 +1466,25 @@ class TaskInstance(Base):
{var.variable_name}.
"""
def __init__(self):
- pass
+ self.var = None
def __getattr__(self, item):
- return Variable.get(item)
+ self.var = Variable.get(item)
+ return self.var
+
+ def __repr__(self):
+ return str(self.var)
class VariableJsonAccessor:
def __init__(self):
- pass
+ self.var = None
def __getattr__(self, item):
- return Variable.get(item, deserialize_json=True)
+ self.var = Variable.get(item, deserialize_json=True)
+ return self.var
+
+ def __repr__(self):
+ return str(self.var)
return {
'dag': task.dag,
[2/2] incubator-airflow git commit: Merge remote-tracking branch
'apache/master'
Posted by bo...@apache.org.
Merge remote-tracking branch 'apache/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/aea1fa2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/aea1fa2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/aea1fa2d
Branch: refs/heads/master
Commit: aea1fa2d653c5dde236cc82022cf0db0cde59856
Parents: 3079da0 c32452a
Author: Bolke de Bruin <bo...@xs4all.nl>
Authored: Thu Jul 14 20:07:58 2016 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Thu Jul 14 20:07:58 2016 +0200
----------------------------------------------------------------------
README.md | 1 +
airflow/bin/cli.py | 1 +
airflow/configuration.py | 1 +
.../auth/backends/github_enterprise_auth.py | 1 +
airflow/contrib/auth/backends/ldap_auth.py | 1 +
airflow/contrib/auth/backends/password_auth.py | 1 +
airflow/contrib/hooks/datastore_hook.py | 1 +
airflow/contrib/hooks/qubole_hook.py | 1 +
airflow/contrib/hooks/spark_sql_hook.py | 149 +++++++++++++++++++
airflow/contrib/hooks/vertica_hook.py | 1 +
airflow/contrib/operators/bigquery_operator.py | 1 +
.../contrib/operators/bigquery_to_bigquery.py | 1 +
airflow/contrib/operators/bigquery_to_gcs.py | 1 +
airflow/contrib/operators/fs_operator.py | 1 +
.../contrib/operators/gcs_download_operator.py | 1 +
airflow/contrib/operators/gcs_to_bq.py | 1 +
airflow/contrib/operators/mysql_to_gcs.py | 1 +
airflow/contrib/operators/spark_sql_operator.py | 91 +++++++++++
airflow/contrib/operators/vertica_to_hive.py | 1 +
.../example_branch_python_dop_operator_3.py | 1 +
.../example_passing_params_via_test_command.py | 1 +
airflow/example_dags/example_xcom.py | 3 +
airflow/exceptions.py | 11 +-
airflow/hooks/__init__.py | 1 +
airflow/hooks/druid_hook.py | 1 +
airflow/hooks/mysql_hook.py | 1 +
.../versions/13eb55f81627_for_compatibility.py | 4 +-
.../versions/211e584da130_add_ti_state_index.py | 1 +
...e90f54d61_more_logging_into_task_isntance.py | 1 +
.../versions/4446e08588_dagrun_start_end.py | 1 +
airflow/operators/__init__.py | 1 +
airflow/operators/hive_to_mysql.py | 1 +
airflow/plugins_manager.py | 3 +
airflow/security/kerberos.py | 1 +
airflow/security/utils.py | 1 +
airflow/utils/helpers.py | 1 +
airflow/utils/logging.py | 2 +-
airflow/www/app.py | 2 +
airflow/www/utils.py | 1 +
airflow/www/views.py | 1 +
40 files changed, 288 insertions(+), 9 deletions(-)
----------------------------------------------------------------------