Skip to content

Conversation

dhirving
Copy link
Contributor

@dhirving dhirving commented Sep 26, 2025

Replace the implementation of Registry.findDataset() with the new query system, to allow us to retire daf_relation. This attempts to preserve the existing behavior, with one exception: returned DatasetRefs now have dataId.hasFull() = True, in line with the behavior of the new query system.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes
  • (if changing dimensions.yaml) make a copy of dimensions.yaml in configs/old_dimensions

Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 95.89041% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.34%. Comparing base (e9ea2bf) to head (79c994b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/daf/butler/_registry_shim.py 94.44% 1 Missing and 1 partial ⚠️
...hon/lsst/daf/butler/queries/_expression_strings.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1258      +/-   ##
==========================================
- Coverage   88.50%   88.34%   -0.17%     
==========================================
  Files         382      382              
  Lines       51201    51213      +12     
  Branches     6118     6116       -2     
==========================================
- Hits        45318    45242      -76     
- Misses       4434     4524      +90     
+ Partials     1449     1447       -2     

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

@dhirving dhirving force-pushed the tickets/DM-52398 branch 5 times, most recently from e8ebe05 to 35ec7c2 Compare September 30, 2025 22:08
Base automatically changed from tickets/DM-52397 to main October 2, 2025 22:19
Ahead of reworking its implementation, add a few tests to nail down the behavior of edge cases for findDataset.
It turns out that some downstream code (in pipe_tasks and possibly others) relies on undocumented behavior where dimension records will be preserved from the input data ID to the output ref.
Fix an issue where attempting to query datasets with a timespan overlap constraint but no calibration collections in the search would cause the query builder to raise "sqlalchemy.exc.ArgumentError: Only '=', '!=', 'is_()', 'is_not()', 'is_distinct_from()', 'is_not_distinct_from()' operators can be used with None/True/False"
Replace the implementation of Registry.findDataset with the new query system, to allow us to retire daf_relation.
@dhirving dhirving marked this pull request as ready for review October 3, 2025 23:15
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.

1 participant