-
Notifications
You must be signed in to change notification settings - Fork 24
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
Release - Jobs DTO (#622) #844
Conversation
CreateJobDTO and UpdateJobDTO with API decorators etc.. Besides basic functionality already required in the controller some additional suggestions for properties.
Most tests fail since jobs.schema not yet implemented - will need resolution of #621 first, possibly others |
Needs rebase due to #854 There some eslint complaints that should get fixed as well. |
Note that we don't run any checks against non-master branches and this would only go to release-4.4 I recommend to add new features always to master and fork off release branches only for bug-fixing. |
src/jobs/dto/create-job.dto.ts
Outdated
/* | ||
New stuff from here | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I just left that in for review because I wasn't sure we needed some of those additional properties (yet).
src/jobs/dto/update-job.dto.ts
Outdated
export class UpdateJobDto extends PartialType(CreateJobDto) { | ||
@ApiProperty({ | ||
type: String, | ||
required: true, | ||
description: | ||
"Id for the job to be updated.", | ||
}) | ||
@IsString() | ||
readonly id: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is correct and needed, as the update on job is not implemented.
We are going to have statusUpdate.
Check issue #622 for more info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I've removed job-update.dto entirely, and added the status update instead.
Removed update-job.dto as it will not be implemented. Added job-statusupdate.dto.
Description
Update for the DTO instances for the new jobs coming with release 4.4.
Motivation
Jobs can be very freely defined using the job configurations, so the DTOs only really need two parameters: the job type (to grab the proper definition from config) and the job parameters (filled in instance of the "template" field in the job config).
Some additional optional parameters are suggested that may apply in common use cases.
Fixes:
src/jobs/dto/create-job.dto.ts
Changes:
src/jobs/dto/create-job.dto.ts
src/jobs/dto/update-job.dto.ts
Tests included/Docs Updated?