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

Replace snapshot and remove workaround (#5229) #5313

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployments/anvilprod/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def mkdict(previous_catalog: dict[str, str],


anvil_sources = mkdict({}, 3, mkdelta([
mksrc('datarepo-dev-43738c90', 'ANVIL_1000G_2019_Dev_20230302_ANV5_202303032342', 22814),
mksrc('datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
hannes-ucsc marked this conversation as resolved.
Show resolved Hide resolved
mksrc('datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
]))
Expand Down
17 changes: 9 additions & 8 deletions test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TextIOWrapper,
)
from itertools import (
chain,
starmap,
)
import json
Expand Down Expand Up @@ -71,9 +72,11 @@
service_account,
)
from more_itertools import (
always_iterable,
first,
grouper,
one,
only,
)
from openapi_spec_validator import (
validate_spec,
Expand Down Expand Up @@ -985,16 +988,14 @@ def _get_indexed_bundles(self,
version=bundle['bundleVersion']
)
if config.is_anvil_enabled(catalog):
# Biosamples are used as bundle entities for primary bundles
# and are never present in supplementary bundles.
# We cannot use the `files.is_supplementary` field to
# determine whether a bundle is supplementary or not due to
# false positives in the current snapshots
# (https://github.com/DataBiosphere/azul/issues/5229)
is_supplementary = only(set(chain.from_iterable(
always_iterable(file['is_supplementary'])
for file in hit['files']
)), default=False)
bundle_fqid['entity_type'] = (
BundleEntityType.primary.value
if hit['biosamples'] else
BundleEntityType.supplementary.value
if is_supplementary else
BundleEntityType.primary.value
)
bundle_fqid = self.repository_plugin(catalog).resolve_bundle(bundle_fqid)
indexed_fqids.add(bundle_fqid)
Expand Down