Skip to content

When critical files are missing, log which ones those are.#176

Draft
gerritholl wants to merge 1 commit intopytroll:mainfrom
gerritholl:inform-what-files-missing
Draft

When critical files are missing, log which ones those are.#176
gerritholl wants to merge 1 commit intopytroll:mainfrom
gerritholl:inform-what-files-missing

Conversation

@gerritholl
Copy link
Copy Markdown
Member

Improve the log message reported when critical files are missing, to inform exactly what critical files are missing.

@gerritholl gerritholl marked this pull request as draft January 26, 2026 16:44
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.78%. Comparing base (d5fa6fa) to head (310153b).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   80.73%   80.78%   +0.04%     
==========================================
  Files          41       41              
  Lines        5140     5152      +12     
==========================================
+ Hits         4150     4162      +12     
  Misses        990      990              
Flag Coverage Δ
unittests 80.78% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gerritholl gerritholl marked this pull request as ready for review January 26, 2026 17:17
@gerritholl
Copy link
Copy Markdown
Member Author

gerritholl commented Jan 26, 2026

I added this to debug why I keep getting "required files were not present", but the logging I added doesn't seem to help, as the missing critical files are the empty set :/

[WARNING: 2026-01-26 17:14:39 : segment_gatherer] Timeout occured and required files were not present, data discarded for slot 2026-01-26 16:50:00. Missing critical files: set().

Copy link
Copy Markdown
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM

@gerritholl
Copy link
Copy Markdown
Member Author

Does @pnuu have an idea why my PR might log the empty set for missing critical files?

@pnuu
Copy link
Copy Markdown
Member

pnuu commented Jan 28, 2026

How does your config look like?

I guess the status has been determined incorrectly and the complex if clauses before the log message have not match. The empty set in the log message in it self is correct:

critical = set()
received = {1, 2, 5}
print(critical - received)

-> set()

@gerritholl
Copy link
Copy Markdown
Member Author

I made some changes in the past couple of days, but I think it was:

patterns:
  wcm:
    variable_tags: ignore
    pattern: "{segment}-{channel_name}-wcm3km_epsg4326-{gatherer_time:%Y%m%d%H%M}.{ext}"
    all_files: &files
       C13:goesw,C13:goese,ir105:fci,IR_108:seviri-iodc,B13:himawari,airmass:goesw,airmass:goese,airmass:fci,airmass:seviri-iodc,airmass:himawari,24h_microphysics_ash:goesw,24h_microphysics_ash:goese,24h_microphysics_ash:fci,24h_microphysics_ash:seviri-iodc,24h_microphysics_ash:himawari,RGB_12_12_9i_N:goesw,RGB_12_12_9i_N:goese,RGB_12_12_9i_N:fci,RGB_12_12_9i_N:seviri-iodc,RGB_12_12_9i_N:himawari,RGB_12_12_1_N:goesw,RGB_12_12_1_N:goese,RGB_12_12_1_N:fci,RGB_12_12_1_N:seviri-iodc,RGB_12_12_1_N:himawari
    wanted_files: *files
    critical_files: ir105:fci
    variable_tags:
      - ext
    is_critical_set: True
group_by_minutes: 10
timeliness: 900
time_name: gatherer_time
num_files_premature_publish: 20
posttroll:
  publish_topic: /wc/set
  topics:
    - /wc/singleready
  nameservers: [localhost]

And from the log:

[WARNING: 2026-01-26 16:58:41 : segment_gatherer] Timeout occured and required files were not present, data discarded for slot 2026-01-26 16:20:00. Missing critical files: {'fci-ir105-wcm3km_epsg4326-202601261620.*'}.
[WARNING: 2026-01-26 16:58:51 : segment_gatherer] Timeout occured and required files were not present, data discarded for slot 2026-01-26 16:30:00. Missing critical files: {'fci-ir105-wcm3km_epsg4326-202601261630.*'}.
[WARNING: 2026-01-26 17:04:39 : segment_gatherer] Timeout occured and required files were not present, data discarded for slot 2026-01-26 16:40:00. Missing critical files: set().
[WARNING: 2026-01-26 17:14:39 : segment_gatherer] Timeout occured and required files were not present, data discarded for slot 2026-01-26 16:50:00. Missing critical files: set().
[WARNING: 2026-01-26 17:18:50 : segment_gatherer] Timeout occured and required files were not present, data discarded for slot 2026-01-26 16:40:00. Missing critical files: {'fci-ir105-wcm3km_epsg4326-202601261640.*'}.

I later changed settings and had no more critical files timeout, but I did not change the code. I should do more live tests to trigger this on purpose.

@gerritholl gerritholl marked this pull request as draft January 28, 2026 07:52
@gerritholl
Copy link
Copy Markdown
Member Author

Converting to draft because it doesn't seem to do what I mean.

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