{"action":"created","issue":{"url":"https://api.github.com/repos/ga4gh/server/issues/453","labels_url":"https://api.github.com/repos/ga4gh/server/issues/453/labels{/name}","comments_url":"https://api.github.com/repos/ga4gh/server/issues/453/comments","events_url":"https://api.github.com/repos/ga4gh/server/issues/453/events","html_url":"https://github.com/ga4gh/server/issues/453","id":88755219,"number":453,"title":"Datasets not found correctly by _getDatasetFromRequest","user":{"login":"jeromekelleher","id":2664569,"avatar_url":"https://avatars.githubusercontent.com/u/2664569?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromekelleher","html_url":"https://github.com/jeromekelleher","followers_url":"https://api.github.com/users/jeromekelleher/followers","following_url":"https://api.github.com/users/jeromekelleher/following{/other_user}","gists_url":"https://api.github.com/users/jeromekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromekelleher/subscriptions","organizations_url":"https://api.github.com/users/jeromekelleher/orgs","repos_url":"https://api.github.com/users/jeromekelleher/repos","events_url":"https://api.github.com/users/jeromekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/jeromekelleher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ga4gh/server/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"dcolligan","id":7422120,"avatar_url":"https://avatars.githubusercontent.com/u/7422120?v=3","gravatar_id":"","url":"https://api.github.com/users/dcolligan","html_url":"https://github.com/dcolligan","followers_url":"https://api.github.com/users/dcolligan/followers","following_url":"https://api.github.com/users/dcolligan/following{/other_user}","gists_url":"https://api.github.com/users/dcolligan/gists{/gist_id}","starred_url":"https://api.github.com/users/dcolligan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcolligan/subscriptions","organizations_url":"https://api.github.com/users/dcolligan/orgs","repos_url":"https://api.github.com/users/dcolligan/repos","events_url":"https://api.github.com/users/dcolligan/events{/privacy}","received_events_url":"https://api.github.com/users/dcolligan/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-06-16T15:10:05Z","updated_at":"2015-07-09T16:02:50Z","closed_at":"2015-07-09T16:02:50Z","body":"Currently, we try to get a dataset for all incoming search requests via the `_getDatasetFromRequest` method. This works fine for request where a `datasetIds` attribute is included, but is broken for others (searchVariants for example). Currently, if we have more than one dataset, the searchVariants method fails mysteriously. There are no plans to include a datasetIds attribute in the `searchVariants` method, so the premise of this function is flawed (which I should have caught in review; my bad).\r\n\r\nWhen we have a dataset attribute, for example in readGroupSets generator, we can use `_getDatasetFromRequest`, but removing the check to see if it has the `datasetIds` attribute (as it shouldn't be called on any request object that doesn't have a datasetIds attribute).\r\n\r\nWhen we do not have a dataset attribute (such as in searchVariants), we need some method of finding the dataset that a particular variant set belongs to; there are two basic options I think:\r\n\r\n1. Maintain a map of variantSetIds to datasets in the backend; or \r\n2. Make a hierarchical ID scheme such that we can always derive the datasetId from a variantSetId. For example, if we make variantSetIds in the form `{dataSetId}:{localVariantSetId}`, we can decompose the datasetId quickly, allowing us to find the relevant dataset.\r\n\r\nI think (2) is the best and simplest option. We'll need to revise the ID generation code throughout the datamodel code, and systematise it. This is overdue though."},"comment":{"url":"https://api.github.com/repos/ga4gh/server/issues/comments/120049739","html_url":"https://github.com/ga4gh/server/issues/453#issuecomment-120049739","issue_url":"https://api.github.com/repos/ga4gh/server/issues/453","id":120049739,"user":{"login":"dcolligan","id":7422120,"avatar_url":"https://avatars.githubusercontent.com/u/7422120?v=3","gravatar_id":"","url":"https://api.github.com/users/dcolligan","html_url":"https://github.com/dcolligan","followers_url":"https://api.github.com/users/dcolligan/followers","following_url":"https://api.github.com/users/dcolligan/following{/other_user}","gists_url":"https://api.github.com/users/dcolligan/gists{/gist_id}","starred_url":"https://api.github.com/users/dcolligan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcolligan/subscriptions","organizations_url":"https://api.github.com/users/dcolligan/orgs","repos_url":"https://api.github.com/users/dcolligan/repos","events_url":"https://api.github.com/users/dcolligan/events{/privacy}","received_events_url":"https://api.github.com/users/dcolligan/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T16:02:50Z","updated_at":"2015-07-09T16:02:50Z","body":"Fixed in #474"}}