diff --git a/test/.papi/descriptors/package.json b/test/.papi/descriptors/package.json index ec63705d..19d94738 100644 --- a/test/.papi/descriptors/package.json +++ b/test/.papi/descriptors/package.json @@ -1,5 +1,5 @@ { - "version": "0.1.0-autogenerated.14950524012264222870", + "version": "0.1.0-autogenerated.4891319136699380765", "name": "@polkadot-api/descriptors", "files": [ "dist" diff --git a/test/.papi/metadata/datahaven.scale b/test/.papi/metadata/datahaven.scale index 28e8ceaa..a33f2fdb 100644 Binary files a/test/.papi/metadata/datahaven.scale and b/test/.papi/metadata/datahaven.scale differ diff --git a/test/cli/handlers/common/relayer.ts b/test/cli/handlers/common/relayer.ts index 91d7c0dc..1bbdcfe4 100644 --- a/test/cli/handlers/common/relayer.ts +++ b/test/cli/handlers/common/relayer.ts @@ -240,6 +240,9 @@ export const initEthClientPallet = async ( const addHostParam = process.platform === "linux" ? "--add-host host.docker.internal:host-gateway" : ""; + // Opportunistic pull - pull the image from Docker Hub only if it's not a local image + const isLocal = relayerImageTag.endsWith(":local"); + logger.debug("Generating beacon checkpoint"); const datastoreHostPath = path.resolve(datastorePath); const command = `docker run \ @@ -248,10 +251,10 @@ export const initEthClientPallet = async ( -v ${datastoreHostPath}:/data \ --name generate-beacon-checkpoint \ --platform linux/amd64 \ - --pull always \ --workdir /app \ ${addHostParam} \ ${launchedNetwork.networkName ? `--network ${launchedNetwork.networkName}` : ""} \ + ${isLocal ? "" : "--pull always"} \ ${relayerImageTag} \ generate-beacon-checkpoint --config beacon-relay.json --export-json`; logger.debug(`Running command: ${command}`); diff --git a/test/cli/handlers/launch/relayer.ts b/test/cli/handlers/launch/relayer.ts index 786b1586..0a3a2f11 100644 --- a/test/cli/handlers/launch/relayer.ts +++ b/test/cli/handlers/launch/relayer.ts @@ -191,6 +191,9 @@ export const launchRelayers = async (options: LaunchOptions, launchedNetwork: La launchedNetwork ); + // Opportunistic pull - pull the image from Docker Hub only if it's not a local image + const isLocal = options.relayerImageTag.endsWith(":local"); + for (const { configFilePath, name, config, pk } of relayersToStart) { try { const containerName = `snowbridge-${config.type}-relay`; @@ -205,8 +208,6 @@ export const launchRelayers = async (options: LaunchOptions, launchedNetwork: La "docker", "run", "-d", - "--pull", - "always", "--platform", "linux/amd64", "--add-host", @@ -214,7 +215,8 @@ export const launchRelayers = async (options: LaunchOptions, launchedNetwork: La "--name", containerName, "--network", - networkName + networkName, + ...(isLocal ? [] : ["--pull", "always"]) ]; const volumeMounts: string[] = ["-v", `${hostConfigFilePath}:${containerConfigFilePath}`];