diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index 5724c5543d2..c8077132cc4 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -174,7 +174,7 @@ def set_metadata_portable(): # Load outputs. import_model_store = store.imported_store_for_metadata('metadata/outputs_new', object_store=object_store) - export_store = store.DirectoryModelExportStore('metadata/outputs_populated', serialize_dataset_objects=True, for_edit=True) + export_store = store.DirectoryModelExportStore('metadata/outputs_populated', serialize_dataset_objects=True, for_edit=True, strip_metadata_files=False) for output_name, output_dict in outputs.items(): if extended_metadata_collection: diff --git a/lib/galaxy/model/metadata.py b/lib/galaxy/model/metadata.py index c257e2960e4..0bbc87eeb4c 100644 --- a/lib/galaxy/model/metadata.py +++ b/lib/galaxy/model/metadata.py @@ -524,8 +524,7 @@ class FileParameter(MetadataParameter): return None if isinstance(value, galaxy.model.MetadataFile) or isinstance(value, MetadataTempFile): return value - mf = session.query(galaxy.model.MetadataFile).get(value) - return mf + return session.query(galaxy.model.MetadataFile).get(value) def make_copy(self, value, target_context, source_context): value = self.wrap(value, object_session(target_context.parent)) @@ -540,7 +539,10 @@ class FileParameter(MetadataParameter): @classmethod def marshal(cls, value): if isinstance(value, galaxy.model.MetadataFile): - value = value.id + # We want to push value.id to the database, but need to skip this when no session is available, + # as in extended_metadata mode, so there we just accept MetadataFile. + # We will only serialize MetadataFile in this mode and not push to the database, so this is OK. + value = value.id or value return value def from_external_value(self, value, parent, path_rewriter=None): diff --git a/test/functional/tools/metadata_bam.xml b/test/functional/tools/metadata_bam.xml index 2f20be5b531..6cf73b2e9c3 100644 --- a/test/functional/tools/metadata_bam.xml +++ b/test/functional/tools/metadata_bam.xml @@ -1,5 +1,8 @@ - - echo "${ref_names}" > "${output_of_input_metadata}" + + '${output_of_input_metadata}' + ]]> diff --git a/test/integration/test_pulsar_embedded_metadata.py b/test/integration/test_pulsar_embedded_metadata.py index cd59298a45d..4ba5a600c7d 100644 --- a/test/integration/test_pulsar_embedded_metadata.py +++ b/test/integration/test_pulsar_embedded_metadata.py @@ -20,8 +20,9 @@ class EmbeddedMetadataPulsarIntegrationInstance(integration_util.IntegrationInst # We set the global metadata_strategy to `extended, but`metadata_strategy is # being overridden in embedded_pulsar_metadata_job_conf.yml, since extended_metadata does not yet work on pulsar config['metadata_strategy'] = 'extended' + config['retry_metadata_internally'] = False instance = integration_util.integration_module_instance(EmbeddedMetadataPulsarIntegrationInstance) -test_tools = integration_util.integration_tool_runner(["simple_constructs"]) +test_tools = integration_util.integration_tool_runner(["simple_constructs", "metadata_bam"])