Skip to content

PD-202 improve metadata functions - #317

Merged
mfshao merged 9 commits into
masterfrom
feat/improve-query
Oct 9, 2026
Merged

mfshao merged 9 commits into
masterfrom
feat/improve-query

Conversation

@mfshao

@mfshao mfshao commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/PD-202

New Features

Breaking Changes

Bug Fixes

Improvements

  • gen3.metadata.Gen3Metadata.query() no longer requires a query parameter, if omitted, all metadata record with MDS will be returned (subject to limit and offset)
  • gen3.metadata.Gen3Metadata() no longer requires a gen3.auth.Gen3Auth object during initialization. If functions that requires auth will be called, an message will be posted to the user and the call will return directly

Dependency updates

Deployment changes

@github-actions

Copy link
Copy Markdown

The style in this PR agrees with black. ✔️

This formatting comment was generated automatically by a script in uc-cdis/wool.

@github-actions

Copy link
Copy Markdown

Integration Tests

Test summary after running integration tests

filepath passed failed skipped SUBTOTAL
tests/test_graph_submit_and_query.py 12 1 1 14
tests/test_data_upload.py 8 0 1 9
tests/test_presigned_url.py 8 0 0 8
tests/test_centralized_auth.py 5 0 0 5
tests/test_audit_service.py 1 0 0 1
tests/test_dbgap.py 4 0 1 5
tests/test_gen3_sdk.py 1 0 0 1
tests/test_ras_passport.py 0 0 2 2
tests/test_google_data_access.py 0 1 0 1
TOTAL 39 2 5 46

Test summary after rerunning failed integration tests

filepath passed failed SUBTOTAL
tests/test_graph_submit_and_query.py 1 0 1
tests/test_google_data_access.py 0 1 1
TOTAL 1 1 2

Please find the detailed integration test report here

Please find the detailed integration test report after rerunning failed tests here

Please find the Github Action logs here

@github-actions

Copy link
Copy Markdown

Failure Analysis

Please find the detailed test analysis report here

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Integration Tests

Test summary after running integration tests

filepath passed failed skipped SUBTOTAL
tests/test_graph_submit_and_query.py 12 1 1 14
tests/test_data_upload.py 8 0 1 9
tests/test_presigned_url.py 8 0 0 8
tests/test_centralized_auth.py 5 0 0 5
tests/test_dbgap.py 4 0 1 5
tests/test_audit_service.py 1 0 0 1
tests/test_google_data_access.py 1 0 0 1
tests/test_gen3_sdk.py 1 0 0 1
tests/test_ras_passport.py 0 0 2 2
TOTAL 40 1 5 46

Test summary after rerunning failed integration tests

filepath passed SUBTOTAL
tests/test_graph_submit_and_query.py 1 1
TOTAL 1 1

Please find the detailed integration test report here

Please find the detailed integration test report after rerunning failed tests here

Please find the Github Action logs here

Comment thread gen3/metadata.py
return_full_metadata=False,
limit=10,
offset=0,
use_agg_mds=False,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will happen for calls like this that still have use_agg_mds?

partial_metadata = mds.query(
f"_guid_type={guid_type}",
return_full_metadata=True,
limit=min(limit, max_guids_per_request),
offset=offset,
use_agg_mds=use_agg_mds,

use_agg_mds will go into **kwargs and then append_query_params() will add to the request url, and I think breaks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, i removed this parameter since it is not used

Comment thread gen3/metadata.py Outdated
@@ -588,12 +654,14 @@ def delete_alias(self, guid, alias, **kwargs):
return response.json()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MDS DELETE /metadata/{guid}/aliases/{alias} returns 204 (with no json response body allowed), so response.json() errors. The removed version of delete_alias() returned response.text. I think _mock_delete_request in test_metadata.py needs to be fixed to catch this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Comment thread tests/test_metadata.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, i updated gen3sdk code and opened this PR to update MDS openapi doc

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Integration Tests

Test summary after running integration tests

filepath passed failed skipped SUBTOTAL
tests/test_graph_submit_and_query.py 12 1 1 14
tests/test_data_upload.py 8 0 1 9
tests/test_dbgap.py 4 0 1 5
tests/test_centralized_auth.py 5 0 0 5
tests/test_presigned_url.py 8 0 0 8
tests/test_audit_service.py 1 0 0 1
tests/test_google_data_access.py 1 0 0 1
tests/test_gen3_sdk.py 1 0 0 1
tests/test_ras_passport.py 0 0 2 2
TOTAL 40 1 5 46

Test summary after rerunning failed integration tests

filepath passed SUBTOTAL
tests/test_graph_submit_and_query.py 1 1
TOTAL 1 1

Please find the detailed integration test report here

Please find the detailed integration test report after rerunning failed tests here

Please find the Github Action logs here

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Integration Tests

Test summary after running integration tests

filepath passed failed skipped SUBTOTAL
tests/test_graph_submit_and_query.py 12 1 1 14
tests/test_data_upload.py 8 0 1 9
tests/test_presigned_url.py 8 0 0 8
tests/test_dbgap.py 2 2 1 5
tests/test_centralized_auth.py 5 0 0 5
tests/test_audit_service.py 1 0 0 1
tests/test_gen3_sdk.py 1 0 0 1
tests/test_ras_passport.py 0 0 2 2
tests/test_google_data_access.py 0 1 0 1
TOTAL 37 4 5 46

Test summary after rerunning failed integration tests

filepath passed failed SUBTOTAL
tests/test_dbgap.py 2 0 2
tests/test_graph_submit_and_query.py 1 0 1
tests/test_google_data_access.py 0 1 1
TOTAL 3 1 4

Please find the detailed integration test report here

Please find the detailed integration test report after rerunning failed tests here

Please find the Github Action logs here

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Failure Analysis

Please find the detailed test analysis report here

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Integration Tests

Test summary after running integration tests

filepath passed failed skipped SUBTOTAL
tests/test_graph_submit_and_query.py 12 1 1 14
tests/test_data_upload.py 8 0 1 9
tests/test_presigned_url.py 8 0 0 8
tests/test_centralized_auth.py 5 0 0 5
tests/test_audit_service.py 1 0 0 1
tests/test_dbgap.py 4 0 1 5
tests/test_google_data_access.py 1 0 0 1
tests/test_gen3_sdk.py 1 0 0 1
tests/test_ras_passport.py 0 0 2 2
TOTAL 40 1 5 46

Test summary after rerunning failed integration tests

filepath passed SUBTOTAL
tests/test_graph_submit_and_query.py 1 1
TOTAL 1 1

Please find the detailed integration test report here

Please find the detailed integration test report after rerunning failed tests here

Please find the Github Action logs here

@mfshao
mfshao merged commit 1f4d691 into master Oct 9, 2026
18 of 19 checks passed
@mfshao
mfshao deleted the feat/improve-query branch October 9, 2026 14:35
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.

3 participants