You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimize disk usage by colocating Jenkins workspaces #3897
At the moment, each Jenkins job runs in its own workspace.
Since most of our machines are able to run only one job at a time, I suggest that we configure some of the jobs that require to build the node binary, to all run on a specific hardcoded workspace.
That way, we wouldn't have multiple copies of the build artifacts.
We could save about 5GB (and possibly some compilation time) if node-stress-single-test, node-test-commit-custom-suites-freestyle, and node-test-commit-linux used the same workspace.
Theoretically, we could also build the node binary in GitHub actions, which are running these jobs anyway, and download it as an artifact to save time?
Theoretically, we could also build the node binary in GitHub actions, which are running these jobs anyway, and download it as an artifact to save time?
No, because GH actions does not support all of the platforms we build for.
The changes seem to work, but now I'm not sure how to handle node-stress-single-test. The job runs on machines that don't have /home/iojs/build/workspace (macOS, Windows).
I would like to use a relative path instead, but I'm not sure what "remote FS root" means in the inline documentation:
07:00:13 > git reset --hard # timeout=1007:00:13 ERROR: Error fetching remote repo 'origin'07:00:13 hudson.plugins.git.GitException: Failed to fetch from git@github.com:nodejs/node.git07:00:13 at PluginClassLoader for git//hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:997)07:00:13 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1239)07:00:13 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1310)07:00:13 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1277)07:00:13 at hudson.scm.SCM.checkout(SCM.java:540)07:00:13 at hudson.model.AbstractProject.checkout(AbstractProject.java:1247)07:00:13 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649)07:00:13 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)07:00:13 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:521)07:00:13 at hudson.model.Run.execute(Run.java:1894)07:00:13 at PluginClassLoader for matrix-project//hudson.matrix.MatrixBuild.run(MatrixBuild.java:323)07:00:13 at hudson.model.ResourceController.execute(ResourceController.java:101)07:00:13 at hudson.model.Executor.run(Executor.java:446)07:00:13 Caused by: hudson.plugins.git.GitException: Command "git reset --hard" returned status code 128:07:00:13 stdout: 07:00:13 stderr: fatal: Unable to create '/home/iojs/build/workspace/node/.git/index.lock': File exists.07:00:13 07:00:13 Another git process seems to be running in this repository, e.g.07:00:13 an editor opened by 'git commit'. Please make sure all processes07:00:13 are terminated then try again. If it still fails, a git process07:00:13 may have crashed in this repository earlier:07:00:13 remove the file manually to continue.
Looking at the build history on the workspace machine it looks like:
Activity
[-]Optimize disk usage by Jenkins workspaces[/-][+]Optimize disk usage by colocating Jenkins workspaces[/+]targos commentedon Sep 10, 2024
Example of a host that would benefit from it: https://ci.nodejs.org/computer/test%2Dibm%2Dubuntu2204%2Dx64%2D2/
We could save about 5GB (and possibly some compilation time) if
node-stress-single-test,node-test-commit-custom-suites-freestyle, andnode-test-commit-linuxused the same workspace.richardlau commentedon Sep 10, 2024
SGTM
avivkeller commentedon Sep 10, 2024
Theoretically, we could also build the node binary in GitHub actions, which are running these jobs anyway, and download it as an artifact to save time?
richardlau commentedon Sep 10, 2024
No, because GH actions does not support all of the platforms we build for.
targos commentedon Sep 16, 2024
I started by updating https://ci.nodejs.org/view/All/job/node-test-commit-custom-suites-freestyle/ and https://ci.nodejs.org/view/All/job/node-test-commit-linux/
Their custom workspace is now
/home/iojs/build/workspace/noderichardlau commentedon Sep 16, 2024
FYI nodejs/jenkins-alerts#2871
I'll delete the
node-stress-single-testandnode-test-commit-linuxworkspaces.targos commentedon Sep 17, 2024
The changes seem to work, but now I'm not sure how to handle
node-stress-single-test. The job runs on machines that don't have/home/iojs/build/workspace(macOS, Windows).I would like to use a relative path instead, but I'm not sure what "remote FS root" means in the inline documentation:
richardlau commentedon Sep 17, 2024
AFAIK "remote FS root" is a combination of:
workspace(we don't override this anywhere AFAIK).which is how we end up with:
/home/iojs/build/workspaceon test-rackspace-win2022_vs2022-x64-5C:\workspaceon test-rackspace-win2022_vs2022-x64-5So I think we can set the workspace in the job to a relative "node".
targos commentedon Sep 18, 2024
Thanks, done.
Test run: https://ci.nodejs.org/view/Stress/job/node-stress-single-test/536/
targos commentedon Sep 18, 2024
I cancelled it and reverted the config change. It ran in
/home/iojs/build/nodeon the workspace machine andC:\nodeon Windows.targos commentedon Sep 18, 2024
Trying again with
workspace/node: https://ci.nodejs.org/job/node-stress-single-test/537/richardlau commentedon Nov 1, 2024
I'm wondering if we're getting collisions now on the workspace machines:
e.g. https://ci.nodejs.org/job/node-test-commit-linux/61452/console
Looking at the build history on the workspace machine it looks like:
ran at the same time in the same workspace.
If we compare to other jobs that appear to have run at the same time on the same machine, e.g.
it looks like Jenkins appended a
@2to the workspace directory for the second build.targos commentedon Nov 1, 2024
mmmh that's annoying. Maybe there's a variable we can use in the config to also append the
@2?targos commentedon Nov 1, 2024
I guess my question doesn't really make sense. It cannot know that a suffix is needed before evaluating this parameter.
richardlau commentedon Nov 1, 2024
I was hoping for something like the executor number but these are flyweight jobs meaning that in these cases the
EXECUTOR_NUMBERenv var is-1.