Skip to content

Commit 0694d42

Browse files
authored
Remove DONT_CLEAN_BUILD feature flag (#12519)
Ref #12462 (comment)
1 parent a60ef04 commit 0694d42

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

readthedocs/projects/models.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,6 @@ def add_features(sender, **kwargs):
19831983
SCALE_IN_PROTECTION = "scale_in_prtection"
19841984
USE_S3_SCOPED_CREDENTIALS_ON_BUILDERS = "use_s3_scoped_credentials_on_builders"
19851985
BUILD_FULL_CLEAN = "build_full_clean"
1986-
DONT_CLEAN_BUILD = "dont_clean_build"
19871986
BUILD_HEALTHCHECK = "build_healthcheck"
19881987
BUILD_NO_ACKS_LATE = "build_no_acks_late"
19891988

@@ -2039,12 +2038,6 @@ def add_features(sender, **kwargs):
20392038
USE_S3_SCOPED_CREDENTIALS_ON_BUILDERS,
20402039
_("Build: Use S3 scoped credentials for uploading build artifacts."),
20412040
),
2042-
(
2043-
DONT_CLEAN_BUILD,
2044-
_(
2045-
"Build: Don't clean the build directory. Only for Enterprise users with dedicated builders."
2046-
),
2047-
),
20482041
(
20492042
BUILD_FULL_CLEAN,
20502043
_("Build: Clean all build directories to avoid leftovers from other projects."),

readthedocs/projects/tasks/utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from readthedocs.core.utils.filesystem import safe_rmtree
1818
from readthedocs.doc_builder.exceptions import BuildAppError
1919
from readthedocs.notifications.models import Notification
20-
from readthedocs.projects.models import Feature
2120
from readthedocs.storage import build_media_storage
2221
from readthedocs.worker import app
2322

@@ -27,17 +26,6 @@
2726

2827
def clean_build(version=None):
2928
"""Clean the files used in the build of the given version."""
30-
31-
if version and version.project.has_feature(
32-
Feature.DONT_CLEAN_BUILD,
33-
):
34-
log.info(
35-
"Skipping cleaning build files for project with DONT_CLEAN_BUILD feature.",
36-
project_slug=version.project.slug,
37-
version_slug=version.slug,
38-
)
39-
return
40-
4129
if version:
4230
del_dirs = [
4331
os.path.join(version.project.doc_path, dir_, version.slug)

readthedocs/vcs_support/backends/git.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Git-related utilities."""
22

3-
import os
43
import re
54
from typing import Iterable
65
from urllib.parse import urlparse
@@ -53,14 +52,6 @@ def update(self):
5352
code, stdout, stderr = self.run(*cmd.split(), escape_command=False)
5453
return
5554

56-
# Check for existing checkout and skip clone if it exists.
57-
from readthedocs.projects.models import Feature
58-
59-
if self.project.has_feature(Feature.DONT_CLEAN_BUILD) and os.path.exists(
60-
os.path.join(self.working_dir, ".git")
61-
):
62-
return self.fetch()
63-
6455
self.clone()
6556
# TODO: We are still using return values in this function that are legacy.
6657
# This should be either explained or removed.

0 commit comments

Comments
 (0)