Support dynamic enable/disable of VENUS image cataloging - #109
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
==========================================
+ Coverage 81.90% 82.04% +0.13%
==========================================
Files 16 16
Lines 1293 1303 +10
==========================================
+ Hits 1059 1069 +10
Misses 234 234 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
backmari
approved these changes
Jul 23, 2026
backmari
left a comment
Collaborator
There was a problem hiding this comment.
Looks great! I really like that it's the presence/absence of the file that works as the toggle, but the logic that gets executed is still in the package 👌
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of the changes:
Make VENUS image cataloging something we can turn on and off per instrument, the same easy way we already toggle autoreduction. Image cataloging now runs only when
catalog_<INSTRUMENT>.pyis present in the instrument's shared autoreduce directory, so moving that one file disables it with no code change, config edit, or service restart.Long description of the changes:
Image cataloging is a VENUS-specific substep of ONCat cataloging. It used to run unconditionally, inline in
ONCatProcessor.ingest(). When the VENUS team tested a high-frequency detector that produced large images, cataloging times shot up and backed up the shared autoreducers, and we had no quick way to shut that substep off.This change gates the substep on the presence of
/<facility>/<instrument>/shared/autoreduce/catalog_<INSTRUMENT>.py, mirroring thereduce_<INSTRUMENT>.pyconvention instrument scientists already use to enable/disable autoreduction. The agent only checks that the file exists; it does not execute its contents. Move or rename the file and image cataloging stops for that instrument on the next job. Raw and related-file cataloging are untouched either way, so this only affects the image step.Kept the actual cataloging logic (and its ONCat credentials) inside the agent rather than shelling out to a standalone script, so there are no credentials to plumb out and the change stays small.
Specifics:
ONCatProcessor.catalog_images(), gated on the script's presence. Honors the existingdev_instrument_sharedoverride so it can be exercised locally and in integration tests.Image cataloging enabled/disabled for <INSTRUMENT>).configuration/catalog_VENUS.py.example, a documented, ready-to-deploy marker.Check list for the pull request
Check list for the reviewer
Manual test for the reviewer
Unit tests:
Integration tests (requires Docker):
End-to-end toggle check:
test_oncat_catalog_venus_images— VENUS hascatalog_VENUS.pyprovisioned, so image files are batch-ingested and a COMPLETE message is returned.test_oncat_catalog_images_disabled— theIMAGINGtest instrument has image files and image metadata but nocatalog_IMAGING.py, so the main file is still cataloged (COMPLETE) and no image batch request is made.To try it by hand against a running agent, place/remove
/SNS/VENUS/shared/autoreduce/catalog_VENUS.pyand send aCATALOG.ONCAT.DATA_READYmessage for a VENUS run; the agent log will showImage cataloging enabled for VENUSorImage cataloging disabled for VENUS.References
EWM 17055