Skip to content

Conversation

ericholscher
Copy link
Member

@ericholscher ericholscher commented Jul 16, 2025

For Enterprise users with dedicated builders,
keeping the checkout around can make their build much faster,
especially in the case of a monorepo.

This is just a draft PR to start testing this concept.

Locally:

Screenshot 2025-07-16 at 2 58 48 PM

For Enterprise users with dedicated builders,
keeping the checkout around can make their build much faster,
especially in the case of a monorepo.

This is just a draft PR to start testing this concept.
@ericholscher ericholscher requested a review from agjohnson July 16, 2025 12:59
@humitos
Copy link
Member

humitos commented Jul 16, 2025

If we need to go in this direction, we should recover the work we've done already. It caches the whole environment and upload it to S3, so other builders can re-use it: #6763

@ericholscher
Copy link
Member Author

@humitos the issue is the download speed of the entire repo on disk, whether from GitHub or S3. The goal is to just keep it checked out on the server to avoid any download penalty for multi-GB repos.

@humitos
Copy link
Member

humitos commented Jul 16, 2025

I see. Keeping the output directory in the builder will only help when the project runs another build in the same builder, tho. That's very unlikely unless we do something to force it. It's hard to make it with spot instances...

@ericholscher
Copy link
Member Author

@humitos as noted in the description, this is for enterprise folks with dedicated builders.

Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good enough to start with 👍

# Check for existing checkout and skip clone if it exists.
from readthedocs.projects.models import Feature

if self.project.has_feature(Feature.DONT_CLEAN_BUILD) and os.path.exists(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like plenty to start with. We might eventually use something more specific to test the validity of the repository too, in case the clone is stuck in an unusable state. Something like rev-parse and supporting CLI arguments could probably fit here.

@ericholscher ericholscher marked this pull request as ready for review July 28, 2025 13:22
@ericholscher ericholscher requested a review from a team as a code owner July 28, 2025 13:22
@ericholscher ericholscher requested a review from humitos July 28, 2025 13:22
@ericholscher ericholscher merged commit bb72d07 into main Jul 29, 2025
7 checks passed
@ericholscher ericholscher deleted the keep-checkout-enterprise branch July 29, 2025 09:36
@ericholscher
Copy link
Member Author

Going to get this in to try and get in the next deploy so we can test it.

humitos added a commit that referenced this pull request Aug 14, 2025
```
In [3]: dict(Feature.FEATURES)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 dict(Feature.FEATURES)

ValueError: dictionary update sequence element #2 has length 4; 2 is required
```

The object got malformed in
#12327
humitos added a commit that referenced this pull request Aug 14, 2025
```
In [3]: dict(Feature.FEATURES)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 dict(Feature.FEATURES)

ValueError: dictionary update sequence element #2 has length 4; 2 is required
```

The object got malformed in
#12327
stsewd pushed a commit that referenced this pull request Aug 14, 2025
```
In [3]: dict(Feature.FEATURES)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 dict(Feature.FEATURES)

ValueError: dictionary update sequence element #2 has length 4; 2 is required
```

The object got malformed in
#12327
agjohnson pushed a commit that referenced this pull request Aug 17, 2025
```
In [3]: dict(Feature.FEATURES)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 dict(Feature.FEATURES)

ValueError: dictionary update sequence element #2 has length 4; 2 is required
```

The object got malformed in
#12327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants