Skip to content

Commit 7274123

Browse files
authored
Merge pull request #7366 from readthedocs/hotfix/skip-sync-version
Add feature flag to just skip the sync version task entirely
2 parents 2201657 + 206f8e4 commit 7274123

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

readthedocs/core/views/hooks.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from readthedocs.builds.constants import EXTERNAL
66
from readthedocs.core.utils import trigger_build
7-
from readthedocs.projects.models import Project
7+
from readthedocs.projects.models import Project, Feature
88
from readthedocs.projects.tasks import sync_repository_task
99

1010

@@ -95,6 +95,10 @@ def trigger_sync_versions(project):
9595
log.info('Unable to sync from %s version', version_identifier)
9696
return None
9797

98+
if project.has_feature(Feature.SKIP_SYNC_VERSIONS):
99+
log.info('Skipping sync versions for project: project=%s', project.slug)
100+
return None
101+
98102
options = {}
99103
if project.build_queue:
100104
# respect the queue for this project

readthedocs/projects/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,7 @@ def add_features(sender, **kwargs):
15381538
ALL_VERSIONS_IN_HTML_CONTEXT = 'all_versions_in_html_context'
15391539
SKIP_SYNC_TAGS = 'skip_sync_tags'
15401540
SKIP_SYNC_BRANCHES = 'skip_sync_branches'
1541+
SKIP_SYNC_VERSIONS = 'skip_sync_versions'
15411542
CACHED_ENVIRONMENT = 'cached_environment'
15421543
LIMIT_CONCURRENT_BUILDS = 'limit_concurrent_builds'
15431544
DISABLE_SERVER_SIDE_SEARCH = 'disable_server_side_search'
@@ -1625,6 +1626,10 @@ def add_features(sender, **kwargs):
16251626
SKIP_SYNC_TAGS,
16261627
_('Skip syncing tags'),
16271628
),
1629+
(
1630+
SKIP_SYNC_VERSIONS,
1631+
_('Skip sync versions task'),
1632+
),
16281633
(
16291634
CACHED_ENVIRONMENT,
16301635
_('Cache the environment (virtualenv, conda, pip cache, repository) in storage'),

0 commit comments

Comments
 (0)