[ 
https://issues.apache.org/jira/browse/CASSANDRA-20436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085022#comment-18085022
 ] 

Michael Semb Wever edited comment on CASSANDRA-20436 at 5/31/26 8:07 PM:
-------------------------------------------------------------------------

*Root cause*

The build+test cells run in 
{{ws("workspace/${JOB_NAME}/${BUILD_NUMBER}/${cell.step}/${cell.arch}/jdk-${cell.jdk}/python-${cell.python}")}},
 so every build writes a new per-build directory. 

The {{cleanWs()}} only cleans the current cell's leaf, and it sat as the last 
statement in the {{ws}} block — so any cell hitting error() 
(failed/timed-out/aborted) exits before reaching it and leaves the full cell's 
workspace build behind. 

*Fix (Jenkinsfile)*

Wrap each cell body in 
{code}
try { … } finally { cleanAgent(cell.step) }
{code}
 so cleanup runs on failure/abort.

Also add an age-gated sweep in {cleanAgent(..)} reaping build-number dirs older 
than 7 days (above the 12h max build wall-clock, so it cannot race any running 
build).

Patch:  


was (Author: michaelsembwever):
*Root cause*

The build+test cells run in 
{{ws("workspace/${JOB_NAME}/${BUILD_NUMBER}/${cell.step}/${cell.arch}/jdk-${cell.jdk}/python-${cell.python}")}},
 so every build writes a new per-build directory. 

The {{cleanWs()}} only cleans the current cell's leaf, and it sat as the last 
statement in the {{ ws} block — so any cell hitting error() 
(failed/timed-out/aborted) exits before reaching it and leaves the full cell's 
workspace build behind. 

*Fix (Jenkinsfile)*

Wrap each cell body in 
{code}
try { … } finally { cleanAgent(cell.step) }
{code}
 so cleanup runs on failure/abort.

Also add an age-gated sweep in {cleanAgent(..)} reaping build-number dirs older 
than 7 days (above the 12h max build wall-clock, so it cannot race any running 
build).

Patch:  

> ci-cassandra.a.o agent workspaces for Cassandra-5.0 (and above) not being 
> cleaned
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-20436
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20436
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: CI
>            Reporter: Michael Semb Wever
>            Priority: Normal
>
> This line is not working
> https://github.com/apache/cassandra/blob/cassandra-5.0.0/.jenkins/Jenkinsfile#L490
> ( https://plugins.jenkins.io/ws-cleanup/ ) 
> leading to the Cassandra-5.0 and Cassandra-trunk directories
> under /home/jenkins/jenkins-slave/workspace/
> growing to hundreds of GBs.
> Collecting logging @ 
> https://ci-cassandra.apache.org/manage/log/hudson.model.WorkspaceCleanupThread/
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to