mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 16:40:24 +00:00
fix: stabilize docker live test lanes
This commit is contained in:
@@ -603,6 +603,11 @@ describeLive("live models (profile keys)", () => {
|
||||
logProgress(`${progressLabel}: rate limit, retrying with next key`);
|
||||
continue;
|
||||
}
|
||||
if (model.provider === "anthropic" && isAnthropicRateLimitError(message)) {
|
||||
skipped.push({ model: id, reason: message });
|
||||
logProgress(`${progressLabel}: skip (anthropic rate limit)`);
|
||||
break;
|
||||
}
|
||||
if (model.provider === "anthropic" && isAnthropicBillingError(message)) {
|
||||
if (attempt + 1 < attemptMax) {
|
||||
logProgress(`${progressLabel}: billing issue, retrying with next key`);
|
||||
|
||||
@@ -1209,6 +1209,11 @@ async function runGatewayModelSuite(params: GatewayModelSuiteParams) {
|
||||
logProgress(`${progressLabel}: rate limit, retrying with next key`);
|
||||
continue;
|
||||
}
|
||||
if (model.provider === "anthropic" && isAnthropicRateLimitError(message)) {
|
||||
skippedCount += 1;
|
||||
logProgress(`${progressLabel}: skip (anthropic rate limit)`);
|
||||
break;
|
||||
}
|
||||
if (model.provider === "anthropic" && isAnthropicBillingError(message)) {
|
||||
if (attempt + 1 < attemptMax) {
|
||||
logProgress(`${progressLabel}: billing issue, retrying with next key`);
|
||||
|
||||
@@ -8,6 +8,11 @@ import {
|
||||
} from "../../scripts/copy-bundled-plugin-metadata.mjs";
|
||||
|
||||
const tempDirs: string[] = [];
|
||||
const includeOptionalEnv = { OPENCLAW_INCLUDE_OPTIONAL_BUNDLED: "1" } as const;
|
||||
const copyBundledPluginMetadataWithEnv = copyBundledPluginMetadata as (params?: {
|
||||
repoRoot?: string;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
}) => void;
|
||||
|
||||
function makeRepoRoot(prefix: string): string {
|
||||
const repoRoot = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
||||
@@ -55,7 +60,7 @@ describe("copyBundledPluginMetadata", () => {
|
||||
openclaw: { extensions: ["./index.ts"] },
|
||||
});
|
||||
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
|
||||
expect(
|
||||
fs.existsSync(path.join(repoRoot, "dist", "extensions", "acpx", "openclaw.plugin.json")),
|
||||
@@ -126,7 +131,7 @@ describe("copyBundledPluginMetadata", () => {
|
||||
fs.mkdirSync(staleNodeModulesSkillDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(staleNodeModulesSkillDir, "stale.txt"), "stale\n", "utf8");
|
||||
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
|
||||
const copiedSkillDir = path.join(
|
||||
repoRoot,
|
||||
@@ -169,7 +174,7 @@ describe("copyBundledPluginMetadata", () => {
|
||||
openclaw: { extensions: ["./index.ts"] },
|
||||
});
|
||||
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
|
||||
expect(
|
||||
fs.readFileSync(
|
||||
@@ -222,7 +227,7 @@ describe("copyBundledPluginMetadata", () => {
|
||||
const staleNodeModulesDir = path.join(repoRoot, "dist", "extensions", "tlon", "node_modules");
|
||||
fs.mkdirSync(staleNodeModulesDir, { recursive: true });
|
||||
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
|
||||
const bundledManifest = JSON.parse(
|
||||
fs.readFileSync(
|
||||
@@ -264,7 +269,7 @@ describe("copyBundledPluginMetadata", () => {
|
||||
});
|
||||
|
||||
try {
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
} finally {
|
||||
cpSyncSpy.mockRestore();
|
||||
}
|
||||
@@ -314,7 +319,7 @@ describe("copyBundledPluginMetadata", () => {
|
||||
});
|
||||
fs.mkdirSync(path.join(repoRoot, "extensions"), { recursive: true });
|
||||
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
|
||||
expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "removed-plugin"))).toBe(false);
|
||||
});
|
||||
@@ -334,8 +339,26 @@ describe("copyBundledPluginMetadata", () => {
|
||||
name: "@openclaw/google-gemini-cli-auth",
|
||||
});
|
||||
|
||||
copyBundledPluginMetadata({ repoRoot });
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: includeOptionalEnv });
|
||||
|
||||
expect(fs.existsSync(staleDistDir)).toBe(false);
|
||||
});
|
||||
|
||||
it("skips metadata for optional bundled clusters unless explicitly enabled", () => {
|
||||
const repoRoot = makeRepoRoot("openclaw-bundled-plugin-optional-skip-");
|
||||
const pluginDir = path.join(repoRoot, "extensions", "acpx");
|
||||
fs.mkdirSync(pluginDir, { recursive: true });
|
||||
writeJson(path.join(pluginDir, "openclaw.plugin.json"), {
|
||||
id: "acpx",
|
||||
configSchema: { type: "object" },
|
||||
});
|
||||
writeJson(path.join(pluginDir, "package.json"), {
|
||||
name: "@openclaw/acpx-plugin",
|
||||
openclaw: { extensions: ["./index.ts"] },
|
||||
});
|
||||
|
||||
copyBundledPluginMetadataWithEnv({ repoRoot, env: {} });
|
||||
|
||||
expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "acpx"))).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -178,14 +178,9 @@ export type PluginRuntimeChannel = {
|
||||
clearReplyMarkup: (
|
||||
chatIdInput: string | number,
|
||||
messageIdInput: string | number,
|
||||
opts?: {
|
||||
token?: string;
|
||||
accountId?: string;
|
||||
verbose?: boolean;
|
||||
api?: Partial<import("grammy").Bot["api"]>;
|
||||
retry?: import("../../infra/retry.js").RetryConfig;
|
||||
cfg?: ReturnType<typeof import("../../config/config.js").loadConfig>;
|
||||
},
|
||||
opts?: Parameters<
|
||||
typeof import("../../plugin-sdk/telegram.js").editMessageReplyMarkupTelegram
|
||||
>[3],
|
||||
) => Promise<{ ok: true; messageId: string; chatId: string }>;
|
||||
deleteMessage: typeof import("../../plugin-sdk/telegram.js").deleteMessageTelegram;
|
||||
renameTopic: typeof import("../../plugin-sdk/telegram.js").renameForumTopicTelegram;
|
||||
|
||||
Reference in New Issue
Block a user