-
Notifications
You must be signed in to change notification settings - Fork 3
Address log-file testing problem for integration tests in corsika 7.8 containers #1712
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses a specific issue with integration tests failing for CORSIKA 7.8 containers due to overly aggressive error pattern matching in log files. The core problem was that a warning message containing "Failed to..." was triggering error detection patterns, causing tests to fail unnecessarily.
- Changed warning message text from "Failed to decode metadata..." to "Unable to decode metadata..." to avoid triggering error patterns
- Updated corresponding test assertion to match the new warning message text
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/simtools/simtel/simtel_io_metadata.py | Modified warning message to use "Unable to" instead of "Failed to" when metadata decoding fails |
| tests/unit_tests/simtel/test_simtel_io_metadata.py | Updated test assertion to match the new warning message text |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1712 +/- ##
==========================================
- Coverage 98.03% 98.03% -0.01%
==========================================
Files 90 90
Lines 11794 11787 -7
==========================================
- Hits 11562 11555 -7
Misses 232 232 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
|
Again thank you @EshitaJoshi |




This is an interesting issue. The integration tests for all simulate-prod steps are failing for the CORSIKA 7.8... containers.
The failing is in the log-file testing module which searches the log files for the following patterns:
No for some reason there is a non-UTF8 pattern in the metadata. We had considered this when reading the metadata in
simtools.simtel.simtel_io_metadataand handle this correctly. Unfortunately, the warning has a "Failed to..." in the warning text, triggering above ERROR_PATTERNS.As this is safe, and 'Failed to...' is too strong for a simple warning, I changed the warning text to "Unable to...".
Additionally to above, an IGNORE_PATTERN is introduced to allow certain messages (as this problematic one) in the log file. I am aware that this is a bit of fine tuning, but this should be ok (there will be more: hard to control the error and warning messages from all the external software we are using).
Works, see https://github.com/gammasim/simtools/actions/runs/17268513488
(generally a bit puzzling; I was trying to reproduce it locally and don't get this warning)
Closes #1711