Deleting Jenkins jobs through GUI does not delete their workspaces in slaves

后端 未结 4 1341
日久生厌
日久生厌 2021-02-19 16:57

I recently deleted 2 job from Jenkins (via GUI). When I log into slaves afterwards I still see workspace of those 2 jobs lying around. Is this behavior normal?

Notes:

4条回答
  •  余生分开走
    2021-02-19 17:19

    To refine what @oblio said

    it would mean that jobs would need to record every slave the job has ever been executed on

    Builds of jobs do record which slave they ran on, but builds can be (and often are) deleted after a while.

    and it would also have to take into account slaves that are offline

    Of course, but this is handled generally by the workspace cleanup feature built into Jenkins core, since it runs as a background process that deals with currently online slaves (deleting seldom-used workspaces), so any slave which is sometimes online will eventually be cleaned.

    The problem is that this feature currently ignores apparent workspaces that do not correspond to a job which does not exist at the time it runs, to err on the conservative side. This commit of mine rewrote the cleanup thread to fix some other problems, but not this one.

提交回复
热议问题