Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.72] Backport - Reduce theme upload batch size to prevent timeout #5123

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

jamesmengo
Copy link
Contributor

Backport of #5113

@jamesmengo jamesmengo requested review from a team as code owners December 18, 2024 19:44
@jamesmengo jamesmengo self-assigned this Dec 18, 2024
Copy link
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

packages/cli-kit/dist/public/node/api/http.d.ts
export {};

Existing type declarations

packages/cli-kit/dist/public/common/version.d.ts
@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "3.72.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.72.1";
\ No newline at end of file
packages/cli-kit/dist/public/node/fs.d.ts
@@ -171,19 +171,12 @@ export declare function fileSize(path: string): Promise<number>;
  * @returns The size of the file in bytes.
  */
 export declare function fileSizeSync(path: string): number;
-/**
- * Synchronously unlink a file at the given path.
- *
- * @param path - Path to the file.
- */
-export declare function unlinkFileSync(path: string): void;
 /**
  * Unlink a file at the given path.
- *
  * @param path - Path to the file.
  * @returns A promise that resolves when the file is unlinked.
  */
-export declare function unlinkFile(path: string): Promise<void>;
+export declare function unlinkFileSync(path: string): void;
 /**
  * Create a read stream for a file with optional options.
  *
packages/cli-kit/dist/public/node/git.d.ts
@@ -97,13 +97,6 @@ export declare class OutsideGitDirectoryError extends AbortError {
  * @param directory - The directory to check.
  */
 export declare function ensureInsideGitDirectory(directory?: string): Promise<void>;
-/**
- * Returns true if the given directory is inside a .git directory tree.
- *
- * @param directory - The directory to check.
- * @returns True if the directory is inside a .git directory tree.
- */
-export declare function insideGitDirectory(directory?: string): Promise<boolean>;
 export declare class GitDirectoryNotCleanError extends AbortError {
 }
 /**
packages/cli-kit/dist/public/node/monorail.d.ts
@@ -2,7 +2,7 @@ import { JsonMap } from '../../private/common/json.js';
 import { DeepRequired } from '../common/ts/deep-required.js';
 export { DeepRequired };
 type Optional<T> = T | null;
-export declare const MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.16";
+export declare const MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.15";
 export interface Schemas {
     [MONORAIL_COMMAND_TOPIC]: {
         sensitive: {
packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -15,9 +15,6 @@ export declare const bunLockfile = "bun.lockb";
 export declare const pnpmWorkspaceFile = "pnpm-workspace.yaml";
 /** An array containing the lockfiles from all the package managers */
 export declare const lockfiles: Lockfile[];
-export declare const lockfilesByManager: {
-    [key in PackageManager]: Lockfile | undefined;
-};
 export type Lockfile = 'yarn.lock' | 'package-lock.json' | 'pnpm-lock.yaml' | 'bun.lockb';
 /**
  * A union type that represents the type of dependencies in the package.json
packages/cli-kit/dist/public/node/themes/api.d.ts
@@ -1,4 +1,3 @@
-import { MetafieldOwnerType } from '../../../cli/api/graphql/admin/generated/types.js';
 import { AdminSession } from '@shopify/cli-kit/node/session';
 import { Result, Checksum, Key, Theme, ThemeAsset } from '@shopify/cli-kit/node/themes/types';
 export type ThemeParams = Partial<Pick<Theme, 'name' | 'role' | 'processing' | 'src'>>;
@@ -12,14 +11,4 @@ export declare function bulkUploadThemeAssets(id: number, assets: AssetParams[],
 export declare function fetchChecksums(id: number, session: AdminSession): Promise<Checksum[]>;
 export declare function themeUpdate(id: number, params: ThemeParams, session: AdminSession): Promise<Theme | undefined>;
 export declare function themePublish(id: number, session: AdminSession): Promise<Theme | undefined>;
-export declare function themeDelete(id: number, session: AdminSession): Promise<boolean | undefined>;
-export declare function metafieldDefinitionsByOwnerType(type: MetafieldOwnerType, session: AdminSession): Promise<{
-    key: string;
-    namespace: string;
-    name: string;
-    description: string | null | undefined;
-    type: {
-        name: string;
-        category: string;
-    };
-}[]>;
\ No newline at end of file
+export declare function themeDelete(id: number, session: AdminSession): Promise<boolean | undefined>;
\ No newline at end of file

Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 75.28% 8769/11649
🟡 Branches 70.54% 4274/6059
🟡 Functions 75.03% 2293/3056
🟡 Lines 75.83% 8291/10934

Test suite run success

1974 tests passing in 895 suites.

Report generated by 🧪jest coverage report action from 1f0508f

@jamesmengo jamesmengo merged commit bdc417e into stable/3.72 Dec 18, 2024
27 checks passed
@jamesmengo jamesmengo deleted the 3.72/backport-graphql-batch-fix branch December 18, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants