Skip to content

feat: bulk CSV background jobs setup#6448

Open
matzduniuk wants to merge 63 commits into
mainfrom
6384/bulk-csv-background-jobs
Open

feat: bulk CSV background jobs setup#6448
matzduniuk wants to merge 63 commits into
mainfrom
6384/bulk-csv-background-jobs

Conversation

@matzduniuk

@matzduniuk matzduniuk commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR addresses #6384

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

  • Adds new BackgroundJobs controller, service, and module files.
  • Adds new database table for BackgroundJobs records and enums
  • Adds new prisma migration script
  • Adds integration and e2e tests for the new changes

How Can This Be Tested/Reviewed?

  1. Re-set up the backend application to apply new migrations.

  2. Using Postman, perform the following operations:
    2a. Create a new background job using the POST /jobs endpoint, providing a valid listingId (copy one from Prisma Studio → listing table) and any string value for inputS3Key. The response should return a BackgroundJob object with status: "processing".

    2b. Using the same listingId, attempt to create a second job using the POST /jobs endpoint again — this should return a 409 Conflict error, confirming that duplicate active jobs for the same listing are blocked.

    2c. Using the listingId from step 3a, retrieve the currently active job using the GET /jobs?listingId= endpoint. The response should return the same job object created in 3a.

    2d. Copy the id field from the response in 3a and retrieve the job directly using the GET /jobs/ endpoint. Confirm the returned object matches.

Tip

The above steps should also be performed using invalid data — missing or malformed body fields on POST, a non-> UUID listingId, an unrecognised job ID on the GET by ID endpoint, and requests with the passkey or Authorization > > header omitted — to verify proper error and validation handling.

  1. Open Prisma Studio, navigate to the background_job table, and manually update the status of the job created in step 3a from processing to completed
  2. Using Postman, repeat the GET /jobs?listingId= request from step 3c — the response should now return null, confirming that completed jobs are not surfaced as active
  3. Using Postman, send the POST /jobs request again with the same listingId — this should succeed and return a new 7. BackgroundJob with status: "processing", confirming that a new job can be created once the previous one is no longer active

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit e41398f
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/6a563dbc8c024c00089ac9e0
😎 Deploy Preview https://deploy-preview-6448--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-angelopolis canceled.

Name Link
🔨 Latest commit e41398f
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/6a563dbc1883ac000895e733

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit 49922be
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/6a3c29cf7967f600086b65a9
😎 Deploy Preview https://deploy-preview-6448--bloom-public-seeds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit e41398f
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/6a563dbceb5530000960f679
😎 Deploy Preview https://deploy-preview-6448--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@YazeedLoonat YazeedLoonat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good but a few tweaks

Comment thread api/prisma/schema.prisma
Comment thread api/src/services/background-jobs.service.ts Outdated
Comment thread api/src/services/background-jobs.service.ts Outdated
@YazeedLoonat YazeedLoonat added needs changes The author must make changes and then re-request review before merging and removed 1 review needed Requires 1 more review before ready to merge labels Jul 9, 2026
Comment thread api/src/services/background-jobs.service.ts Outdated
Comment thread api/src/controllers/background-jobs.controller.ts Outdated
Comment thread api/test/integration/background-jobs.e2e-spec.ts
@matzduniuk matzduniuk added the 1 review needed Requires 1 more review before ready to merge label Jul 13, 2026
@matzduniuk matzduniuk force-pushed the 6384/bulk-csv-background-jobs branch from 662c527 to f648465 Compare July 14, 2026 13:45
@matzduniuk matzduniuk removed the needs changes The author must make changes and then re-request review before merging label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 review needed Requires 1 more review before ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants