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

chore: GET /collections/:collection_id should return the correct dataset_id #4006

Merged
merged 2 commits into from
Jan 19, 2023

Conversation

ebezzi
Copy link
Member

@ebezzi ebezzi commented Jan 19, 2023

Reviewers

Functional:
@Bento007 @nayib-jose-gloria

Readability:


Changes

  • When calling GET /collections/:collection_id, the dataset id should only be a version_id if the collection is a revision. This is consistent with the explorer_url and the general behavior of the curation API
  • Rename use_canonical_url to use_canonical_id for additional clarity

@ebezzi ebezzi enabled auto-merge (squash) January 19, 2023 01:11
@ebezzi ebezzi merged commit a58b1cc into main Jan 19, 2023
@ebezzi ebezzi deleted the ebezzi/dataset-id-in-curation-api-fix branch January 19, 2023 01:16
Bento007 added a commit that referenced this pull request Jan 20, 2023
* fix: FMG icon not hiding for < 25 cells (#3946)

* feat(curation API): newly unpublished collections return canonical collection_id in API (#3948)

* feat: data submitters want collections to document their consortia (#3875)

feat: data submitters want collections to document their consortia

feat: add default empty consortia to create collection

fix: fix texts for consortia on portal-api

fix: update default for consortia to empty list

feat: Add optional Consortia dropdown in New and Edit Collection with the required enumeration of approved consortia (#3642)

feat: update edit collection form consortia dropdown with latest SDS dropdown component and style adjustments.

fix: Linting and minor style updates.

feat: added tests for updating consortia

feat: validate consortia

feat: add consortia to curation/discover API

refactor: mock valid consortia

fix: also override valid_consortia in business layer tests for #348

refactor: add explicit exception type for invalid collection metadata for #348

fix: fix format errors for #348

fix: fix lint errors for #348

fix: make consortia required on portal API collection response for #348

* fix: disable portal on consortia dropdown to maintain focus within create collection dialog.

* refactor: break apart large tests

* feat: added new discovery api test

Co-authored-by: Fran McDade <[email protected]>

* chore: cxg links are permalinks for new unpublished collections (#3957)

* chore: cxg links are permalinks for new unpublished collections

* curation API

* rename

* lint

* chore: use canonical collection_id in curation API responses (#3964)

* Fix curation post dataset for unpublished collections (#3966)

* fix: support null metadata and double lookup for write datasets (#3968)

* fix: support null metadata and double lookup for write datasets

* PR changes

* split test into 2

* fix: improve dataset identifiers (#3967)

* fix: improve dataset identifiers

* Linter

* Test declutter

* new test+overhaul

* refactor: Refactor consortia type (#3973) (#3974)

Co-authored-by: Fran McDade <[email protected]>

* fix: local dev database config / secret name (#3985)

Recent commit 4e6c4e2 simplified the '../database_local' secret name
to '../database'. However, local dev case exceptions still caused the
database config to look for a '../database_local' secret.

* fix: handle null metadata in curation API GET collection (take 2) (#3986)

* fix: handle null metadata case (take 2)

* Linter

* Update scripts/setup_dev_data.sh

* fix: Portal Get /collections (#3980)

* Fix Portal Get /collections

- We need to return the canonical collection_id for a new unpublished collections when list all the collections. This technically isn't user facing problem but it would mean we no longer have working functional test if we don't fix this way. Since we do not openly disclose the version ID we wont be able to determine if a collection was successfully listed by get collection since creating a collection only return the canonical collection ID.

* test: update the revision functional test to use the right explorer_url (#3993)

* test: update the revision functional test to use the correct explorer_url

* lint

Co-authored-by: Trent Smith <[email protected]>

* fix: add double lookup in dataset submissions lambda (#3994)

* feat: adding search and details to dataset filter (#3905)

* chore: POST /datasets returns the canonical dataset_id (#3999)

* fix(curation api): GET /collections/{collection_id}/datasets/{dataset_id} (#3995)

* fix(curation api): GET /collections/{collection_id}/datasets/{dataset_id}
- added tests for revision_of in GET /collections/{collection_id}/datasets/{dataset_id}
- revision_of only refers to the published dataset when revising a dataset. Otherwise it is NULL.
- fix typing in test code

* return the canonical dataset id when POSTing a dataset.

* fix: check whether revision's consortia list has changed when determining whether collection has updates (#4003)

Signed-off-by: nayib-jose-gloria <[email protected]>

Signed-off-by: nayib-jose-gloria <[email protected]>

* chore: GET collections/:collection_id should return the correct dataset_id (#4006)

* fix: add retries to dataset pipeline for failure and success handlers. (#4004)

* fix: add retries to dataset pipeline for failure and success handlers.

* fix typo

* feat: cronjob to remove old rdev stacks (#4008)

* fix: verion of happy-cleanup

* fix: Adapt RevisionStatusTag to use redesigned data model (#4009)

* fix: Adapt RevisionStatusTag to use redesigned data model

Signed-off-by: nayib-jose-gloria <[email protected]>

* fix 'updated' logic

Signed-off-by: nayib-jose-gloria <[email protected]>

Signed-off-by: nayib-jose-gloria <[email protected]>

* fix: stack name parsing bug

This version update fixes a JSON parsing bug in the Github Action

* docs: add valid consortia to swagger apis (#3997) (#4010)

* fix: sort consortia on collection create or edit (#3996) (#4015)

* fix: sort consortia on collection create or edit (#3996)

* fix: update collection handles DOI correctly (#4017)

* fix: check for Revision Changes accounts for deleted datasets in new data model + refactor Collection checks (#4016)

* fix: check for Revision Changes accounts for deleted datasets in new data model + refactor Collection checks

Signed-off-by: nayib-jose-gloria <[email protected]>

* pr feedback

Signed-off-by: nayib-jose-gloria <[email protected]>

Signed-off-by: nayib-jose-gloria <[email protected]>

Signed-off-by: nayib-jose-gloria <[email protected]>
Co-authored-by: ashin-czi <[email protected]>
Co-authored-by: David Rogers <[email protected]>
Co-authored-by: Fran McDade <[email protected]>
Co-authored-by: Emanuele Bezzi <[email protected]>
Co-authored-by: Fran McDade <[email protected]>
Co-authored-by: Daniel Hegeman <[email protected]>
Co-authored-by: Nayib Gloria <[email protected]>
Co-authored-by: Jake Heath <[email protected]>
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.

2 participants