Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control-service: make timeout configurable #2951

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
public class JobImageBuilder {
private static final Logger log = LoggerFactory.getLogger(JobImageBuilder.class);

private static final int BUILDER_TIMEOUT_SECONDS = 1800;
private static final String REGISTRY_TYPE_ECR = "ecr";
private static final String REGISTRY_TYPE_GENERIC = "generic";

Expand Down Expand Up @@ -81,6 +80,9 @@ public class JobImageBuilder {
@Value("${datajobs.deployment.builder.serviceAccountName}")
private String builderServiceAccountName;

@Value("${datajobs.deployment.builder.builderTimeoutSeconds:1800}")
private int builderTimeoutSeconds;

private final ControlKubernetesService controlKubernetesService;
private final DockerRegistryService dockerRegistryService;
private final DeploymentNotificationHelper notificationHelper;
Expand Down Expand Up @@ -228,7 +230,7 @@ public boolean buildImage(

var condition =
controlKubernetesService.watchJob(
builderJobName, BUILDER_TIMEOUT_SECONDS, s -> log.debug("Wait status: {}", s));
builderJobName, builderTimeoutSeconds, s -> log.debug("Wait status: {}", s));

log.debug("Finished watching builder job {}. Condition is: {}", builderJobName, condition);
String logs = null;
Expand Down