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

Add endpoint for jobs and add job type field #366

Merged
merged 9 commits into from
Jan 26, 2024
Merged

Conversation

seallard
Copy link
Contributor

@seallard seallard commented Jan 25, 2024

This PR adds a job_type to the job model and an endpoint for adding a job to an analysis.

Part of https://github.com/Clinical-Genomics/cigrid-ui/issues/492 and implementation plan.

Added

  • job type column on job table
  • endpoint for adding jobs to analysis

Note:
When trailblazer scan (and other update commands) are run, all jobs for an analysis are deleted and re-added. This will need to be modified once we start adding jobs directly to an analysis, but will not be addressed in this PR.

This version is a

  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

@seallard seallard marked this pull request as ready for review January 25, 2024 09:39
@seallard seallard requested a review from a team as a code owner January 25, 2024 09:39
Copy link

@ChrOertlin ChrOertlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just a question on the cascading behaviour.

trailblazer/store/models.py Outdated Show resolved Hide resolved
@seallard seallard marked this pull request as draft January 25, 2024 10:52
@seallard seallard changed the title Add separate field for upload jobs Add job type field Jan 25, 2024
@seallard seallard marked this pull request as ready for review January 25, 2024 13:26
Copy link
Contributor

@henrikstranneheim henrikstranneheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

trailblazer/server/api.py Outdated Show resolved Hide resolved
trailblazer/server/api.py Outdated Show resolved Hide resolved
trailblazer/dto/create_job_request.py Show resolved Hide resolved
trailblazer/server/api.py Outdated Show resolved Hide resolved
trailblazer/server/utils.py Show resolved Hide resolved
trailblazer/store/crud/create.py Outdated Show resolved Hide resolved
Copy link
Contributor

@islean islean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

trailblazer/server/api.py Outdated Show resolved Hide resolved
trailblazer/constants.py Show resolved Hide resolved
@seallard seallard changed the title Add job type field Add job type field and endpoint for adding jobs Jan 25, 2024
@seallard seallard changed the title Add job type field and endpoint for adding jobs Add endpoint for jobs and add job type field Jan 25, 2024
Copy link

sonarcloud bot commented Jan 26, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@seallard
Copy link
Contributor Author

Applied revision to stage

(tb-latest) ➜  trailblazer git:(add-upload-jobs) ✗ alembic --config trailblazer-stage.ini upgrade head
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 6c3da78d1af0 -> 486e8c875e0b, Add upload jobs

@clingen-sthlm clingen-sthlm temporarily deployed to stage January 26, 2024 09:49 Inactive
@seallard seallard merged commit 691ff41 into master Jan 26, 2024
5 checks passed
@seallard seallard deleted the add-upload-jobs branch January 26, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants