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

_BuildDoc.parse_backend() return wrong results for MyVariant build docs #238

Open
erikyao opened this issue Jun 28, 2022 · 0 comments
Open
Assignees

Comments

@erikyao
Copy link
Contributor

erikyao commented Jun 28, 2022

Description

Involved class: from biothings.hub.dataindex.indexer import _BuildDoc

A sample input document from myvariant_hubdb.src_build is as below:

{
    _id : "yy_test_superhot_hg19_20220628_maatbmxp"
    target_backend : "mongo"
    target_name : "yy_test_superhot_hg19_20220628_maatbmxp"
    backend_url : "yy_test_superhot_hg19_20220628_maatbmxp"

    # other fields omitted
}

With the above argument, _BuildDoc.parse_backend() will return the following backend:

_BuildBackend(host=..., port=..., dbs="myvariant", col="yy_test_superhot_hg19_20220628_maatbmxp")

while the correct backend should be:

_BuildBackend(host=..., port=..., dbs="myvariant_hubdb", col="src_build")

Hypothesis

  1. The logic of _BuildDoc.parse_backend() is wrong, or
  2. target_name and backend_url are not correctly written for MyVariant src_build docs, and thus cause _BuildDoc.parse_backend() to output wrong backends.
    • If true, we must clarify the correct values for these two fields.

Workaround

Use from biothings.utils.hub_db import get_src_build to locate the myvariant_hubdb.src_build collection for now, at least in MyVariant hub.

@erikyao erikyao self-assigned this Jun 28, 2022
@erikyao erikyao changed the title _BuildDoc.parse_backend() return wrong results _BuildDoc.parse_backend() return wrong results for MyVariant build docs Jul 1, 2022
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