nodejs / nodejs/build

Suggestion: Change appropriate jenkins jobs to be shallow clones

Open
#3,729 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jinja
Stars
541
Forks
185
Avg merge
22h 15m
Merged PRs (30d)
4

Description

In researching the disk usage of the jenkins workspace nodes, I noticed that they tend to accumulate a lot of git repositories, and that all of the git repos are full clones of the entire history of the nodejs project.

I haven't fully dug into the depths of everything that happens in the testing pipelines to know whether or not that is a requirement, and whether or not there are jobs that need the full history, so this may not be a palatable change.

The full clones varied from 1.2 to 1.8 gb, and on the one server I looked at, there were about 140 clones on disk from various older builds. A depth 1 shallow clone of the nodejs project is only about 100M, so t would save 150-200GB, which would give a fair amount of breathing room on those 450GB disks.

I couldn't find any previous discussions in the build repo about shallow clones beyond specific jobs (i.e. no "we cant do that because of reason x..) So hopefully this suggestion has some merit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Jenkins jobs and testing pipelines in the nodejs/build repository to identify where full repository history is required. Determine which jobs can use depth-1 clones, then validate that their builds still pass and that the resulting workspace usage is reduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
build-system, ci-cd, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.