Skip to content
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

Fixing make docs issue #25799

Merged
merged 2 commits into from Jan 5, 2021
Merged

Fixing make docs issue #25799

merged 2 commits into from Jan 5, 2021

Conversation

awais786
Copy link
Contributor

@awais786 awais786 commented Dec 8, 2020

make docs command fixed in this PR.

Added constraint 3.3.4 was giving error.
sphinx-doc/sphinx#8568

Ticket added for tracking here


HTML generated

Screen Shot 2020-12-29 at 4 34 14 PM

@@ -282,7 +282,7 @@ def on_init(app): # pylint: disable=unused-argument
apidoc_path = os.path.join(bin_path, apidoc_path)
exclude_dirs = ['envs', 'migrations', 'test', 'tests']
exclude_dirs.extend(cms_djangoapps)
exclude_dirs.extend(lms_djangoapps)
Copy link
Contributor Author

@awais786 awais786 Dec 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lms_djangoapps was removed in this commit.
but its reference remains.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect we can rip out all this out pretty soon, but probably best to wait until the sys.path hack removal is fully complete.

@awais786
Copy link
Contributor Author

awais786 commented Dec 8, 2020

Latest issue is coming due to event_routing_backends

Running Sphinx v3.3.1

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/edx/app/edxapp/edx-platform/docs/guides/conf.py", line 43, in <module>
    django.setup()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/event_routing_backends/apps.py", line 21, in ready
    from event_routing_backends.processors.caliper import event_transformers
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/event_routing_backends/processors/caliper/event_transformers/__init__.py", line 4, in <module>
    from event_routing_backends.processors.caliper.event_transformers.enrollment_events import EnrollmentEventTransformers
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/event_routing_backends/processors/caliper/event_transformers/enrollment_events.py", line 8, in <module>
    from event_routing_backends.processors.caliper.transformer import CaliperTransformer
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/event_routing_backends/processors/caliper/transformer.py", line 12, in <module>
    from student.models import anonymous_id_for_user  # pylint: disable=import-error
  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/models.py", line 130, in <module>
    class AnonymousUserId(models.Model):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/models/base.py", line 108, in __new__
    raise RuntimeError(
RuntimeError: Model class student.models.AnonymousUserId doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

@@ -282,7 +282,7 @@ def on_init(app): # pylint: disable=unused-argument
apidoc_path = os.path.join(bin_path, apidoc_path)
exclude_dirs = ['envs', 'migrations', 'test', 'tests']
exclude_dirs.extend(cms_djangoapps)
exclude_dirs.extend(lms_djangoapps)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect we can rip out all this out pretty soon, but probably best to wait until the sys.path hack removal is fully complete.

@awais786
Copy link
Contributor Author

make docs still failing. I have added a complete traceback ^^

@jmbowman
Copy link
Contributor

The issue with event_routing_backends has been fixed on master, but after rebasing I now get a similar error in edx-enterprise. This is all due to the sys.path hacks, maybe we should just wait to fix the docs command until the removal of those is complete?

@@ -41,6 +41,8 @@
'contentstore.apps.ContentstoreConfig',
'cms.djangoapps.course_creators',
'xblock_config.apps.XBlockConfig',
'user_tasks',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defined in lms/envs/common.py also.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Dave added that just 2 weeks ago in https://github.com/edx/edx-platform/pull/25933 .

@awais786 awais786 marked this pull request as ready for review December 30, 2020 06:46
'lms.djangoapps.lti_provider'
])


COMMON_TEST_DATA_ROOT = ''
Copy link
Contributor Author

@awais786 awais786 Dec 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise undefined var error appeared.

@awais786
Copy link
Contributor Author

jenkins run python

@awais786
Copy link
Contributor Author

jenkins run all

1 similar comment
@awais786
Copy link
Contributor Author

jenkins run all

@awais786
Copy link
Contributor Author

awais786 commented Jan 5, 2021

@jmbowman Please review.

Adding constraint on sphinx.
@@ -136,3 +136,6 @@ sympy==1.6.2

# cryptography 3.3.1 started failing tests on sandbox because it dropped support for python3.5
cryptography==3.2.1

# greater versions breaking the code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please write a ticket summarizing the problem with newer versions and link to it from here? Also, it looks like the docs requirements file hasn't been updated accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, its due to conflicts. make upgrade in progress right now.

@@ -41,6 +41,8 @@
'contentstore.apps.ContentstoreConfig',
'cms.djangoapps.course_creators',
'xblock_config.apps.XBlockConfig',
'user_tasks',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Dave added that just 2 weeks ago in https://github.com/edx/edx-platform/pull/25933 .

@@ -7,7 +7,7 @@

from openedx.core.djangoapps.theming.helpers import get_current_request

from .models import (
from common.djangoapps.third_party_auth.models import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be harmless, but why was it needed?

Copy link
Contributor Author

@awais786 awais786 Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was giving error during make docs command. I will add the complete traceback

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmbowman Otherwise this error appears

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/edx/app/edxapp/edx-platform/docs/guides/conf.py", line 43, in <module>
    django.setup()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/integrated_channels/sap_success_factors/models.py", line 18, in <module>
    from integrated_channels.sap_success_factors.exporters.learner_data import (
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/integrated_channels/sap_success_factors/exporters/learner_data.py", line 14, in <module>
    from enterprise.tpa_pipeline import get_user_from_social_auth
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/tpa_pipeline.py", line 23, in <module>
    from third_party_auth.provider import Registry
  File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/provider.py", line 10, in <module>
    from .models import (
  File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/models.py", line 338, in <module>
    class OAuth2ProviderConfig(ProviderConfig):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/models/base.py", line 316, in __new__
    new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/apps/registry.py", line 227, in register_model
    raise RuntimeError(
RuntimeError: Conflicting 'oauth2providerconfig' models in application 'third_party_auth': <class 'common.djangoapps.third_party_auth.models.OAuth2ProviderConfig'> and <class 'third_party_auth.models.OAuth2ProviderConfig'>.

@awais786 awais786 merged commit 44d97d7 into master Jan 5, 2021
@awais786 awais786 deleted the awais786/make-docs branch January 5, 2021 20:09
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants