Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sour-parrots-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@redocly/cli": patch
---

Increased the default fetch timeout used by the `push` command to better support slower uploads.
4 changes: 2 additions & 2 deletions packages/cli/src/reunite/api/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { logger } from '@redocly/openapi-core';
import type { ReadStream } from 'node:fs';
import type { Readable } from 'node:stream';

import { DEFAULT_FETCH_TIMEOUT, SOURCE_FETCH_TIMEOUT } from '../../utils/constants.js';
import { DEFAULT_FETCH_TIMEOUT } from '../../utils/constants.js';
import fetchWithTimeout, { type FetchWithTimeoutOptions } from '../../utils/fetch-with-timeout.js';
import { version } from '../../utils/package.js';
import type {
Expand Down Expand Up @@ -125,7 +125,7 @@ class RemotesApi {
const response = await this.client.request(
`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/source`,
{
timeout: SOURCE_FETCH_TIMEOUT,
timeout: DEFAULT_FETCH_TIMEOUT,
method: 'GET',
headers: {
'Content-Type': 'application/json',
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const OTEL_URL = 'https://otel.cloud.redocly.com';
export const OTEL_TRACES_URL = process.env.OTEL_TRACES_URL || `${OTEL_URL}/v1/traces`;
export const DEFAULT_FETCH_TIMEOUT = 3000;
export const SOURCE_FETCH_TIMEOUT = 6000;
export const DEFAULT_FETCH_TIMEOUT = 6000;
export const ANONYMOUS_ID_CACHE_FILE = 'redocly-cli-anonymous-id';
Loading