Fix removal of build volume when disable_cache set to true
What does this MR do?
Fix disable cache volume for build volume
Why was this MR needed?
The build volume is created so that the job state (cloned project) can
be reused by all the containers that we spawn to run the user job.
However in v12.9.0 or earlier the user could disable the fact that this
volume is kept after the build with the cache_disable
config. When
cache_disable
was set to true
we still created the volume but at the
end of the job we delete that volume. In
!1989 (merged) we
changed this by mistake.
Introduce back the temporary volume id state and have RemoveTemporary
delete all the temporary volumes that are created.
Full flow:
- Check if error on creating volume is because of
disalbed_cache = true
- Create temporary volume
- In v12.9.0 we used to cleanup all the temporary containers
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased
What are the relevant issue numbers?
Closes #25438 (closed)
Edited by Steve Xuereb