Skip to content

Conversation

dhirving
Copy link
Contributor

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

Move RemoteButler's registry query implementations to a new base class.  This prepares for using this implementation in DirectButler as well.
Previously, most registry tests were running against `Butler._registry`.  For DirectButler `_registry` is the internal `SqlRegistry` implementation, and not the user-facing `RegistryShim` implementation.  We will soon be gutting large portions of `SqlRegistry`, so the tests need to be running against the public `RegistryShim` object rather than the internals.
Add registry query shims for findDatasets and findRelatedDatasets, which are not yet deprecated but which were not yet implemented in RemoteButler.

Also added a stub for materialize() as a no-op.  The one place we are aware of where this was being used is now gone, but this is not yet deprecated.
Implement the 'check' parameter for skipping governor constraint validation in the shims from the old registry query system to the new query system.
Switch the implementation of `Registry.queryDatasets`, `queryDataIds`, `queryDimensionRecords`, and `queryDatasetAssociations` to use shims to the new query system, shared with the `RemoteButler` implementation.
Remove unit test code paths that only applied to the old query system.
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 changed the base branch from main to tickets/DM-52398 September 30, 2025 23:55
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.32%. Comparing base (35ec7c2) to head (c50b8d3).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../butler/registry/datasets/byDimensions/_manager.py 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           tickets/DM-52398    #1260      +/-   ##
====================================================
- Coverage             88.33%   88.32%   -0.02%     
====================================================
  Files                   379      379              
  Lines                 51174    51182       +8     
  Branches               6116     6117       +1     
====================================================
- Hits                  45205    45204       -1     
- Misses                 4522     4534      +12     
+ Partials               1447     1444       -3     

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

Modify registry.certify() to use the new query system instead of daf_relation, because we plan to retire daf_relation.
@dhirving dhirving force-pushed the tickets/DM-52398 branch 3 times, most recently from c8830ea to 79c994b Compare October 3, 2025 20:59
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