Clicking "erase job log" trashcan icon also removes artifacts
Problem
Clicking the Erase job log
button unexpectedly removes artifacts.
GitLab version: 11.3.4
Clicking this button:
Does a POST to https://gitlab.example.com/NAMESPACE/PROJECT/-/jobs/JOB_ID/erase
. After which, the entire job (including artifacts) is erased:
Deletion of artifacts has always been a part of erase
functionality. It IS expected to remove artifacts too. I implemented this feature a few years ago, and this is how it was supposed to work.
- The
jobs/JOB_ID/erase
route makes sense. You're erasing the job. - The placement of this button (in the log header, alongside other buttons specific to the log) does not make sense.
- Also, the tooltip explicitly (and incorrectly) says "Erase job log".
Possible Fix
Move the erase button off of the log header:
Edited by Steve Xuereb