Skip to content

Conversation

@fred3m
Copy link

@fred3m fred3m commented Nov 24, 2025

Checklist

  • ran Jenkins
  • ran and inspected package-docs build
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 67.69231% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.85%. Comparing base (26b1195) to head (4a06760).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/pipe/base/config.py 28.57% 15 Missing ⚠️
python/lsst/pipe/base/configOverrides.py 86.36% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
- Coverage   88.94%   88.85%   -0.09%     
==========================================
  Files         150      150              
  Lines       20727    20760      +33     
  Branches     2462     2462              
==========================================
+ Hits        18435    18446      +11     
- Misses       1713     1734      +21     
- Partials      579      580       +1     

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

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

In theory this is fine but it does make me ponder why some of the APIs being called can't report the information instead.

overrides.addFileOverride(configPath)
except Exception as e:
e.add_note(
f"Applying config override to task '{label}' from file '{configPath}'"
Copy link
Member

Choose a reason for hiding this comment

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

The error message from addFileOverride doesn't include configPath in it?

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure about this error specifically. One of the overrides (actually configOverride) was triggered by analysis_tools and took help from Jim to debug because there was no actual reference to analysis_tools anywhere in the traceback. While we added better error messages to that we decided to add them everywhere just in case.

except Exception as e:
e.add_note(
f"Applying config override to task '{label}' for "
"key '{key}' with value '{value}'"
Copy link
Member

Choose a reason for hiding this comment

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

f-string? Maybe addValueOverride should itself report key and value in the error message? Or is that API not raising anything itself but giving a KeyError?

try:
config.loadFromStream(buffer, filename=override.ospath, extraLocals=extraLocals)
except Exception as e:
e.add_note(f"Applying config override from file '{override.ospath}'")
Copy link
Member

Choose a reason for hiding this comment

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

loadFromStream knows the filename but doesn't report it?

instrument, name = override
instrument.applyConfigOverrides(name, config)
try:
instrument, name = override
Copy link
Member

Choose a reason for hiding this comment

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

Should this be in the try block?

instrument, name = override
instrument.applyConfigOverrides(name, config)
except Exception as e:
e.add_note(f"Applying config override with instrument '{instrument}' and name '{name}'")
Copy link
Member

Choose a reason for hiding this comment

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

All the information in this note seems to be known to applyConfigOverrides.

@timj timj changed the title Add more descriptive error messages DM-53382: Add more descriptive error messages Dec 2, 2025
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