Skip to content

xmlsec version mismatch issue #36305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
taimoor-ahmed-1 opened this issue Feb 26, 2025 · 2 comments
Open

xmlsec version mismatch issue #36305

taimoor-ahmed-1 opened this issue Feb 26, 2025 · 2 comments
Labels
bug Report of or fix for something that isn't working as intended

Comments

@taimoor-ahmed-1
Copy link
Contributor

I have been getting an error in pylint tests when opening a PR for open-release/sumac.master branch. This is the stack trace:

Run pylint lms/djangoapps/badges/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/
Traceback (most recent call last):
************* Module /home/runner/work/edx-platform/edx-platform/pylintrc
  File "/opt/hostedtoolcache/Python/3.[11](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:12).11/x64/lib/python3.11/site-packages/pylint_django/checkers/foreign_key_strings.py", line 87, in open
    django.setup()
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/__init__.py", line 19, in setup
pylintrc:1:0: W00[12](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:13): Unknown option value for '--disable', expected a valid pylint message and got 'broad-exception-raised' (unknown-option-value)
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/conf/__init__.py", line 102, in __getattr__
    self._setup(name)
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/conf/__init__.py", line 82, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.11/x64/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
             ^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/__init__.py", line 35, in run_pylint
    PylintRun(argv or sys.argv[1:])
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/lint/run.py", line 212, in __init__
    linter.check(args)
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 694, in check
    with self._astroid_module_checker() as check_astroid_module:
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/contextlib.py", line [13](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:14)7, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 990, in _astroid_module_checker
    checker.open()
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pylint_django/checkers/foreign_key_strings.py", line 1[14](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:15), in open
    django.setup()
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/bulk_email/models.py", line 22, in <module>
    from openedx.core.djangoapps.course_groups.cohorts import get_cohort_by_name
  File "/home/runner/work/edx-platform/edx-platform/openedx/core/djangoapps/course_groups/cohorts.py", line 21, in <module>
    from lms.djangoapps.courseware import courses
  File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/courseware/courses.py", line 28, in <module>
    from lms.djangoapps.course_blocks.api import get_course_blocks
  File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/course_blocks/api.py", line 13, in <module>
    from openedx.features.content_type_gating.block_transformers import ContentTypeGateTransformer
  File "/home/runner/work/edx-platform/edx-platform/openedx/features/content_type_gating/block_transformers.py", line 9, in <module>
    from lms.djangoapps.course_blocks.transformers.user_partitions import UserPartitionTransformer
  File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/course_blocks/transformers/user_partitions.py", line 6, in <module>
    from lms.djangoapps.courseware.access import has_access
  File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/courseware/access.py", line 31, in <module>
    from lms.djangoapps.courseware.access_utils import (
  File "/home/runner/work/edx-platform/edx-platform/lms/djangoapps/courseware/access_utils.py", line 12, in <module>
    from enterprise.models import EnterpriseCourseEnrollment, EnterpriseCustomerUser
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/enterprise/models.py", line 43, in <module>
    from enterprise import utils
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/enterprise/utils.py", line 1[15](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:16), in <module>
    from common.djangoapps.third_party_auth.provider import Registry
  File "/home/runner/work/edx-platform/edx-platform/common/djangoapps/third_party_auth/provider.py", line 10, in <module>
    from common.djangoapps.third_party_auth.models import (
  File "/home/runner/work/edx-platform/edx-platform/common/djangoapps/third_party_auth/models.py", line 21, in <module>
    from social_core.backends.saml import SAMLAuth
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/social_core/backends/saml.py", line 13, in <module>
    from onelogin.saml2.auth import OneLogin_Saml2_Auth
  File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/onelogin/saml2/auth.py", line 12, in <module>
    import xmlsec
xmlsec.Error: ([19](https://github.com/openedx/edx-platform/actions/runs/13544784081/job/37853666900?pr=36274#step:8:20), 'xmlsec library version mismatch.')

This seems to originate from the social-auth-core package but I am unable to resolve it. Any help would be appreciated.

@taimoor-ahmed-1 taimoor-ahmed-1 added the bug Report of or fix for something that isn't working as intended label Feb 26, 2025
@dianakhuang
Copy link
Contributor

I wonder if this is related to this issue: #35264

@Cup0fCoffee
Copy link
Contributor

I ran into a similar issue when running GitHub checks on a fork. I did try to dig a bit into it, but couldn't fully figure it out. I was able to resolve it by cherry-picking these commits from the master branch onto our fork - 642dae6.

Check this PR for more details - #35713.

I tried to dig into it more, and go some way through, but I don't have the confidence to say what's causing the issue. The workflows were working fine for us until a few days ago, which is a bit puzzling. It might make sense to backport this commit to open-release/sumac.master, but I think Sumac is promissed to run on ubuntu-22.04, and this commit bumps up the os to ubuntu-24.04 for checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

3 participants