From 6c0756f5134d03c688ec7f11e2b2971a2a98cbf9 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 7 Oct 2024 09:49:03 +0200 Subject: [PATCH] Addons: remove "enabled by default" notification --- docs/user/addons.rst | 5 ---- readthedocs/projects/tasks/builds.py | 7 ----- .../projects/tests/test_build_tasks.py | 29 ++++++++----------- 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/docs/user/addons.rst b/docs/user/addons.rst index 1468b24df50..a648e615aa8 100644 --- a/docs/user/addons.rst +++ b/docs/user/addons.rst @@ -38,11 +38,6 @@ All projects using ``mkdocs`` :ref:`mkdocs ` or the ``bui #. Go to :guilabel:`Settings`, then in the left bar, go to :guilabel:`Addons`. #. Check :guilabel:`Enable Addons`, and then configure each Addon individually. -.. note:: - - Read the Docs Addons will be enabled by default for all Read the Docs projects on October 7th. - Read the full announcement in our `blog post `_. - Configuring Read the Docs Addons -------------------------------- diff --git a/readthedocs/projects/tasks/builds.py b/readthedocs/projects/tasks/builds.py index 53fd3c21e08..156c3988b7a 100644 --- a/readthedocs/projects/tasks/builds.py +++ b/readthedocs/projects/tasks/builds.py @@ -56,7 +56,6 @@ MkDocsYAMLParseError, ) from readthedocs.projects.models import Feature -from readthedocs.projects.notifications import MESSAGE_PROJECT_ADDONS_BY_DEFAULT from readthedocs.storage import build_media_storage from readthedocs.telemetry.collectors import BuildDataCollector from readthedocs.telemetry.tasks import save_build_data @@ -820,12 +819,6 @@ def execute(self): self.update_build(state=BUILD_STATE_BUILDING) self.data.build_director.run_build_commands() else: - # Temporal notification while we migrate to addons enabled by default. - if self.data.build_director.is_type_sphinx(): - self.data.build_director.attach_notification( - MESSAGE_PROJECT_ADDONS_BY_DEFAULT - ) - # Installing self.update_build(state=BUILD_STATE_INSTALLING) self.data.build_director.setup_environment() diff --git a/readthedocs/projects/tests/test_build_tasks.py b/readthedocs/projects/tests/test_build_tasks.py index 916afb42cdd..71dc7097418 100644 --- a/readthedocs/projects/tests/test_build_tasks.py +++ b/readthedocs/projects/tests/test_build_tasks.py @@ -535,11 +535,8 @@ def test_successful_build( "builder": mock.ANY, } - # NOTE: `request_history[5]` is a temporal notification that will be removed after October 7th - # https://github.com/readthedocs/readthedocs.org/pull/11514 - # Update build state: installing - assert self.requests_mock.request_history[6].json() == { + assert self.requests_mock.request_history[5].json() == { "id": 1, "state": "installing", "commit": "a1b2c3", @@ -602,7 +599,7 @@ def test_successful_build( }, } # Update build state: building - assert self.requests_mock.request_history[7].json() == { + assert self.requests_mock.request_history[6].json() == { "id": 1, "state": "building", "commit": "a1b2c3", @@ -612,7 +609,7 @@ def test_successful_build( "error": "", } # Update build state: uploading - assert self.requests_mock.request_history[8].json() == { + assert self.requests_mock.request_history[7].json() == { "id": 1, "state": "uploading", "commit": "a1b2c3", @@ -622,9 +619,9 @@ def test_successful_build( "error": "", } # Update version state - assert self.requests_mock.request_history[9]._request.method == "PATCH" - assert self.requests_mock.request_history[9].path == "/api/v2/version/1/" - assert self.requests_mock.request_history[9].json() == { + assert self.requests_mock.request_history[8]._request.method == "PATCH" + assert self.requests_mock.request_history[8].path == "/api/v2/version/1/" + assert self.requests_mock.request_history[8].json() == { "addons": False, "build_data": None, "built": True, @@ -634,13 +631,11 @@ def test_successful_build( "has_htmlzip": True, } # Set project has valid clone - assert self.requests_mock.request_history[10]._request.method == "PATCH" - assert self.requests_mock.request_history[10].path == "/api/v2/project/1/" - assert self.requests_mock.request_history[10].json() == { - "has_valid_clone": True - } + assert self.requests_mock.request_history[9]._request.method == "PATCH" + assert self.requests_mock.request_history[9].path == "/api/v2/project/1/" + assert self.requests_mock.request_history[9].json() == {"has_valid_clone": True} # Update build state: finished, success and builder - assert self.requests_mock.request_history[11].json() == { + assert self.requests_mock.request_history[10].json() == { "id": 1, "state": "finished", "commit": "a1b2c3", @@ -652,8 +647,8 @@ def test_successful_build( "error": "", } - assert self.requests_mock.request_history[12]._request.method == "POST" - assert self.requests_mock.request_history[12].path == "/api/v2/revoke/" + assert self.requests_mock.request_history[11]._request.method == "POST" + assert self.requests_mock.request_history[11].path == "/api/v2/revoke/" assert BuildData.objects.all().exists()