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

Output formats are not passed properly from Job Details view to Create Job form #54

Closed
JasonWeill opened this issue Sep 28, 2022 · 2 comments · Fixed by #127
Closed
Assignees
Labels
bug Something isn't working

Comments

@JasonWeill
Copy link
Collaborator

JasonWeill commented Sep 28, 2022

Description

In rerunJob in job-detail.tsx, the output formats are passed as name: format, label: format where format is 'ipynb' or 'HTML':

const rerunJob = () => {
const initialState: ICreateJobModel = {
inputFile: job?.input_uri ?? '',
jobName: job?.name ?? '',
outputPath: job?.output_prefix ?? '',
environment: job?.runtime_environment_name ?? '',
parameters:
job && job.parameters
? Object.keys(job.parameters).map(key => getParam(key))
: undefined,
outputFormats: job?.output_formats?.map(format => ({
name: format,
label: format
}))
};

Because these output formats do not match those in the environment's output formats list, they will never be selected on the create job form.

Expected behavior

The jobs should be in the same format as is used in the environments list's environment definition: for example, { name: 'ipynb', label: 'Notebook' }.

Context

The utility function outputFormatsForEnvironment is used to get an environment's properly formed output formats.

@JasonWeill JasonWeill added the bug Something isn't working label Sep 28, 2022
@ellisonbg ellisonbg added this to the Job scheduling milestone Oct 4, 2022
@ellisonbg
Copy link
Contributor

@andrii-i @jweill-aws is this still valid?

@andrii-i
Copy link
Collaborator

andrii-i commented Oct 4, 2022

Implementation changed but the issue is still valid. Now it's about adding missing outputFormats conversion functionality in convertDescribeJobtoJobDetail function of model.ts (line 130)

export function convertDescribeJobtoJobDetail(
dj: Scheduler.IDescribeJob
): IJobDetailModel {
// Convert parameters
const jdParameters = Object.entries(dj.parameters ?? {}).map(
([pName, pValue]) => {
return {
name: pName,
value: pValue
};
}
);
// TODO: Convert outputFormats
return {
jobId: dj.job_id,
jobName: dj.name ?? '',
inputFile: dj.input_uri,
outputPath: dj.output_uri,
outputPrefix: dj.output_prefix,
environment: dj.runtime_environment_name,
parameters: jdParameters,
outputFormats: [],
computeType: dj.compute_type,
idempotencyToken: dj.idempotency_token,
tags: dj.tags,
status: dj.status,
createTime: dj.create_time,
updateTime: dj.update_time,
startTime: dj.start_time,
endTime: dj.end_time
};
}

@3coins 3coins changed the title Input formats are not passed properly from Job Details view to Create Job form Output formats are not passed properly from Job Details view to Create Job form Oct 5, 2022
@JasonWeill JasonWeill assigned JasonWeill and unassigned andrii-i and dlqqq Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants