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

[teraslice] Rename isRestartable to is isRelocatable #3761

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions packages/job-components/src/operations/core/slicer-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ export default abstract class SlicerCore<T = OpConfig>
}

/**
* Used to indicate whether this slicer is restartable. Only relevant for
* Used to indicate whether this slicer is relocatable. Only relevant for
* kubernetesV2 backend
*/
isRestartable(): boolean {
isRelocatable(): boolean {
return false;
}

Expand Down
16 changes: 8 additions & 8 deletions packages/teraslice/src/lib/workers/execution-controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export class ExecutionController {
/// This is an indication that the cluster_master did not call for this
/// shutdown. We want to restart in this case.
if (status !== 'stopping' && includes(runningStatuses, status)) {
this.logger.info('Skipping shutdown to allow restart...');
this.logger.info('Skipping shutdown to allow for relocation...');
return;
}
}
Expand Down Expand Up @@ -945,17 +945,17 @@ export class ExecutionController {
// an unexpected exit to the ex process. Ex: an OOM
// NOTE: If this becomes an issue we may want to add a new state. Maybe `interrupted`
if (this.context.sysconfig.teraslice.cluster_manager_type === 'kubernetesV2') {
// Check to see if `isRestartable` exists.
// Check to see if `isRelocatable` exists.
// Allows for older assets to work with k8sV2
if (this.executionContext.slicer().isRestartable) {
if (this.executionContext.slicer().isRelocatable) {
this.logger.info(`Execution ${this.exId} detected to have been restarted..`);
const restartable = this.executionContext.slicer().isRestartable();
if (restartable) {
this.logger.info(`Execution ${this.exId} is restarable and will continue reinitializing...`);
const relocatable = this.executionContext.slicer().isRelocatable();
if (relocatable) {
this.logger.info(`Execution ${this.exId} is relocatable and will continue reinitializing...`);
} else {
this.logger.error(`Execution ${this.exId} is not restarable and will shutdown...`);
this.logger.error(`Execution ${this.exId} is not relocatable and will shutdown...`);
}
return restartable;
return relocatable;
}
}
error = new Error(invalidStateMsg('running'));
Expand Down
Loading