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

Investigate 'assets must be defined' error in custom stac titiler with path prefix and cloudfront #240

Closed
1 task done
anayeaye opened this issue Oct 23, 2023 · 2 comments
Assignees

Comments

@anayeaye
Copy link
Collaborator

anayeaye commented Oct 23, 2023

What

The custom STAC titiler endpoint throws errors in the dev VEDA deployment where we are also implementing path prefixes and using a cloudfront distribution. The same requests are successful with a new deployment of the backend with the latest titiler-pgstac upgrades.

Note 1 these observations are from updating veda-docs notebooks and the patterns do not appear to be currently used by our dashboards. If the appropriate solution is to transition to this Items endpoint pattern stac/collections/{collectionId}/items/{itemId} we can update the notebooks after.

Note 2 this also might be an opportunity to investigate the reverse proxy support added at v0.5+ of pgstac-titiler now that we have upgraded.

Examples

stac/tilejson.json

// 20231023100506
// https://dev.delta-backend.com/api/raster/stac/tilejson.json?collection=no2-monthly&item=OMI_trno2_0.10x0.10_202002_Col3_V4.nc&assets=cog_default&color_formula=gamma+r+1.05&colormap_name=cool&rescale=-10183824872833024,50064805976866816

{
  "detail": "assets must be defined either via expression or assets options."
}

but staging (older version of pgstac-titiler) and test (latest titler) are OK
// 20231023100619
// https://staging-raster.delta-backend.com/stac/tilejson.json?collection=no2-monthly&item=OMI_trno2_0.10x0.10_202002_Col3_V4.nc&assets=cog_default&color_formula=gamma+r+1.05&colormap_name=cool&rescale=-10183824872833024,50064805976866816

// 20231023100649
// https://test-raster.delta-backend.com/stac/tilejson.json?collection=no2-monthly&item=OMI_trno2_0.10x0.10_202002_Col3_V4.nc&assets=cog_default&color_formula=gamma+r+1.05&colormap_name=cool&rescale=-10183824872833024,50064805976866816

/stac/info

// 20231023101024
// https://dev.delta-backend.com/api/raster/stac/info?collection=no2-monthly&item=OMI_trno2_0.10x0.10_202002_Col3_V4.nc&assets=cog_default

{
  "detail": [
    {
      "type": "missing",
      "loc": [
        "query",
        "collection"
      ],
      "msg": "Field required",
      "input": null,
      "url": "https://errors.pydantic.dev/2.4/v/missing"
    },
    {
      "type": "missing",
      "loc": [
        "query",
        "item"
      ],
      "msg": "Field required",
      "input": null,
      "url": "https://errors.pydantic.dev/2.4/v/missing"
    }
  ]
}

AC

  • custom stac endpoints of raster API work as expected
@anayeaye anayeaye self-assigned this Oct 24, 2023
@anayeaye
Copy link
Collaborator Author

#241

@anayeaye
Copy link
Collaborator Author

resolved by overwriting host header of lambda api

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

No branches or pull requests

1 participant