Skip to content

Update GC tests with amended metrics#89

Open
6a6d74 wants to merge 2 commits into
mainfrom
update-GC-tests-6a6d74
Open

Update GC tests with amended metrics#89
6a6d74 wants to merge 2 commits into
mainfrom
update-GC-tests-6a6d74

Conversation

@6a6d74
Copy link
Copy Markdown
Collaborator

@6a6d74 6a6d74 commented Mar 18, 2026

Metadata now published directly on +/a/wis2/+/metadata topic

GC metrics updated as per PR wmo-im/wis2-metric-hierarchy#55

Fixed 2 errors:

Test "Data Integrity Check Failure" ... metric wmo_wis2_gc_downloaded_errors_total should not be incremented when there's an integrity check fail - the download was fine.

Test "WIS2 Notification Message Deduplication (Alternative 1)" ... metric wmo_wis2_gc_downloaded_errors_total should have been "unchanged" because there aren't any download errors in this test.

Metadata now published directly on +/a/wis2/+/metadata topic

GC metrics updated as per PR wmo-im/wis2-metric-hierarchy#55

Fixed 2 errors:

Test "Data Integrity Check Failure" ... metric `wmo_wis2_gc_downloaded_errors_total` should not be incremented when there's an integrity check fail - the download was fine.

Test "WIS2 Notification Message Deduplication (Alternative 1)" ...  metric `wmo_wis2_gc_downloaded_errors_total` should have been "unchanged" because there aren't any download errors in this test.

Signed-off-by: Jeremy Tandy <jeremy.tandy@gmail.com>
@6a6d74 6a6d74 requested review from golfvert and tomkralidis March 18, 2026 18:09
@6a6d74
Copy link
Copy Markdown
Collaborator Author

6a6d74 commented Mar 18, 2026

Hi @golfvert and @tomkralidis - please would you check and merge this change. The PR comment is descriptive. I want to refer to these tests during the WIS2 Champions training, so it would be preferable (!) for them to be correct!

Adding "unchanged" for `wmo_wis2_gc_downloaded_errors_total` - because this is useful to know.

Signed-off-by: Jeremy Tandy <jeremy.tandy@gmail.com>

====== Purpose
Where a Global Cache receives a valid WNM, but is unable to download a data item from the location specified in a notification message (i.e., the source data server), the `metric wmo_wis2_gc_dataserver_status_flag` for the source data server should be set to 0 (zero).
Where a Global Cache receives a valid WNM, but is unable to download a data item from the location specified in a notification message (i.e., the source data server), the metric `wmo_wis2_gc_download_errors_total` is incremented.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There has been a discussion on this... If the http endpoint is unreachable, but, for all messages the content is provided. What do we do ? How to understand "download" here ? For me, getting the data out of the embedded content is a "download". Agree ? If yes, we need to amend the text.
but is unable to download a data item from the location specified
to
but is unable to get the content from WNM or cannot download a data item from the location specified
If both content is false (wrong hash) and download fails. What do we do ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I thought that based on the discussion here download meant download. If the GC fails to extract embedded data it should attempt to download from the URL. If that also fails, we increment wmo_wis2_gc_download_errors_total. There's a case (but a pretty small edge case) where there is only embedded data. If this fails, there's no URL to try to download from. Perhaps the lack of a URL should cause the wmo_wis2_gc_download_errors_total metric to be incremented too?

Hmmm. Just realised that I'm not answering the question you're asking: what happens when data is successfully extract from the message but the HTTP resource is unreachable (e.g., it's not on the server, or the server is offline). I think we said this wouldn't trigger an error - because the GCs never attempt the download. If we want to change this, we could force the GCs to do a HTTP HEAD request to see if the resource/server are available but not actually download the data. But this would be a change to the GC behaviour.

Thoughts?

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