Skip to content

Clear tracker_file_extension when set to instrument name - #314

Open
tpoliaw wants to merge 1 commit into
mainfrom
reset-tracker-extension
Open

tpoliaw wants to merge 1 commit into
mainfrom
reset-tracker-extension

Conversation

@tpoliaw

@tpoliaw tpoliaw commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

If the extension is not present the instrument name is used so setting
the extension to the same value doesn't make sense and is skipped.

Skipping the update entirely led to two issues:

  • if the extension had previously been set to a new value it couldn't be
    set back
  • if resetting the extension was the only update being made, it would
    lead to invalid SQL and an error.

Instead of skipping the field entirely in the case that it matches the
instrument, use None and reset the DB value to NULL to rely on the
instrument being the default.

If the extension is not present the instrument name is used so setting
the extension to the same value doesn't make sense and is skipped.

Skipping the update entirely led to two issues:
* if the extension had previously been set to a new value it couldn't be
  set back
* if resetting the extension was the only update being made, it would
  lead to invalid SQL and an error.

Instead of skipping the field entirely in the case that it matches the
instrument, use None and reset the DB value to NULL to rely on the
instrument being the default.
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.50%. Comparing base (8abe464) to head (7a5f2b4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #314      +/-   ##
==========================================
+ Coverage   79.34%   79.50%   +0.15%     
==========================================
  Files          13       13              
  Lines        2116     2132      +16     
==========================================
+ Hits         1679     1695      +16     
  Misses        437      437              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

Setting trackerFileExtension to the instrument name fails with a SQL syntax error, or is silently ignored

1 participant