Skip to content

HARMONY-1995: As a user, I want Harmony to handle service a response that indicates that a result contains no data.#705

Merged
ygliuvt merged 5 commits intomainfrom
harmony-1995
Feb 28, 2025
Merged

HARMONY-1995: As a user, I want Harmony to handle service a response that indicates that a result contains no data.#705
ygliuvt merged 5 commits intomainfrom
harmony-1995

Conversation

@ygliuvt
Copy link
Copy Markdown
Member

@ygliuvt ygliuvt commented Feb 26, 2025

Jira Issue ID

HARMONY-1995

Description

As a user, I want Harmony to handle service a response that indicates that a result contains no data.

Local Test Steps

Modify harmony-service-example to create nodata warnings for specific granules to facilitate with the testing. e.g. add from harmony_service_lib.exceptions import NoDataException at the top and the following to around line 98 of transform.py in harmony-service-example:

if asset.href == 'https://harmony.uat.earthdata.nasa.gov/service-results/harmony-uat-eedtest-data/C1233800302-EEDTEST/nc/001_00_7f00ff_global.nc' or asset.href == 'https://harmony.uat.earthdata.nasa.gov/service-results/harmony-uat-eedtest-data/C1233800302-EEDTEST/nc/001_07_7f00ff_north_america.nc':
   raise NoDataException("Ain't got no data")

to simulate two nodata warnings for the first two granules in this harmony request:
http://localhost:3000/C1233800302-EEDTEST/ogc-api-coverages/1.0.0/collections/red_var,blue_var,green_var/coverage/rangeset/?subset=lat(20%3A60)&subset=lon(-140%3A-50)&outputCrs=EPSG%3A31975&format=image%2Fpng&maxResults=3

You can simulate the entire job's work items all have nodata warnings or a single nodata warning error by changing the maxResults to 2 or 1. And feel free to test with chains with multiple services.

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)
  • Harmony in a Box tested? (if changes made to microservices or new dependencies added)

Copy link
Copy Markdown
Contributor

@indiejames indiejames left a comment

Choose a reason for hiding this comment

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

Tested locally (hiab as well as dev) and in sandbox.

@ygliuvt ygliuvt merged commit e6de2b4 into main Feb 28, 2025
5 checks passed
@ygliuvt ygliuvt deleted the harmony-1995 branch February 28, 2025 16:56
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