From b9d5c043bb0a0ea2a7c97b97071aa078fb2f1cb2 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" Date: Mon, 16 Oct 2023 22:01:53 +0200 Subject: [PATCH] 0 7 3 catch exceptions (#151) Don't let NextFlow die silently. --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- .../nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy | 7 ++++++- plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80efef16..0aacd619 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.7.3] 2023-10-16a + +- Catch and log exception on push failure + ## [0.7.2] 2023-10-16 - Throw exceptions on push failure diff --git a/README.md b/README.md index 51c70437..37fb020e 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ From the command-line, do, e.g.: ```bash # export NXF_VER=23.04.3 -export NXF_PLUGINS_TEST_REPOSITORY=https://github.com/quiltdata/nf-quilt/releases/download/0.7.2/nf-quilt-0.7.2-meta.json -nextflow run main.nf -plugins nf-quilt@0.7.2 +export NXF_PLUGINS_TEST_REPOSITORY=https://github.com/quiltdata/nf-quilt/releases/download/0.7.3/nf-quilt-0.7.3-meta.json +nextflow run main.nf -plugins nf-quilt@0.7.3 ``` For Tower, you can use the "Pre-run script" to set the environment variables. diff --git a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy index c887e66c..8522cf95 100644 --- a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy +++ b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy @@ -138,7 +138,12 @@ ${nextflow} log.debug("setupReadme: $text") List quilt_summarize = setupSummarize() log.debug("setupSummarize: $quilt_summarize") - pkg.push(msg, meta) + try { + pkg.push(msg, meta) + } + catch (Exception e) { + log.error("publish failed: ${e.getMessage()}\n${e}", pkg.meta) + } print("SUCCESS: $pkg\n") } diff --git a/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF b/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF index 93b32cdd..a3c9adec 100644 --- a/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF +++ b/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Plugin-Class: nextflow.quilt.QuiltPlugin Plugin-Id: nf-quilt -Plugin-Version: 0.7.2 +Plugin-Version: 0.7.3 Plugin-Provider: Quilt Data Plugin-Requires: >=22.10.6