diff --git a/packages/wrangler/src/pipelines/cli/list.ts b/packages/wrangler/src/pipelines/cli/list.ts index a0bab35a7ac3..c47378f781a0 100644 --- a/packages/wrangler/src/pipelines/cli/list.ts +++ b/packages/wrangler/src/pipelines/cli/list.ts @@ -5,10 +5,12 @@ import { requireAuth } from "../../user"; import { listPipelines } from "../client"; import type { CommonYargsOptions } from "../../yargs-types"; import type { ArgumentsCamelCase } from "yargs"; +import { printWranglerBanner } from "../../wrangler-banner"; export async function listPipelinesHandler( args: ArgumentsCamelCase ) { + await printWranglerBanner(); const config = readConfig(args); const accountId = await requireAuth(config); diff --git a/packages/wrangler/src/pipelines/index.ts b/packages/wrangler/src/pipelines/index.ts index 9448c1c406c2..86a1415fb766 100644 --- a/packages/wrangler/src/pipelines/index.ts +++ b/packages/wrangler/src/pipelines/index.ts @@ -1,4 +1,5 @@ import { HeadBucketCommand, S3Client } from "@aws-sdk/client-s3"; +import { getCloudflareApiEnvironmentFromEnv } from "../environment-variables/misc-variables"; import { FatalError } from "../errors"; import { logger } from "../logger"; import { APIError } from "../parse"; @@ -49,7 +50,7 @@ export async function authorizeR2Bucket( endpoint: getAccountR2Endpoint(accountId), }); - // Wait for token to settle/propagate, retry up to 10 times, with 1s waits in-between errors + // Wait for token to settle/propagate, retry up to 10 times, with 2s waits in-between errors !__testSkipDelaysFlag && (await retryOnError( async () => { @@ -59,7 +60,7 @@ export async function authorizeR2Bucket( }) ); }, - 1000, + 2000, 10 )); @@ -67,6 +68,10 @@ export async function authorizeR2Bucket( } export function getAccountR2Endpoint(accountId: string) { + const env = getCloudflareApiEnvironmentFromEnv(); + if (env === "staging") { + return `https://${accountId}.r2-staging.cloudflarestorage.com`; + } return `https://${accountId}.r2.cloudflarestorage.com`; }