Skip format validation for cloud storage paths (S3, Azure, GCS) #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Gracefully handle inaccessible cloud storage paths in format validation, instead of failing with cryptic errors.
Problem
Cloud storage paths (
s3://,az://,gs://) may fail validation when users don't have credentials or permissions to access them. This causes errors like:This affects multiple nf-core pipelines that have default S3 paths for resources like annotation caches or iGenomes.
Why this affects multiple pipelines
The issue is triggered by
format: directory-path(and similar format keywords) even withoutexists: true. The format evaluator callsfile.exists()to verify the path is accessible and is actually a directory:format: directory-path+exists: trueformat: directory-pathonlySame symptom, slightly different triggers - but both fixed by handling inaccessible cloud paths gracefully in the evaluators.
Solution
Take a targeted approach that preserves validation when possible:
exists()/isDirectory()calls for cloud paths and skip validation gracefully instead of failingThis means:
Changes
isCloudStoragePath()helper toCommon.groovy(single source of truth)FormatDirectoryPathEvaluator.groovy- Graceful handling for inaccessible cloud pathsFormatFilePathEvaluator.groovy- Graceful handling for inaccessible cloud pathsFormatFilePathPatternEvaluator.groovy- Graceful handling for inaccessible cloud pathsExistsEvaluator.groovy- Graceful handling for inaccessible cloud pathsSchemaEvaluator.groovy- Graceful handling for inaccessible cloud pathsRelationship with PR #179
PR #179 addresses a related issue specifically for Azure. This PR:
Related
Test plan
🤖 Generated with Claude Code