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

As a user, by default, I want to search only for the latest versions of all products on the /products endpoint #426

Closed
jordanpadams opened this issue Dec 23, 2021 · 4 comments
Assignees
Labels

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Dec 23, 2021

💪 Motivation

...so that I am not confused by seeing superseded data returned in search results

📖 Additional Details

Per the parent epic, and the design we need to update the API to implement these changes so we can sufficiently understand the version history.

See parent epic for more details.

⚖️ Acceptance Criteria

AC 1

Given the products urn:nasa:pds:mars2020.spice::1.0, urn:nasa:pds:mars2020.spice::2.0, and urn:nasa:pds:mars2020.spice::3.0 have been loaded into the registry (see registry-ref-data) and in archived status
When I perform a query of the API for /products and paginate through the results and/or apply any other filtering that would include this SPICE bundle
Then I expect I should get only the latest v3.0 product returned (urn:nasa:pds:mars2020.spice::3.0)

AC 2

Given the products urn:nasa:pds:mars2020.spice::1.0, urn:nasa:pds:mars2020.spice::2.0, and urn:nasa:pds:mars2020.spice::3.0 have been loaded into the registry (see registry-ref-data) and in archived status
When I perform a query of the API for /products/urn:nasa:pds:mars2020.spice::1.0
Then I expect I should get the older version 1.0 of the product (urn:nasa:pds:mars2020.spice::1.0) because it was explicitly requested

AC 3

Note: This AC depends upon the completion of this requirement: #427
Given the context products urn:nasa:pds:context:instrument:crs.vg1::1.0 and urn:nasa:pds:context:instrument:vg1.crs::1.0 ingested into the registry
When I perform a query of the API for /products and paginate through the results, or perform any additional filtering on the data
Then I expect I should only see the product metadata for urn:nasa:pds:context:instrument:vg1.crs::1.0 returned, not the superseded/deprecated urn:nasa:pds:context:instrument:crs.vg1::1.0

⚙️ Engineering Details

See parent ticket for related requirements:

@jordanpadams
Copy link
Member Author

jordanpadams commented Jun 30, 2022

alternate_ids implemented but we now need to build this into the API so we use this field and date time to properly support version histories.

@tloubrieu-jpl
Copy link
Member

@jordanpadams @al-niessner I believe it will be better to wait for the redesign to be completed before working on that.

@jordanpadams jordanpadams removed the B13.0 label Feb 3, 2023
@jordanpadams jordanpadams transferred this issue from NASA-PDS/pds-api Mar 28, 2024
@github-project-automation github-project-automation bot moved this to Release Backlog in B15.0 Mar 28, 2024
@jordanpadams jordanpadams changed the title As a user, I want to only return the latest version of a product that has changed logical identifiers in it's history As a user, I want to only return the latest version of a product, by default, in all search results Apr 18, 2024
@jordanpadams jordanpadams changed the title As a user, I want to only return the latest version of a product, by default, in all search results As a user, I want to only return the latest version of a product, by default, in all /products search results unless explicitly requested Jul 10, 2024
@jordanpadams jordanpadams changed the title As a user, I want to only return the latest version of a product, by default, in all /products search results unless explicitly requested As a user, I want to only return the latest version of a product, by default, in all API endpoints unless explicitly requested Jul 10, 2024
@jordanpadams jordanpadams changed the title As a user, I want to only return the latest version of a product, by default, in all API endpoints unless explicitly requested As a user, I want to only search for the latest versions of all products on all API endpoints, by default, unless explicitly requested Jul 10, 2024
@jordanpadams jordanpadams changed the title As a user, I want to only search for the latest versions of all products on all API endpoints, by default, unless explicitly requested As a user, by default, I want to search for the latest versions of all products on the /products endpoint unless explicitly requested Jul 11, 2024
@jordanpadams jordanpadams changed the title As a user, by default, I want to search for the latest versions of all products on the /products endpoint unless explicitly requested As a user, by default, I want to search only for the latest versions of all products on the /products endpoint Jul 19, 2024
@jordanpadams
Copy link
Member Author

@alexdunnjpl just want to confirm that this has a test in the test suite and can be closed alongside #503 #487 #484 #485 #486 ?

@github-project-automation github-project-automation bot moved this from Release Backlog to 🏁 Done in B15.0 Aug 9, 2024
@github-project-automation github-project-automation bot moved this from ToDo to 🏁 Done in EN Portfolio Backlog Aug 9, 2024
@alexdunnjpl
Copy link
Contributor

alexdunnjpl commented Aug 12, 2024

@jordanpadams There is not a distinct test for this issue, but coverage (of the common code path subsetting a result set to non-superseded products) is provided by the new tests for those tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🏁 Done
Status: 🏁 Done
Development

No branches or pull requests

4 participants