wolfier opened a new issue #17453:
URL: https://github.com/apache/airflow/issues/17453


   **Apache Airflow version**: 2.1.0 or really any Airflow versions
   
   **What happened**:
   
   When I try to install the snowflake provider, the version of SQLAlchemy also 
get upgraded. Due to the dependency of packages installed by the snowflake 
provider, more specifically the requirements of snowflake-sqlalchemy, 
SQLAlchemy is forced toe upgraded.
   
   This upgrade caused some issues with the webserver startup, which generated 
this unhelpful error log.
   
   ```
   [2021-08-04 19:37:45,566] {abstract.py:229} ERROR - Failed to add operation 
for GET /api/v1/connections
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apis/abstract.py",
 line 209, in add_paths
       self.add_operation(path, method)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apis/abstract.py",
 line 173, in add_operation
       pass_context_arg_name=self.pass_context_arg_name
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/operations/__init__.py",
 line 8, in make_operation
       return spec.operation_cls.from_spec(spec, *args, **kwargs)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/operations/openapi.py",
 line 138, in from_spec
       **kwargs
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/operations/openapi.py",
 line 89, in __init__
       pass_context_arg_name=pass_context_arg_name
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/operations/abstract.py",
 line 96, in __init__
       self._resolution = resolver.resolve(self)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/resolver.py", 
line 40, in resolve
       return Resolution(self.resolve_function_from_operation_id(operation_id), 
operation_id)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/resolver.py", 
line 66, in resolve_function_from_operation_id
       raise ResolverError(str(e), sys.exc_info())
   airflow._vendor.connexion.exceptions.ResolverError: <ResolverError: columns>
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/usr/local/bin/airflow", line 8, in <module>
       sys.exit(main())
     File "/usr/local/lib/python3.7/site-packages/airflow/__main__.py", line 
40, in main
       args.func(args)
     File "/usr/local/lib/python3.7/site-packages/airflow/cli/cli_parser.py", 
line 48, in command
       return func(*args, **kwargs)
     File "/usr/local/lib/python3.7/site-packages/airflow/utils/cli.py", line 
91, in wrapper
       return f(*args, **kwargs)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/cli/commands/sync_perm_command.py",
 line 26, in sync_perm
       appbuilder = cached_app().appbuilder  # pylint: disable=no-member
     File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line 
146, in cached_app
       app = create_app(config=config, testing=testing)
     File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line 
130, in create_app
       init_api_connexion(flask_app)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/www/extensions/init_views.py", 
line 186, in init_api_connexion
       specification='v1.yaml', base_path=base_path, validate_responses=True, 
strict_validation=True
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apps/flask_app.py",
 line 57, in add_api
       api = super(FlaskApp, self).add_api(specification, **kwargs)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apps/abstract.py",
 line 156, in add_api
       options=api_options.as_dict())
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apis/abstract.py",
 line 111, in __init__
       self.add_paths()
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apis/abstract.py",
 line 216, in add_paths
       self._handle_add_operation_error(path, method, err.exc_info)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/apis/abstract.py",
 line 231, in _handle_add_operation_error
       raise value.with_traceback(traceback)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/resolver.py", 
line 61, in resolve_function_from_operation_id
       return self.function_resolver(operation_id)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/_vendor/connexion/utils.py", 
line 111, in get_function_from_name
       module = importlib.import_module(module_name)
     File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in 
import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
     File "<frozen importlib._bootstrap>", line 983, in _find_and_load
     File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
     File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
     File "<frozen importlib._bootstrap_external>", line 728, in exec_module
     File "<frozen importlib._bootstrap>", line 219, in 
_call_with_frames_removed
     File 
"/usr/local/lib/python3.7/site-packages/airflow/api_connexion/endpoints/connection_endpoint.py",
 line 26, in <module>
       from airflow.api_connexion.schemas.connection_schema import (
     File 
"/usr/local/lib/python3.7/site-packages/airflow/api_connexion/schemas/connection_schema.py",
 line 42, in <module>
       class ConnectionSchema(ConnectionCollectionItemSchema):  # pylint: 
disable=too-many-ancestors
     File "/usr/local/lib/python3.7/site-packages/marshmallow/schema.py", line 
117, in __new__
       dict_cls=dict_cls,
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py",
 line 94, in get_declared_fields
       fields.update(mcs.get_auto_fields(fields, converter, opts, dict_cls))
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py",
 line 108, in get_auto_fields
       for field_name, field in fields.items()
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py",
 line 110, in <dictcomp>
       and field_name not in opts.exclude
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py",
 line 28, in create_field
       return converter.field_for(model, column_name, **self.field_kwargs)
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/convert.py", 
line 171, in field_for
       return self.property2field(prop, **kwargs)
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/convert.py", 
line 146, in property2field
       field_class = field_class or self._get_field_class_for_property(prop)
     File 
"/usr/local/lib/python3.7/site-packages/marshmallow_sqlalchemy/convert.py", 
line 210, in _get_field_class_for_property
       column = prop.columns[0]
     File 
"/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 
1240, in __getattr__
       return self._fallback_getattr(key)
     File 
"/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 
1214, in _fallback_getattr
       raise AttributeError(key)
   AttributeError: columns
   ```
   
   **What you expected to happen**:
   
   I expect to install a provider package without needing to worry about it 
breaking Airflow's dependency. Providers are suppose to be Airflow version 
agnostic post 2.0. 
   
   **How to reproduce it**:
   
   Install any version of the snowflake provider package.
   ```
   apache-airflow-providers-snowflake
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to