Log use_common_build_dir warning through options BuildLogger

What does this MR do?

Updates the instance executor's Prepare() method to emit the "use_common_build_dir has no effect: requires vm isolation or max_use_count = 1" warning through options.BuildLogger instead of e.BuildLogger.

Why was this MR needed?

In executors/instance/instance.go, Prepare() logs the warning through e.BuildLogger before calling e.AbstractExecutor.Prepare(options). Because e.BuildLogger is only initialized during e.AbstractExecutor.Prepare(options), it is uninitialized (nil inner writer) when the warning is logged, causing the warning to be silently dropped. Operators configuring use_common_build_dir = true without VM isolation or max_use_count = 1 were therefore never informed that the setting has no effect.

Logging through options.BuildLogger ensures the warning is properly recorded in the job build log.

What's the best way to test this MR?

Run the new unit test suite for the instance executor:

go test -v ./executors/instance -run '^TestPrepare_UseCommonBuildDir$'

What are the relevant issue numbers?

Closes #40194

Merge request reports

Loading
Loading