diff --git a/quarry/targets.py b/quarry/targets.py index 730ed68f..cd32ed43 100755 --- a/quarry/targets.py +++ b/quarry/targets.py @@ -22,7 +22,6 @@ import subprocess import tempfile from collections.abc import Callable -from datetime import UTC, datetime from pathlib import Path from typing import Any, NotRequired, TypedDict @@ -195,11 +194,6 @@ def write_targets(args: argparse.Namespace) -> None: # All paths are absolute because hardhat runs from the stage, not the action's directory. argv = [ os.path.abspath(args.hardhat), - # hardhat ignores SOURCE_DATE_EPOCH and versions the targets by the wall-clock time. - # Importing them into a repository keeps only their entries, so any fixed time will do. - # TODO: Drop this once the pinned quarry has https://github.com/amutable/quarry/pull/97 - "--ref-time", - datetime.fromtimestamp(int(os.environ["SOURCE_DATE_EPOCH"]), UTC).strftime("%Y-%m-%dT%H:%M:%SZ"), "targets", # The file has no signatures and the zero time as its expiry, which nothing checks. "--unsigned", diff --git a/quarry/targets_test.py b/quarry/targets_test.py index 2c23000d..fed6857e 100644 --- a/quarry/targets_test.py +++ b/quarry/targets_test.py @@ -11,7 +11,6 @@ import sys import tempfile import unittest -import unittest.mock from pathlib import Path import targets @@ -241,20 +240,18 @@ def test_targets(self) -> None: transfers.mkdir() out = base / "out" out.mkdir() - with unittest.mock.patch.dict(os.environ, {"SOURCE_DATE_EPOCH": "1739577600"}): - targets.main([ - "--artifacts", os.fspath(description), - "--files", os.fspath(files), - "--output", os.fspath(out / f"targets_{ARCH}.json"), - "--hardhat", os.fspath(hardhat), - "--exclude", "disk/raw", - "--transfer-dir", f"sysupdate.d={transfers}", - ]) # fmt: skip + targets.main([ + "--artifacts", os.fspath(description), + "--files", os.fspath(files), + "--output", os.fspath(out / f"targets_{ARCH}.json"), + "--hardhat", os.fspath(hardhat), + "--exclude", "disk/raw", + "--transfer-dir", f"sysupdate.d={transfers}", + ]) # fmt: skip self.assertFalse((out / "1.root.json").exists()) called = json.loads((out / f"targets_{ARCH}.json").read_text()) - # The targets are versioned by SOURCE_DATE_EPOCH rather than the wall-clock time. - self.assertEqual(called["argv"][:3], ["--ref-time", "2025-02-15T00:00:00Z", "targets"]) + self.assertEqual(called["argv"][0], "targets") # The build holds no signing key. self.assertIn("--unsigned", called["argv"]) self.assertNotIn("--keystore", called["argv"]) diff --git a/remote_cache/seaweed.py b/remote_cache/seaweed.py index 167ef8bd..2704c6ca 100644 --- a/remote_cache/seaweed.py +++ b/remote_cache/seaweed.py @@ -15,8 +15,7 @@ from collections.abc import Callable from pathlib import Path -# 4.50 regression: first write blocks for 15s: https://github.com/seaweedfs/seaweedfs/issues/12058 -STARTUP_TIMEOUT = 30 +STARTUP_TIMEOUT = 10 def free_ports(count: int) -> list[int]: