Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions quarry/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand Down
21 changes: 9 additions & 12 deletions quarry/targets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import sys
import tempfile
import unittest
import unittest.mock
from pathlib import Path

import targets
Expand Down Expand Up @@ -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"])
Expand Down
3 changes: 1 addition & 2 deletions remote_cache/seaweed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
Loading