Skip to content
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

Harmony only returns a link for one asset when a backend service produces multiple #110

Closed
frankinspace opened this issue Dec 1, 2021 · 0 comments · Fixed by #111
Closed
Labels
bug Something isn't working

Comments

@frankinspace
Copy link
Contributor

Environment
Harmony-in-a-box, Harmony UAT, Harmony OPS

Steps to Reproduce
In UAT

  1. http://{{harmony_host}}/C1238621141-POCLOUD/ogc-api-coverages/1.0.0/collections/analysed_sst/coverage/rangeset?width=36000&height=17999&format=image/png&granuleId=G1240564967-POCLOUD&forceAsync=true&turbo=true
  2. Wait for job to complete
  3. http://{{harmony_host}}/jobs/{{job_id}}

Expected Result

Job result should contain at least two links: one for the png file and one for the wld file.

Actual Result

Job result only contains link to png file.

Details

The asfgdal service has been updated to stage a wld file and return it as an additional asset in the item entry for a granule:
https://github.com/asfadmin/asf-harmony-gdal/blob/ea28edd81ad64f0e1a3edabed693120ab9a79113/gdal_subsetter/transform.py#L216-L228

There is a unit test that verifies the catalog returned from the service contains two items:
https://github.com/asfadmin/asf-harmony-gdal/blob/ea28edd81ad64f0e1a3edabed693120ab9a79113/tests/test_transform_no_download.py#L68-L70

When running harmony locally, I was able to extract the item.json produced as output from the harmony adapter itself, which also shows the two assets:

{
    "type": "Feature",
    "stac_version": "1.0.0-beta.2",
    "id": "d9874dac-59e5-424e-b346-9a6a62d2627c",
    "properties": {
        "start_datetime": "2021-04-29T21:00:00.000Z",
        "end_datetime": "2021-04-30T21:00:00.000Z",
        "datetime": null
    },
    "geometry": {"type":"Polygon","coordinates":[[[-179.9950055,-89.9949985],[-179.9950055,89.9949979],[-179.9949983,89.9949979],[-179.9949983,-89.9949985],[-179.9950055,-89.9949985]]]    },
    "links": [
        {
            "rel": "root",
            "href": "../catalog.json",
            "type": "application/json"
        },
        {
            "rel": "parent",
            "href": "../catalog.json",
            "type": "application/json"
        }
    ],
    "assets": {
        "data": {
            "href": "s3://local-staging-bucket/public/asfdataservices/gdal-subsetter/e07cb268-1cef-4bd1-90db-25bcab327506/20210430090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1_analysed_sst_regridded.png",
            "type": "image/png",
            "title": "20210430090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1_analysed_sst_regridded.png",
            "roles": ["data"]
        },
        "metadata": {
            "href": "s3://local-staging-bucket/public/asfdataservices/gdal-subsetter/e07cb268-1cef-4bd1-90db-25bcab327506/20210430090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1_analysed_sst_regridded.wld",
            "type": "text/plain",
            "title": "20210430090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1_analysed_sst_regridded.wld",
            "roles": ["metadata"]
        }
    },
    "bbox": [-179.9950055,-89.9949985,-179.9949983,89.9949979],
    "stac_extensions": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant