Skip to content

Commit

Permalink
Do not validate Azure or GCP storage paths
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adamrtalbot committed Apr 30, 2024
1 parent 3e298ed commit e43d01f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand All @@ -38,4 +38,4 @@ class FormatDirectoryPathEvaluator implements Evaluator {
}
return Evaluator.Result.success()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit e43d01f

Please sign in to comment.