Skip to content

Commit

Permalink
isBucketAccessible
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Nov 1, 2024
1 parent 9f1ac35 commit d96723d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions plugins/nf-quilt/src/main/nextflow/quilt/QuiltObserver.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class QuiltObserver implements TraceObserver {
println('\tonFilePublish.QuiltPathify')
QuiltPathify pathify = new QuiltPathify(destination)
println("\tonFilePublish.pathify: $pathify")
if (!pathify.bucketExists()) {
log.debug("onFilePublish.bucketExists[false]: $pathify")
if (!pathify.isBucketAccessible()) {
log.debug("onFilePublish.isBucketAccessible[false]: $pathify")
return
}
println("\tonFilePublish.isOverlay: ${pathify.isOverlay}")
Expand Down
4 changes: 2 additions & 2 deletions plugins/nf-quilt/src/main/nextflow/quilt/QuiltPathify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ class QuiltPathify {
return true
}

boolean bucketExists() {
return pkg.bucketExists()
boolean isBucketAccessible() {
return pkg.isBucketAccessible()
}

String pkgKey() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ class QuiltPackage {
return installed
}

boolean bucketExists() {
boolean isBucketAccessible() {
S3PhysicalKey key = new S3PhysicalKey(bucket, '', null)
try {
key.listRecursively()
} catch (Exception e) {
log.error("bucketExists: failed to check $bucket", e)
log.error("isBucketAccessible: failed to check $bucket", e)
return false
}
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class QuiltObserverTest extends QuiltSpecification {
// uninitialized
observer.onFilePublish(validPath, validPath.localPath())
then:
validPath.pkg().bucketExists() == true
validPath.pkg().isBucketAccessible() == true
observer.publishedPaths.size() == 0
}

Expand Down Expand Up @@ -104,7 +104,7 @@ class QuiltObserverTest extends QuiltSpecification {
observer.onFilePublish(validPath, validPath.localPath())
observer.onFlowComplete()
then:
validPath.pkg().bucketExists() == true
validPath.pkg().isBucketAccessible() == true
observer.publishedPaths.size() == 1
}

Expand Down

0 comments on commit d96723d

Please sign in to comment.