Skip to content

Sometimes our tests fail with undefined symbol: GENERAL_NAME_free #46430

@potiuk

Description

@potiuk

Sometimes our tests fail with this error that indicates mismatch between libSSL that is embedded in psycopg2 and the one available in the system. Given that this appears very rarely and randomly, and that we are using containers for all the runs, it looks like it is environmental and likely related to Kernel Version used at the Github Runners we get.

It should eventually go away (hopefully) - it's hard to think about remediation if that's the real root cause.

==================================== ERRORS ====================================
____ ERROR collecting tests/provider_tests/postgres/assets/test_postgres.py ____
ImportError while importing test module '/opt/airflow/providers/postgres/tests/provider_tests/postgres/assets/test_postgres.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
providers/postgres/tests/provider_tests/postgres/assets/test_postgres.py:24: in <module>
    from airflow.providers.postgres.assets.postgres import sanitize_uri
airflow/__init__.py:78: in <module>
    settings.initialize()
airflow/settings.py:642: in initialize
    configure_orm()
airflow/settings.py:366: in configure_orm
    engine = create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args, future=True)
/usr/local/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py:309: in warned
    return fn(*args, **kwargs)
/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py:560: in create_engine
    dbapi = dialect_cls.dbapi(**dbapi_args)
/usr/local/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py:782: in dbapi
    import psycopg2
/usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:51: in <module>
    from psycopg2._psycopg import (                     # noqa
E   ImportError: /usr/local/lib/python3.12/site-packages/psycopg2/_psycopg.cpython-312-x86_64-linux-gnu.so: undefined symbol: GENERAL_NAME_free
___ ERROR collecting tests/provider_tests/postgres/dialects/test_postgres.py ___
/usr/local/lib/python3.12/logging/config.py:105: in _resolve
    found = getattr(found, n)
E   AttributeError: partially initialized module 'airflow' has no attribute 'utils' (most likely due to a circular import)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions