Daniel Lamblin created AIRFLOW-2337:
---------------------------------------
Summary: Broken Import Variables
Key: AIRFLOW-2337
URL: https://issues.apache.org/jira/browse/AIRFLOW-2337
Project: Apache Airflow
Issue Type: Bug
Components: db
Affects Versions: 1.9.0
Reporter: Daniel Lamblin
Importing variables that were encrypted seems to have produced a far too long
parameter value.
Using the UI in v1.8.2 I selected all variables, then with selected exported
them.
This produced a json file. it is only 1617 bytes in size total with 26
variables.
Using the UI in v1.9.0 I selected the file and clicked to import variables.
…/admin/airflow/varimport
gave me the error:
(BTW the frontarch_testdate was supposed to be set to 20171201 (it was not
quoted in the json).
h2. Ooops.
{code}
____/ ( ( ) ) \___
/( ( ( ) _ )) ) )\
Can this be briefer and cheerier?
(_((__(_(__(( ( ( | ) ) ) )_))__))_)___)
((__) \\||lll|l||/// \_))
( /(/ ( ) ) )\ )
( ( ( ( | | ) ) )\ )
( /(| / ( )) ) ) )) )
( ( ((((_(|)_))))) )
( ||\(|(|)|/|| )
( |(||(||)|||| )
( //|/l|||)|\\ \ )
(/ / // /|//||||\\ \ \ \ _)
-------------------------------------------------------------------------------
Node: 90f7f5d06c61
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in
wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in
full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in
handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in
full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in
dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 69,
in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 368,
in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 758, in
decorated_view
return func(*args, **kwargs)
File "/pang/service/airflow/airflow-src/airflow/www/utils.py", line 262, in
wrapper
return f(*args, **kwargs)
File "/pang/service/airflow/airflow-src/airflow/www/views.py", line 1787, in
varimport
models.Variable.set(k, v, serialize_json=isinstance(v, dict))
File "/pang/service/airflow/airflow-src/airflow/utils/db.py", line 55, in
wrapper
result = func(*args, **kwargs)
File "/pang/service/airflow/airflow-src/airflow/models.py", line 4031, in set
session.query(cls).filter(cls.key == key).delete()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line
3236, in delete
delete_op.exec_()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py",
line 1326, in exec_
self._do_exec()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py",
line 1518, in _do_exec
self._execute_stmt(delete_stmt)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py",
line 1333, in _execute_stmt
mapper=self.mapper)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line
1176, in execute
bind, close_with_result=True).execute(clause, params or {})
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line
1040, in _connection_for_bind
engine, execution_options)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line
388, in _connection_for_bind
self._assert_active()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line
276, in _assert_active
% self._rollback_exception
InvalidRequestError: This Session's transaction has been rolled back due to a
previous exception during flush. To begin a new transaction with this Session,
first issue Session.rollback(). Original exception was:
(_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL:
u'INSERT INTO variable (`key`, val, is_encrypted) VALUES (%s, %s, %s)']
[parameters: (u'frontarch_testdate',
u'gAAAAABa1wmXHtv6__5O-yvMn4PHiv_I9OPR4aLb0UKI9a-zS6SRJ3mNhR9gDC3_4siNZzUfTIwwt_FD-HASqtYVbU4rnlpfxhkoDC2g93bb73GUsgorKzfoEZFCOF_bDBB6HRTyUJ3y9rs2hyxM
... (26894735 characters truncated) ...
ZRgN9HM4H7f6geAGdr20oR0fjVQyTy9-6S5eF7PEWN17Xa7CrPDob4NMvf0_AGylOUXc0xO9gmg2gbt-FWVh8QI9YK7J3N-CA9shHHX47iVegCq-4ofAmAgIHCBQ8exYS1CsM6LJn7orZAwedOG8=',
1)] (Background on this error at: http://sqlalche.me/e/e3q8){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)