Skip to content

Conversation

@TallJimbo
Copy link
Member

@TallJimbo TallJimbo commented Jan 8, 2026

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link
Contributor

@isullivan isullivan left a comment

Choose a reason for hiding this comment

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

A couple comments on checking consistency, which are really stretch goals for this ticket.

visit_id = new_visit_record.id
old_visit_record = old_visit_records[visit_id]
visit_geometry = visit_geometries[visit_id]
self.assertNotEqual(new_visit_record.region, old_visit_record.region)
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be too much of a pain, but could you also test that the new_visit_record.region equals the expected transformation of old_visit_record.region, since you know the rotation that was applied?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's effectively done in the line below, since that visit_geometry has the updated region.

butler.registry.insertDimensionData("exposure", *new_exposure_records, replace=True)
butler.registry.insertDimensionData("visit", *new_visit_records, replace=True)
butler.registry.insertDimensionData("visit_detector_region", *new_vdr_records, replace=True)
_LOG.info("Records for %d visits updated.", len(all_refs))
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be appropriate to add a warning message if the final number of updated records did not match the initial number expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we have a way to get that information back from the database inside the butler insert calls. Note that the variable I'm taking the len of is the same in both that initial log message and this final one - I think the count is worth repeating because the second is the only level=INFO one.

@TallJimbo TallJimbo merged commit b76d826 into main Jan 10, 2026
9 checks passed
@TallJimbo TallJimbo deleted the tickets/DM-53428 branch January 10, 2026 03:25
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