Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(ci): validate instant client zip magic with retries

t8y27e4b37107519
diff --git a/.github/workflows/agents-release.yml b/.github/workflows/agents-release.yml
index 50628ca063..ec72d135cb 100644
--- a/.github/workflows/agents-release.yml
+++ b/.github/workflows/agents-release.yml
@@ -237,8 +237,27 @@ jobs:
cc="$(ls /c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/gcc.exe | head -1)"
fi
mkdir -p instantclient
- curl -fsSL -o ic-basic.zip "https://download.oracle.com/otn_software/nt/instantclient/2326300/instantclient-basic-windows.x64-23.26.3.0.0.zip"
- curl -fsSL -o ic-sdk.zip "https://download.oracle.com/otn_software/nt/instantclient/2326300/instantclient-sdk-windows.x64-23.26.3.0.0.zip"
+ # Oracle's CDN intermittently answers runner IPs with an HTML page
+ # (HTTP 200) instead of the archive; validate the zip magic and retry
+ # with diagnostics so a bad response fails loudly instead of
+ # surfacing later as "tar: This does not look like a tar archive".
+ fetch_ic() {
+ local name="$1" url="$2"
+ for attempt in 1 2 3; do
+ curl -fSL --retry 5 --retry-delay 5 --retry-all-errors -o "$name" "$url" || true
+ if [ "$(head -c 2 "$name" 2>/dev/null)" = "PK" ]; then
+ echo "$name: $(wc -c < "$name") bytes, zip magic OK (attempt $attempt)"
+ return 0
+ fi
+ echo "::warning::$name attempt $attempt was not a zip; first 200 bytes:"
+ head -c 200 "$name" 2>/dev/null || echo "(no file written)"
+ sleep 10
+ done
+ echo "::error::$name could not be downloaded as a valid zip after 3 attempts"
+ return 1
+ }
+ fetch_ic ic-basic.zip "https://download.oracle.com/otn_software/nt/instantclient/2326300/instantclient-basic-windows.x64-23.26.3.0.0.zip"
+ fetch_ic ic-sdk.zip "https://download.oracle.com/otn_software/nt/instantclient/2326300/instantclient-sdk-windows.x64-23.26.3.0.0.zip"
tar -xf ic-basic.zip -C instantclient
tar -xf ic-sdk.zip -C instantclient
ic_dir="$(ls -d "${GITHUB_WORKSPACE}/instantclient"/instantclient_* | head -1)"