Skip to content

DEV-15815 Added dedupe function to spending_level_to_process validation - #4729

Merged
gregrholden merged 8 commits into
qatfrom
fix/DEV-15815-spending-level-deduplication
Aug 17, 2026
Merged

DEV-15815 Added dedupe function to spending_level_to_process validation#4729
gregrholden merged 8 commits into
qatfrom
fix/DEV-15815-spending-level-deduplication

Conversation

@gregrholden

@gregrholden gregrholden commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description:

DEV-15815: Raw spending_level bypasses TinyShield, amplifies download work [f-7a786b75]
The /api/v2/download/search/ endpoint should handle duplicate values provided to the spending_level filter without generating multiple download files.

Technical Details:

The /download/v2/request_validations.py's SearchDownloadValidator class allows a user to pass a list of spending_level values in their request for files to download, but the list is never deduplicated. A single request could therefore result in the same download file being generated multiple times, unnecessarily increasing the load on the system's resources. The solution is to update the spending_level list prior to TinyShield validation so that the original values passed through the entire class are deduplicated from the start.

NOTE: A good amount of code was updated with uv run ruff format in the updated files.

Requirements for PR Merge:

  1. Unit & integration tests updated
  2. API documentation updated (examples listed below)
    1. API Contracts
    2. API UI
    3. Comments
  3. Data validation completed (examples listed below)
    1. Does this work well with the current frontend? Or is the frontend aware of a needed change?
    2. Is performance impacted in the changes (e.g., API, pipeline, downloads, etc.)?
    3. Is the expected data returned with the expected format?
  4. Appropriate Operations ticket(s) created
  5. Jira Ticket(s)
    1. DEV-15815

Explain N/A in above checklist:

@gregrholden gregrholden self-assigned this Aug 12, 2026
@gregrholden gregrholden added the ready for review [PR] ready to be reviewed label Aug 12, 2026
@gregrholden gregrholden added do not merge [PR] shouldn't be merged in progress [ISSUE | PR] being worked and removed ready for review [PR] ready to be reviewed labels Aug 12, 2026
@gregrholden gregrholden added ready for review [PR] ready to be reviewed and removed do not merge [PR] shouldn't be merged in progress [ISSUE | PR] being worked labels Aug 13, 2026
@gregrholden
gregrholden merged commit d7293f6 into qat Aug 17, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review [PR] ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants