Skip to content

[DEV-15635] Update download regex and add test case - #4713

Merged
sethstoudenmier merged 8 commits into
qatfrom
fix/dev-15635-adjust-download-sql-regex
Aug 3, 2026
Merged

[DEV-15635] Update download regex and add test case#4713
sethstoudenmier merged 8 commits into
qatfrom
fix/dev-15635-adjust-download-sql-regex

Conversation

@sethstoudenmier

@sethstoudenmier sethstoudenmier commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description:

Fix some of the download columns swapping their values due to similar names between the generated CSVs and the database columns.

Technical Details:

Django changed how the queryset queries are represented which broke the regex that is used to determine which columns are a direct select vs annotations. This PR updates that regex, removes some checks that were previously added, and then adds a test case to hopefully catch any future potential changes.

A decent amount of the changes came from running ruff format on the file.

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. N/A Appropriate Operations ticket(s) created
  5. Jira Ticket(s)
    1. DEV-15635

Explain N/A in above checklist:

@sethstoudenmier sethstoudenmier added the ready for review [PR] ready to be reviewed label Jul 30, 2026
@sethstoudenmier sethstoudenmier removed the ready for review [PR] ready to be reviewed label Jul 30, 2026
Comment thread usaspending_api/download/tests/integration/test_download_generation.py Outdated

@james-at-kc james-at-kc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sethstoudenmier
sethstoudenmier merged commit 74715d8 into qat Aug 3, 2026
20 checks passed
@sethstoudenmier
sethstoudenmier deleted the fix/dev-15635-adjust-download-sql-regex branch August 3, 2026 20:34
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.

2 participants