From e43d01fa7960207d6804bb89c8d30fa624b7db30 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:32:02 +0100 Subject: [PATCH] Do not validate Azure or GCP storage paths Similar to AWS, Azure and GCP do not handle empty files and directories very well (because they aren't real!). This PR ignores them in the same manner as AWS S3 blob storage. --- .../validation/CustomEvaluators/ExistsEvaluator.groovy | 2 +- .../CustomEvaluators/FormatDirectoryPathEvaluator.groovy | 8 ++++---- .../CustomEvaluators/FormatFilePathEvaluator.groovy | 2 +- .../FormatFilePathPatternEvaluator.groovy | 2 +- .../CustomEvaluators/FormatPathEvaluator.groovy | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/ExistsEvaluator.groovy b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/ExistsEvaluator.groovy index 100789b..111ee04 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/ExistsEvaluator.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/ExistsEvaluator.groovy @@ -32,7 +32,7 @@ class ExistsEvaluator implements Evaluator { def String value = node.asString() // Skip validation of S3 paths for now - if (value.startsWith('s3://')) { + if (value.startsWith('s3://') || value.startsWith('az://') || value.startsWith('gs://')) { log.debug("S3 paths are not supported by 'ExistsEvaluator': '${value}'") return Evaluator.Result.success() } diff --git a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatDirectoryPathEvaluator.groovy b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatDirectoryPathEvaluator.groovy index 7499aaa..6ed6cbf 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatDirectoryPathEvaluator.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatDirectoryPathEvaluator.groovy @@ -25,9 +25,9 @@ class FormatDirectoryPathEvaluator implements Evaluator { def String value = node.asString() - // Skip validation of S3 paths for now - if (value.startsWith('s3://')) { - log.debug("S3 paths are not supported by 'FormatDirectoryPathEvaluator': '${value}'") + // Skip validation of blob storage paths + if (value.startsWith('s3://') || value.startsWith('az://') || value.startsWith('gs://')) { + log.debug("Cloud blob storage paths are not supported by 'FormatDirectoryPathEvaluator': '${value}'") return Evaluator.Result.success() } @@ -38,4 +38,4 @@ class FormatDirectoryPathEvaluator implements Evaluator { } return Evaluator.Result.success() } -} \ No newline at end of file +} diff --git a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathEvaluator.groovy b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathEvaluator.groovy index 47dd527..3b76153 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathEvaluator.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathEvaluator.groovy @@ -26,7 +26,7 @@ class FormatFilePathEvaluator implements Evaluator { def String value = node.asString() // Skip validation of S3 paths for now - if (value.startsWith('s3://')) { + if (value.startsWith('s3://') || value.startsWith('az://') || value.startsWith('gs://')) { log.debug("S3 paths are not supported by 'FormatFilePathEvaluator': '${value}'") return Evaluator.Result.success() } diff --git a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathPatternEvaluator.groovy b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathPatternEvaluator.groovy index 75c4dad..3160c78 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathPatternEvaluator.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatFilePathPatternEvaluator.groovy @@ -26,7 +26,7 @@ class FormatFilePathPatternEvaluator implements Evaluator { def String value = node.asString() // Skip validation of S3 paths for now - if (value.startsWith('s3://')) { + if (value.startsWith('s3://') || value.startsWith('az://') || value.startsWith('gs://')) { log.debug("S3 paths are not supported by 'FormatFilePathPatternEvaluator': '${value}'") return Evaluator.Result.success() } diff --git a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatPathEvaluator.groovy b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatPathEvaluator.groovy index 6d3ac92..bb51f51 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatPathEvaluator.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/CustomEvaluators/FormatPathEvaluator.groovy @@ -26,7 +26,7 @@ class FormatPathEvaluator implements Evaluator { def String value = node.asString() // Skip validation of S3 paths for now - if (value.startsWith('s3://')) { + if (value.startsWith('s3://') || value.startsWith('az://') || value.startsWith('gs://')) { log.debug("S3 paths are not supported by 'FormatPathEvaluator': '${value}'") return Evaluator.Result.success() }