Cannot edit spark_default connection
MinuraPunchihewa opened this issue · 3 comments
MinuraPunchihewa commented
I cannot seem to edit the spark_default from the Airflow UI. Is there any way that this can be done?
I keep seeing this,
____/ ( ( ) ) \___
/( ( ( ) _ )) ) )\
(( ( )( ) ) ( ) )
((/ ( _( ) ( _) ) ( () ) )
( ( ( (_) (( ( ) .((_ ) . )_
( ( ) ( ( ) ) ) . ) ( )
( ( ( ( ) ( _ ( _) ). ) . ) ) ( )
( ( ( ) ( ) ( )) ) _)( ) ) )
( ( ( \ ) ( (_ ( ) ( ) ) ) ) )) ( )
( ( ( ( (_ ( ) ( _ ) ) ( ) ) )
( ( ( ( ( ) (_ ) ) ) _) ) _( ( )
(( ( )( ( _ ) _) _(_ ( (_ )
(_((__(_(__(( ( ( | ) ) ) )_))__))_)___)
((__) \\||lll|l||/// \_))
( /(/ ( ) ) )\ )
( ( ( ( | | ) ) )\ )
( /(| / ( )) ) ) )) )
( ( ((((_(|)_))))) )
( ||\(|(|)|/|| )
( |(||(||)|||| )
( //|/l|||)|\\ \ )
(/ / // /|//||||\\ \ \ \ _)
-------------------------------------------------------------------------------
Node: 5fce0b10ba4b
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/model/base.py", line 2138, in edit_view
form = self.edit_form(obj=model)
File "/usr/local/lib/python3.6/site-packages/flask_admin/model/base.py", line 1340, in edit_form
return self._edit_form_class(get_form_data(), obj=obj)
File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 208, in __call__
return type.__call__(cls, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/form/__init__.py", line 16, in __init__
super(BaseForm, self).__init__(formdata=formdata, obj=obj, prefix=prefix, **kwargs)
File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 274, in __init__
self.process(formdata, obj, data=data, **kwargs)
File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 126, in process
if obj is not None and hasattr(obj, name):
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 356, in __get__
retval = self.descriptor.__get__(instance, owner)
File "/usr/local/lib/python3.6/site-packages/airflow/models/connection.py", line 212, in get_extra
return fernet.decrypt(bytes(self._extra, 'utf-8')).decode()
File "/usr/local/lib/python3.6/site-packages/cryptography/fernet.py", line 199, in decrypt
raise InvalidToken
cryptography.fernet.InvalidToken
TranBinhLuatUIT commented
I cannot seem to edit the spark_default from the Airflow UI. Is there any way that this can be done? I keep seeing this,
____/ ( ( ) ) \___ /( ( ( ) _ )) ) )\ (( ( )( ) ) ( ) ) ((/ ( _( ) ( _) ) ( () ) ) ( ( ( (_) (( ( ) .((_ ) . )_ ( ( ) ( ( ) ) ) . ) ( ) ( ( ( ( ) ( _ ( _) ). ) . ) ) ( ) ( ( ( ) ( ) ( )) ) _)( ) ) ) ( ( ( \ ) ( (_ ( ) ( ) ) ) ) )) ( ) ( ( ( ( (_ ( ) ( _ ) ) ( ) ) ) ( ( ( ( ( ) (_ ) ) ) _) ) _( ( ) (( ( )( ( _ ) _) _(_ ( (_ ) (_((__(_(__(( ( ( | ) ) ) )_))__))_)___) ((__) \\||lll|l||/// \_)) ( /(/ ( ) ) )\ ) ( ( ( ( | | ) ) )\ ) ( /(| / ( )) ) ) )) ) ( ( ((((_(|)_))))) ) ( ||\(|(|)|/|| ) ( |(||(||)|||| ) ( //|/l|||)|\\ \ ) (/ / // /|//||||\\ \ \ \ _) ------------------------------------------------------------------------------- Node: 5fce0b10ba4b ------------------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 69, in inner return self._run_view(f, *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 368, in _run_view return fn(self, *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/flask_admin/model/base.py", line 2138, in edit_view form = self.edit_form(obj=model) File "/usr/local/lib/python3.6/site-packages/flask_admin/model/base.py", line 1340, in edit_form return self._edit_form_class(get_form_data(), obj=obj) File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 208, in __call__ return type.__call__(cls, *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/flask_admin/form/__init__.py", line 16, in __init__ super(BaseForm, self).__init__(formdata=formdata, obj=obj, prefix=prefix, **kwargs) File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 274, in __init__ self.process(formdata, obj, data=data, **kwargs) File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 126, in process if obj is not None and hasattr(obj, name): File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 356, in __get__ retval = self.descriptor.__get__(instance, owner) File "/usr/local/lib/python3.6/site-packages/airflow/models/connection.py", line 212, in get_extra return fernet.decrypt(bytes(self._extra, 'utf-8')).decode() File "/usr/local/lib/python3.6/site-packages/cryptography/fernet.py", line 199, in decrypt raise InvalidToken cryptography.fernet.InvalidToken
I have the same error. I just delete it and create a new "spark-default". It works for me.
MinuraPunchihewa commented
Yeah, that is what I resorted to in the end as well. Is there any way to do this during start up? Say, by running a script?
iaSalazar commented
I have the same problem i have tried installing manually pyspark and spark with --build-arg ADDITIONAL_AIRFLOW_EXTRAS and i still get the same result.
If i try to create a new connection there is no Spark connection type option.
Any idea?