From 4a28fdaa22a4c2732c06d41e046a74070e8a3ae5 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 6 Mar 2019 11:10:10 -0500 Subject: [PATCH] Remove skip submodules flag Now we have a way of skip submodules (using a configuration file). We should notify users that have a feature flag to migrate. --- docs/guides/feature-flags.rst | 2 -- readthedocs/projects/models.py | 3 +-- readthedocs/rtd_tests/tests/test_backend.py | 7 ------- readthedocs/vcs_support/backends/git.py | 7 +------ 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/docs/guides/feature-flags.rst b/docs/guides/feature-flags.rst index 91ba814356b..b1848b23389 100644 --- a/docs/guides/feature-flags.rst +++ b/docs/guides/feature-flags.rst @@ -20,8 +20,6 @@ Available Flags ``PIP_ALWAYS_UPGRADE``: :featureflags:`PIP_ALWAYS_UPGRADE` -``SKIP_SUBMODULES``: :featureflags:`SKIP_SUBMODULES` - ``DONT_OVERWRITE_SPHINX_CONTEXT``: :featureflags:`DONT_OVERWRITE_SPHINX_CONTEXT` ``MKDOCS_THEME_RTD``: :featureflags:`MKDOCS_THEME_RTD` diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 5991a41bb14..3341de36924 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1307,7 +1307,6 @@ def add_features(sender, **kwargs): USE_SETUPTOOLS_LATEST = 'use_setuptools_latest' ALLOW_DEPRECATED_WEBHOOKS = 'allow_deprecated_webhooks' PIP_ALWAYS_UPGRADE = 'pip_always_upgrade' - SKIP_SUBMODULES = 'skip_submodules' DONT_OVERWRITE_SPHINX_CONTEXT = 'dont_overwrite_sphinx_context' MKDOCS_THEME_RTD = 'mkdocs_theme_rtd' API_LARGE_DATA = 'api_large_data' @@ -1319,7 +1318,7 @@ def add_features(sender, **kwargs): (USE_SETUPTOOLS_LATEST, _('Use latest version of setuptools')), (ALLOW_DEPRECATED_WEBHOOKS, _('Allow deprecated webhook views')), (PIP_ALWAYS_UPGRADE, _('Always run pip install --upgrade')), - (SKIP_SUBMODULES, _('Skip git submodule checkout')), ( + ( DONT_OVERWRITE_SPHINX_CONTEXT, _( 'Do not overwrite context vars in conf.py with Read the Docs context', diff --git a/readthedocs/rtd_tests/tests/test_backend.py b/readthedocs/rtd_tests/tests/test_backend.py index 5618dd92151..12daf1f768c 100644 --- a/readthedocs/rtd_tests/tests/test_backend.py +++ b/readthedocs/rtd_tests/tests/test_backend.py @@ -148,13 +148,6 @@ def test_skip_submodule_checkout(self): repo.update() repo.checkout('submodule') self.assertTrue(repo.are_submodules_available(self.dummy_conf)) - fixture.get( - Feature, - projects=[self.project], - feature_id=Feature.SKIP_SUBMODULES, - ) - self.assertTrue(self.project.has_feature(Feature.SKIP_SUBMODULES)) - self.assertFalse(repo.are_submodules_available(self.dummy_conf)) def test_use_shallow_clone(self): repo = self.project.vcs_repo() diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index aa3adc6c2bc..7b374ad9a78 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -68,15 +68,10 @@ def repo_exists(self): def are_submodules_available(self, config): """Test whether git submodule checkout step should be performed.""" - # TODO remove this after users migrate to a config file - from readthedocs.projects.models import Feature submodules_in_config = ( config.submodules.exclude != ALL or config.submodules.include ) - if ( - self.project.has_feature(Feature.SKIP_SUBMODULES) or - not submodules_in_config - ): + if not submodules_in_config: return False # Keep compatibility with previous projects