mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
fix(ci): bound release resume tarball downloads (#108766)
This commit is contained in:
@@ -1323,7 +1323,14 @@ jobs:
|
||||
fi
|
||||
published_tarball_url="$(npm view "openclaw@${release_version}" dist.tarball)"
|
||||
published_tarball_path="${manifest_dir}/published.tgz"
|
||||
curl -fsSL --retry 3 -o "${published_tarball_path}" "${published_tarball_url}"
|
||||
# Keep registry identity verification bounded if a connected
|
||||
# tarball endpoint stops transferring during a release resume.
|
||||
curl -fsSL \
|
||||
--connect-timeout 10 \
|
||||
--max-time 120 \
|
||||
--retry 3 \
|
||||
--retry-max-time 180 \
|
||||
-o "${published_tarball_path}" "${published_tarball_url}"
|
||||
published_sha="$(sha256sum "${published_tarball_path}" | awk '{print $1}')"
|
||||
if [[ "${published_sha}" != "${manifest_tarball_sha}" ]]; then
|
||||
{
|
||||
|
||||
@@ -4309,6 +4309,25 @@ describe("package artifact reuse", () => {
|
||||
expect(releaseWorkflow).toContain("finished with ${conclusion} in ${duration_label}");
|
||||
});
|
||||
|
||||
it("bounds the npm registry tarball download used for release resume", () => {
|
||||
const publishRun =
|
||||
workflowStep(workflowJob(RELEASE_PUBLISH_WORKFLOW, "publish"), "Dispatch publish workflows")
|
||||
.run ?? "";
|
||||
const resolvePublishState = shellFunctionSource(
|
||||
publishRun,
|
||||
"resolve_openclaw_npm_publish_state",
|
||||
);
|
||||
const registryDownload = resolvePublishState.match(
|
||||
/curl -fsSL[\s\S]*?"\$\{published_tarball_url\}"/u,
|
||||
)?.[0];
|
||||
|
||||
expect(registryDownload).toContain("--connect-timeout 10");
|
||||
expect(registryDownload).toContain("--max-time 120");
|
||||
expect(registryDownload).toContain("--retry 3");
|
||||
expect(registryDownload).toContain("--retry-max-time 180");
|
||||
expect(registryDownload).toContain('-o "${published_tarball_path}"');
|
||||
});
|
||||
|
||||
it("fails closed when child environment identity or approval mutation fails", () => {
|
||||
const publishRun =
|
||||
workflowStep(workflowJob(RELEASE_PUBLISH_WORKFLOW, "publish"), "Dispatch publish workflows")
|
||||
|
||||
Reference in New Issue
Block a user