Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-47335: Fix dataset query missing implied dimensions #1112

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

dhirving
Copy link
Contributor

@dhirving dhirving commented Nov 1, 2024

Revert serialization change from DM-46776 in SerializedDataCoordinate, which caused it to drop values for implied dimensions.

That change broke the transfer of DatasetRefs from server to client, since it drops the values for implied dimensions in the data ID. Per the documented behavior of dataset queries, the returned refs will have hasFull() = True and this behavior is relied on in tutorial notebooks.

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 Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.37%. Comparing base (6cb0823) to head (7d49ac0).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1112   +/-   ##
=======================================
  Coverage   89.37%   89.37%           
=======================================
  Files         362      362           
  Lines       48288    48301   +13     
  Branches     5872     5872           
=======================================
+ Hits        43155    43168   +13     
  Misses       3718     3718           
  Partials     1415     1415           

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

@dhirving dhirving marked this pull request as ready for review November 1, 2024 21:20
@TallJimbo
Copy link
Member

TallJimbo commented Nov 1, 2024

I can see how this broke RemoteButler query results, but I'm curious how this could have changed dataset type definitions, since initializing a DimensionGroup with the required subset and the full set should always yield the same result, unless the dimension universe has changed.

I'm not at all against the revert that was just merged, but I think long term this is a good reason to have the wire format for queries differ from long-term persistence and other cases where the consumer is another butler, because I do still think the latter should be only saving the required subset.

@dhirving
Copy link
Contributor Author

dhirving commented Nov 1, 2024

Looks like you're right -- I didn't realize that the DatasetType constructor would automatically add all implied dimensions. (The unit test data that is used everywhere explicitly adds in band even though it's theoretically implied by physical_filter.)

So I can probably un-revert the SerializedDatasetType change.

Revert serialization change from DM-46776 in SerializedDataCoordinate, which caused it to drop values for implied dimensions.

That change broke the transfer of DatasetRefs from server to client, since it drops the values for implied dimensions in the data ID.  Per the documented behavior of dataset queries, the returned refs will have `hasFull() = True` and this behavior is relied on in tutorial notebooks.
@dhirving dhirving merged commit 89d1144 into main Nov 4, 2024
19 checks passed
@dhirving dhirving deleted the tickets/DM-47335 branch November 4, 2024 16:56
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.

3 participants