Skip to content

Draft: Use the timeout-able context to initialize the build context

Romuald Atchadé requested to merge job-timeout-not-functional into main

What does this MR do?

As described in #27040, the job keeps running even though the timeout is expired. After investigation, it comes out that when the build script is going to be executed, the context used is initialized with a context.Background() whereas it could use the ctx parameter which is created using the job timeout value.

With this MR, the proper context is being used for runContext initialization so that the propagation reaches the script execution when the timeout is expired.

Context support has also been added for some caching methods.

Why was this MR needed?

To make sure that the job timeout actually cancels any ongoing execution

What's the best way to test this MR?

TBD

What are the relevant issue numbers?

TBD

Edited by Romuald Atchadé

Merge request reports