Skip to content

Commit

Permalink
feat: Replace PREPARING status to CREATING
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed Nov 13, 2024
1 parent ae8dcb4 commit 035be30
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const isActive = (session: SessionActionButtonsFragment$data) => {
// 'RESTARTING',
// 'TERMINATING',
// 'PENDING',
// 'PREPARING',
// 'CREATING',
// 'PULLING',
// ].includes(session?.status || '');
// };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const statusTagColor = {
//prepare
RESTARTING: 'blue',
PREPARED: 'blue',
PREPARING: 'blue',
CREATING: 'blue',
PULLING: 'blue',
//running
RUNNING: 'green',
Expand All @@ -33,7 +33,7 @@ const isTransitional = (session: SessionStatusTagFragment$data) => {
'RESTARTING',
'TERMINATING',
'PENDING',
'PREPARING',
'CREATING',
'PULLING',
].includes(session?.status || '');
};
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/SessionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const SessionList: React.FC<SessionListProps> = ({
//prepare
RESTARTING: 'blue',
PREPARED: 'blue',
PREPARING: 'blue',
CREATING: 'blue',
PULLING: 'blue',
//running
RUNNING: 'green',
Expand Down
4 changes: 2 additions & 2 deletions react/src/components/SessionListColums/SessionInfoCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const isRunningStatus = (status: string = '') => {
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
].includes(status);
};

const isPreparing = (status: string = '') => {
return ['RESTARTING', 'PREPARED', 'PREPARING', 'PULLING'].includes(status);
return ['RESTARTING', 'PREPARED', 'CREATING', 'PULLING'].includes(status);
};

const SessionInfoCell: React.FC<{
Expand Down
2 changes: 1 addition & 1 deletion react/src/pages/SessionListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const RUNNINGS = [
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
];
const TAB_STATUS_MAP = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/backend-ai-edu-applauncher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default class BackendAiEduApplauncher extends BackendAIPage {
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
].join(',');
} else {
Expand All @@ -269,7 +269,7 @@ export default class BackendAiEduApplauncher extends BackendAIPage {
'TERMINATING',
'PENDING',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
].join(',');
}
Expand Down
11 changes: 3 additions & 8 deletions src/components/backend-ai-session-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,7 @@ export default class BackendAISessionList extends BackendAIPage {
}

_isPreparing(status) {
const preparingStatuses = [
'RESTARTING',
'PREPARED',
'PREPARING',
'PULLING',
];
const preparingStatuses = ['RESTARTING', 'PREPARED', 'CREATING', 'PULLING'];
if (preparingStatuses.indexOf(status) === -1) {
return false;
}
Expand Down Expand Up @@ -766,7 +761,7 @@ export default class BackendAISessionList extends BackendAIPage {
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
'ERROR',
];
Expand All @@ -782,7 +777,7 @@ export default class BackendAISessionList extends BackendAIPage {
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/backend-ai-session-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export default class BackendAISessionView extends BackendAIPage {
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
'TERMINATED',
'CANCELLED',
Expand All @@ -348,7 +348,7 @@ export default class BackendAISessionView extends BackendAIPage {
'TERMINATING',
'PENDING',
'PREPARED',
'PREPARING',
'CREATING',
'PULLING',
'TERMINATED',
'CANCELLED',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/backend.ai-client-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -32471,7 +32471,7 @@
'occupied_slots',
'containers {live_stat last_stat}',
],
e = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,PREPARING,PULLING,TERMINATED,CANCELLED,ERROR',
e = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,CREATING,PULLING,TERMINATED,CANCELLED,ERROR',
i = '',
r = 100,
n = 0,
Expand Down
10 changes: 5 additions & 5 deletions src/lib/backend.ai-client-esm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2799,7 +2799,7 @@ class Agent {
/**
* List computation agents.
*
* @param {string} status - Status to query. Should be one of 'ALIVE', 'PREPARING', 'TERMINATING' and 'TERMINATED'.
* @param {string} status - Status to query. Should be one of 'ALIVE', 'CREATING', 'TERMINATING' and 'TERMINATED'.
* @param {array} fields - Fields to query. Queryable fields are: 'id', 'status', 'region', 'first_contact', 'cpu_cur_pct', 'mem_cur_bytes', 'available_slots', 'occupied_slots'.
* @param {number} timeout - timeout for the request. Default uses SDK default. (5 sec.)
*/
Expand Down Expand Up @@ -2873,7 +2873,7 @@ class AgentSummary {
/**
* List of agent summary.
*
* @param {string} status - Status to query. Should be one of 'ALIVE', 'PREPARING', 'TERMINATING' and 'TERMINATED'.
* @param {string} status - Status to query. Should be one of 'ALIVE', 'CREATING', 'TERMINATING' and 'TERMINATED'.
* @param {array} fields - Fields to query. Queryable fields are: id, status, scaling_group, schedulable, schedulable, available_slots, occupied_slots.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -3603,7 +3603,7 @@ class ComputeSession {
* Get the number of compute sessions with specific conditions.
*
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -3641,7 +3641,7 @@ class ComputeSession {
*
* @param {array} fields - fields to query. Default fields are: ["id", "name", "image", "created_at", "terminated_at", "status", "status_info", "occupied_slots", "cpu_used", "io_read_bytes", "io_write_bytes"].
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -3713,7 +3713,7 @@ class ComputeSession {
'occupied_slots',
'containers {live_stat last_stat}',
],
status = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,PREPARING,PULLING,TERMINATED,CANCELLED,ERROR',
status = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,CREATING,PULLING,TERMINATED,CANCELLED,ERROR',
accessKey = '',
limit = 100,
offset = 0,
Expand Down
10 changes: 5 additions & 5 deletions src/lib/backend.ai-client-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2148,7 +2148,7 @@ class Agent {
/**
* List computation agents.
*
* @param {string} status - Status to query. Should be one of 'ALIVE', 'PREPARING', 'TERMINATING' and 'TERMINATED'.
* @param {string} status - Status to query. Should be one of 'ALIVE', 'CREATING', 'TERMINATING' and 'TERMINATED'.
* @param {array} fields - Fields to query. Queryable fields are: 'id', 'status', 'region', 'first_contact', 'cpu_cur_pct', 'mem_cur_bytes', 'available_slots', 'occupied_slots'.
* @param {number} timeout - timeout for the request. Default uses SDK default. (5 sec.)
*/
Expand Down Expand Up @@ -2824,7 +2824,7 @@ class ComputeSession {
* Get the number of compute sessions with specific conditions.
*
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -2861,7 +2861,7 @@ class ComputeSession {
*
* @param {array} fields - fields to query. Default fields are: ["id", "name", "image", "created_at", "terminated_at", "status", "status_info", "occupied_slots", "cpu_used", "io_read_bytes", "io_write_bytes"].
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -2932,7 +2932,7 @@ class ComputeSession {
'occupied_slots',
'containers {live_stat last_stat}',
],
status = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,PREPARING,PULLING,TERMINATED,CANCELLED,ERROR',
status = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,CREATING,PULLING,TERMINATED,CANCELLED,ERROR',
accessKey = '',
limit = 100,
offset = 0,
Expand Down Expand Up @@ -3039,7 +3039,7 @@ class SessionTemplate {
*
* @param {array} fields - fields to query. Default fields are: ["id", "name", "image", "created_at", "terminated_at", "status", "status_info", "occupied_slots", "cpu_used", "io_read_bytes", "io_write_bytes"].
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`,`PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`,`PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down
10 changes: 5 additions & 5 deletions src/lib/backend.ai-client-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,7 @@ class Agent {
/**
* List computation agents.
*
* @param {string} status - Status to query. Should be one of 'ALIVE', 'PREPARING', 'TERMINATING' and 'TERMINATED'.
* @param {string} status - Status to query. Should be one of 'ALIVE', 'CREATING', 'TERMINATING' and 'TERMINATED'.
* @param {array} fields - Fields to query. Queryable fields are: 'id', 'status', 'region', 'first_contact', 'cpu_cur_pct', 'mem_cur_bytes', 'available_slots', 'occupied_slots'.
* @param {number} timeout - timeout for the request. Default uses SDK default. (5 sec.)
*/
Expand Down Expand Up @@ -3074,7 +3074,7 @@ class ComputeSession {
* Get the number of compute sessions with specific conditions.
*
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -3112,7 +3112,7 @@ class ComputeSession {
*
* @param {array} fields - fields to query. Default fields are: ["id", "name", "image", "created_at", "terminated_at", "status", "status_info", "occupied_slots", "cpu_used", "io_read_bytes", "io_write_bytes"].
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`, `PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down Expand Up @@ -3184,7 +3184,7 @@ class ComputeSession {
'occupied_slots',
'containers {live_stat last_stat}',
],
status = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,PREPARING,PULLING,TERMINATED,CANCELLED,ERROR',
status = 'RUNNING,RESTARTING,TERMINATING,PENDING,SCHEDULED,CREATING,PULLING,TERMINATED,CANCELLED,ERROR',
accessKey = '',
limit = 100,
offset = 0,
Expand Down Expand Up @@ -3300,7 +3300,7 @@ class SessionTemplate {
*
* @param {array} fields - fields to query. Default fields are: ["id", "name", "image", "created_at", "terminated_at", "status", "status_info", "occupied_slots", "cpu_used", "io_read_bytes", "io_write_bytes"].
* @param {string or array} status - status to query. Default is 'RUNNING'.
* Available statuses are: `PREPARING`, `BUILDING`,`PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* Available statuses are: `CREATING`, `BUILDING`,`PENDING`, `SCHEDULED`, `RUNNING`, `RESTARTING`, `RESIZING`, `SUSPENDED`, `TERMINATING`, `TERMINATED`, `ERROR`.
* @param {string} accessKey - access key that is used to start compute sessions.
* @param {number} limit - limit number of query items.
* @param {number} offset - offset for item query. Useful for pagination.
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/components/pipeline-job-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export default class PipelineJobList extends BackendAIPage {
'PENDING',
'SCHEDULED',
'PREPARED',
'PREPARING',
'CREATING',
'BUILDING',
'PULLING',
'RUNNING',
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/lib/pipeline-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class PipelineUtils extends LitElement {
case 'PULLING':
case 'SCHEDULED':
case 'PREPARED':
case 'PREPARING':
case 'CREATING':
case 'PENDING':
color = 'yellow';
break;
Expand Down

0 comments on commit 035be30

Please sign in to comment.