Skip to content

BI-2901: Add backend VCF download endpoint for genotyping imports#528

Merged
nickpalladino merged 2 commits into
developfrom
feature/BI-2901
Jun 25, 2026
Merged

BI-2901: Add backend VCF download endpoint for genotyping imports#528
nickpalladino merged 2 commits into
developfrom
feature/BI-2901

Conversation

@humsika

@humsika humsika commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

Story: 2901

Added backend support for downloading the original uploaded VCF file for completed genotype imports.

This change:

  • adds genotypeImportId to the genotype imports list response so the frontend has an opaque per-row download identifier
    adds a new backend endpoint: GET /programs/{programId}/geno/imports/{genotypeImportId}/download
  • validates that the requested genotype import belongs to the requested program
  • restricts downloads to successful/completed genotype imports only
  • streams the original uploaded VCF file back through bi-api as an attachment
  • preserves the original uploaded filename in the download response
  • keeps S3 bucket names, keys, and direct S3 URLs hidden from the frontend

Dependencies

bi-web: develop
bi-api: feature/bi-2901

Testing

  1. Call the genotype imports list endpoint for a program with successful genotype imports.
  2. Verify each returned row includes genotypeImportId.
  3. Call: GET /v1/programs/{programId}/geno/imports/{genotypeImportId}/download
  4. Verify the response is 200 OK for a valid completed genotype import.
  5. Verify the response is streamed as an attachment and the Content-Disposition header contains the original uploaded .vcf filename.
  6. Verify the response does not expose any S3 bucket name, object key, or direct S3 URL.
  7. Verify failed, pending, or otherwise unavailable genotype imports are not downloadable.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit and/or integration tests to cover this change or tests are not applicable
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth

@nickpalladino nickpalladino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Did some testing for the issue Heather mentioned:

2026-06-23 15:22:49.384-0400 [RxCachedThreadScheduler-1] ERROR o.b.a.v.c.InternalServerErrorHandler - Error Id: fa01a680-c97e-494a-96ed-15f0d3d57ad0
software.amazon.awssdk.services.s3.model.NoSuchBucketException: The specified bucket does not exist (Service: S3, Status Code: 404, Request ID: 6320c0d4-acc4-4141-88b8-b8b0ecfe40ce, Extended Request ID: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=)

I wasn't able to reproduce this, uploaded multiple vcfs to the same submission without issue. Maybe a configuration issue with the bucket env.

@nickpalladino nickpalladino merged commit 3ed6bfe into develop Jun 25, 2026
1 check passed
@nickpalladino nickpalladino deleted the feature/BI-2901 branch June 25, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants