Skip to content

Commit

Permalink
Add missing header to wave container await [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Jul 19, 2023
1 parent f9f2c33 commit d39866e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import java.time.temporal.ChronoUnit
import java.util.concurrent.Callable
import java.util.concurrent.TimeUnit
import java.util.function.Predicate
import java.util.regex.Pattern

import com.google.common.cache.Cache
import com.google.common.cache.CacheBuilder
Expand Down Expand Up @@ -69,7 +68,14 @@ class WaveClient {

private static Logger log = LoggerFactory.getLogger(WaveClient)

private static final Pattern CONTAINER_PATH = ~/(\S+)\/wt\/([a-z0-9]+)\/\S+/
final static private String[] REQUEST_HEADERS = new String[]{
'Content-Type','application/json',
'Accept','application/json',
'Accept','application/vnd.oci.image.index.v1+json',
'Accept','application/vnd.oci.image.manifest.v1+json',
'Accept','application/vnd.docker.distribution.manifest.v1+prettyjws',
'Accept','application/vnd.docker.distribution.manifest.v2+json',
'Accept','application/vnd.docker.distribution.manifest.list.v2+json' }

private static final List<String> DEFAULT_CONDA_CHANNELS = ['conda-forge','defaults']

Expand Down Expand Up @@ -483,7 +489,7 @@ class WaveClient {
final manifest = imageToManifestUri(image)
final req = HttpRequest.newBuilder()
.uri(manifest)
.headers('Content-Type','application/json')
.headers(REQUEST_HEADERS)
.timeout(Duration.ofSeconds(15 * 60 + 10))
.GET()
.build()
Expand Down

0 comments on commit d39866e

Please sign in to comment.