Set explicit FailureReason on BuildError constructions across executors

What does this MR do?

Set explicit FailureReason on BuildError constructions across executors

  • Set ConfigurationError on user/admin configuration errors: builds_dir/cache_dir not set, GIT_CLONE_PATH violations, CI/CD input expansion failures, custom executor missing config/RunExec, Docker invalid service name / invalid log config / malformed volume config, Kubernetes InvalidImageName
  • Set ScriptFailure on all executor script exit-code paths (shell, ssh, parallels, virtualbox, docker-wait, k8s exec/attach, custom command) to make intent explicit rather than relying on the catch-all mapper
  • Set RunnerSystemFailure on docker missing-volume-parser nil check (was falling through to ScriptFailure via empty FailureReason)
  • Fix pull/manager.go registry auth encoding error from ImagePullFailure to RunnerSystemFailure (unreachable internal path, not an image pull failure)

This changes are based on the investigation on the spreadsheet 👉 https://docs.google.com/spreadsheets/d/17iv8Z1OA16MedswDfAGN-mw90kx5drIy-U6o1wqyUMg/edit?gid=772791956#gid=772791956. This MR does not cover all the points. I will create another MR for the rest. Please take a look at column J MR to see where this MR covers.

Why was this MR needed?

To attribute the correct failure reasons.

What's the best way to test this MR?

I think unit tests should be enough for this changes.

What are the relevant issue numbers?

Edited by Taka Nishida

Merge request reports

Loading