Skip to content

chore(jobs): rename job_run_id to id and job_definition_id to id #987

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

Merged
merged 1 commit into from
Nov 8, 2023
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
26 changes: 7 additions & 19 deletions packages/clients/src/api/jobs/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ export class API extends ParentAPI {
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
'region',
request.region ?? this.client.settings.defaultRegion,
)}/job-definitions/${validatePathParam(
'jobDefinitionId',
request.jobDefinitionId,
)}`,
)}/job-definitions/${validatePathParam('id', request.id)}`,
},
unmarshalJobDefinition,
)
Expand Down Expand Up @@ -126,10 +123,7 @@ export class API extends ParentAPI {
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
'region',
request.region ?? this.client.settings.defaultRegion,
)}/job-definitions/${validatePathParam(
'jobDefinitionId',
request.jobDefinitionId,
)}`,
)}/job-definitions/${validatePathParam('id', request.id)}`,
},
unmarshalJobDefinition,
)
Expand All @@ -140,10 +134,7 @@ export class API extends ParentAPI {
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
'region',
request.region ?? this.client.settings.defaultRegion,
)}/job-definitions/${validatePathParam(
'jobDefinitionId',
request.jobDefinitionId,
)}`,
)}/job-definitions/${validatePathParam('id', request.id)}`,
})

startJobDefinition = (request: Readonly<StartJobDefinitionRequest>) =>
Expand All @@ -155,10 +146,7 @@ export class API extends ParentAPI {
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
'region',
request.region ?? this.client.settings.defaultRegion,
)}/job-definitions/${validatePathParam(
'jobDefinitionId',
request.jobDefinitionId,
)}/start`,
)}/job-definitions/${validatePathParam('id', request.id)}/start`,
},
unmarshalJobRun,
)
Expand All @@ -170,7 +158,7 @@ export class API extends ParentAPI {
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
'region',
request.region ?? this.client.settings.defaultRegion,
)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}`,
)}/job-runs/${validatePathParam('id', request.id)}`,
},
unmarshalJobRun,
)
Expand All @@ -184,7 +172,7 @@ export class API extends ParentAPI {
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
'region',
request.region ?? this.client.settings.defaultRegion,
)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}/stop`,
)}/job-runs/${validatePathParam('id', request.id)}/stop`,
},
unmarshalJobRun,
)
Expand All @@ -198,7 +186,7 @@ export class API extends ParentAPI {
request.region ?? this.client.settings.defaultRegion,
)}/job-runs`,
urlParams: urlParams(
['job_definition_id', request.jobDefinitionId],
['id', request.id],
['order_by', request.orderBy],
['page', request.page],
[
Expand Down
4 changes: 2 additions & 2 deletions packages/clients/src/api/jobs/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export const unmarshalJobDefinition = (data: unknown): JobDefinition => {
createdAt: unmarshalDate(data.created_at),
description: data.description,
environmentVariables: data.environment_variables,
id: data.id,
imageUri: data.image_uri,
jobDefinitionId: data.job_definition_id,
jobTimeout: data.job_timeout,
memoryLimit: data.memory_limit,
name: data.name,
Expand All @@ -51,8 +51,8 @@ export const unmarshalJobRun = (data: unknown): JobRun => {
createdAt: unmarshalDate(data.created_at),
errorMessage: data.error_message,
exitCode: data.exit_code,
id: data.id,
jobDefinitionId: data.job_definition_id,
jobRunId: data.job_run_id,
region: data.region,
runDuration: data.run_duration,
state: data.state,
Expand Down
18 changes: 9 additions & 9 deletions packages/clients/src/api/jobs/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type ListJobDefinitionsRequestOrderBy =
export type ListJobRunsRequestOrderBy = 'created_at_asc' | 'created_at_desc'

export interface JobDefinition {
jobDefinitionId: string
id: string
name: string
createdAt?: Date
updatedAt?: Date
Expand All @@ -38,7 +38,7 @@ export interface JobDefinition {
}

export interface JobRun {
jobRunId: string
id: string
jobDefinitionId: string
state: JobRunState
createdAt?: Date
Expand Down Expand Up @@ -77,7 +77,7 @@ export type DeleteJobDefinitionRequest = {
* config.
*/
region?: Region
jobDefinitionId: string
id: string
}

export type GetJobDefinitionRequest = {
Expand All @@ -86,7 +86,7 @@ export type GetJobDefinitionRequest = {
* config.
*/
region?: Region
jobDefinitionId: string
id: string
}

export type GetJobRunRequest = {
Expand All @@ -95,7 +95,7 @@ export type GetJobRunRequest = {
* config.
*/
region?: Region
jobRunId: string
id: string
}

export type GetServiceInfoRequest = {
Expand Down Expand Up @@ -132,7 +132,7 @@ export type ListJobRunsRequest = {
page?: number
pageSize?: number
orderBy?: ListJobRunsRequestOrderBy
jobDefinitionId?: string
id?: string
projectId?: string
}

Expand All @@ -147,7 +147,7 @@ export type StartJobDefinitionRequest = {
* config.
*/
region?: Region
jobDefinitionId: string
id: string
}

export type StopJobRunRequest = {
Expand All @@ -156,7 +156,7 @@ export type StopJobRunRequest = {
* config.
*/
region?: Region
jobRunId: string
id: string
}

export type UpdateJobDefinitionRequest = {
Expand All @@ -165,7 +165,7 @@ export type UpdateJobDefinitionRequest = {
* config.
*/
region?: Region
jobDefinitionId: string
id: string
name?: string
cpuLimit?: number
memoryLimit?: number
Expand Down