Cancel a workflow in a job
Be able to cancel the following jobs of a workflow would enable conditional workflows or at least, graceful early exit of workflow
#You can avoid rebuilding everything with a large codebase/monorepo :
let say you have a project with a frontend and a backend. You have a workflow for each and both are quite long to run.
If you already have a tool to know which part you should build (by inspecting which files where changed by the commits you are building for instance) then you can gracefully stop the workflow that is not necessary (stop testing and building the whole backend when you only change the frontend)
#You can have conditional notification :
Let say you have a cleanup workflow which remove the very old versions of your application.
You may not want to run the whole pipeline if you can tell in a early job if there is anything to do in the rest of the pipeline.
With a cancel
From a user perspective and IMHO this can be a command in circleci-cli like the `step halt` command which proxy a command to the circleci-agent.
It might also be done once the workflow API is in place.
I think a workflow which was canceled by such command should be marked as cancelled.
Currently to mock that behavior I make my early step fail purposely to stop the rest of the pipeline. So I have notification of failed workflow even if the failure is "normal". Not ideal.