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

stac-fastapi v3 removed the Context extension #692

Closed
jtherrmann opened this issue Jan 3, 2025 · 2 comments
Closed

stac-fastapi v3 removed the Context extension #692

jtherrmann opened this issue Jan 3, 2025 · 2 comments
Labels
Jira Bug Create a Jira Bug for this issue

Comments

@jtherrmann
Copy link
Contributor

jtherrmann commented Jan 3, 2025

Jira: https://asfdaac.atlassian.net/browse/TOOL-3388

Note: The above link is accessible only to members of ASF.


Release v0.3.6 broke the API because it upgraded the stac-fastapi.pgstac dependency from 2.5.0 to 3.0.1 without removing the Context extension, which is no longer supported as of stac-fastapi v3.0.0.

@jtherrmann jtherrmann added the Jira Bug Create a Jira Bug for this issue label Jan 3, 2025
@jtherrmann
Copy link
Contributor Author

jtherrmann commented Jan 3, 2025

Fixed by another release: #694

The resolution was just to remove context from the list of enabled extensions. It seems that the context field still appears in our API responses, e.g. https://stac.asf.alaska.edu/collections/sentinel-1-global-coherence/items:

  "context": {
    "limit": 10,
    "returned": 10
  }

Although, the current stac-fastapi Changelog includes the following under "Unreleased":

Remove deprecated context property in types.stac.ItemCollection model

So maybe that field will go away soon.

Note that according to stac-utils/stac-pydantic#138 and radiantearth/stac-api-spec#396, the context functionality has been replaced by numberMatched and numberReturned from OGC API, though I haven't found an example query to confirm whether those fields appear in our API responses.

In any case, I think we can consider this fixed unless more problems surface.

@jtherrmann jtherrmann mentioned this issue Jan 3, 2025
1 task
@jtherrmann
Copy link
Contributor Author

Also note that we did try to downgrade stac-fastapi.pgstac back to 2.5.0 as a quick fix, which also required downgrading pypgstac[psycopg] from 0.8.6 to 0.7.10, but our make configure-database command failed with Could not determine path to get from 0.8.6 to 0.7.10 during the CodeBuild run, so it's worth keeping in mind from now on that reverting an already-deployed pypgstac[psycopg] upgrade is not an easy process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Bug Create a Jira Bug for this issue
Projects
None yet
Development

No branches or pull requests

1 participant