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

Add feature flag to just skip the sync version task entirely #7366

Merged
merged 1 commit into from Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion readthedocs/core/views/hooks.py
Expand Up @@ -4,7 +4,7 @@

from readthedocs.builds.constants import EXTERNAL
from readthedocs.core.utils import trigger_build
from readthedocs.projects.models import Project
from readthedocs.projects.models import Project, Feature
from readthedocs.projects.tasks import sync_repository_task


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

if project.has_feature(Feature.SKIP_SYNC_VERSIONS):
log.info('Skipping sync versions for project: project=%s', project.slug)
return None

options = {}
if project.build_queue:
# respect the queue for this project
Expand Down
5 changes: 5 additions & 0 deletions readthedocs/projects/models.py
Expand Up @@ -1538,6 +1538,7 @@ def add_features(sender, **kwargs):
ALL_VERSIONS_IN_HTML_CONTEXT = 'all_versions_in_html_context'
SKIP_SYNC_TAGS = 'skip_sync_tags'
SKIP_SYNC_BRANCHES = 'skip_sync_branches'
SKIP_SYNC_VERSIONS = 'skip_sync_versions'
CACHED_ENVIRONMENT = 'cached_environment'
LIMIT_CONCURRENT_BUILDS = 'limit_concurrent_builds'
DISABLE_SERVER_SIDE_SEARCH = 'disable_server_side_search'
Expand Down Expand Up @@ -1625,6 +1626,10 @@ def add_features(sender, **kwargs):
SKIP_SYNC_TAGS,
_('Skip syncing tags'),
),
(
SKIP_SYNC_VERSIONS,
_('Skip sync versions task'),
),
(
CACHED_ENVIRONMENT,
_('Cache the environment (virtualenv, conda, pip cache, repository) in storage'),
Expand Down