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: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ tinysearch-bus = { path = "crates/tinysearch-bus" }
# TinyBus defines the message types, interface macro, and frozen module ABI
# used by the generated integration. Socket and CLI features are unnecessary
# here.
tinybus = { version = ">=0.3.2, <0.4", default-features = false, features = [
tinybus = { version = ">=0.3.3, <0.4", default-features = false, features = [
"macros",
"modules",
] }
# The module-side SDK owns the isolated runtime and exports the ABI entrypoints
# required by TinyBus's dynamic loader.
tinybus-module = { version = ">=0.3.2, <0.4" }
tinybus-module = { version = ">=0.3.3, <0.4" }
# Derive macros for the crate-wide error type in `crates/tinysearch/src/error/`.
# Every dependency entry should carry a comment like this one saying why it is
# here.
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-e2e-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_distro_powershell_forwards_arguments_and_exit_status(self):
"--crate",
"tinysearch",
"--version",
"0.5.1",
"0.5.2",
]
try:
result = subprocess.run(
Expand Down Expand Up @@ -127,7 +127,7 @@ def test_distro_powershell_rejects_unsupported_image_before_docker(self):
"--crate",
"tinysearch",
"--version",
"0.5.1",
"0.5.2",
"--target",
"x86_64-unknown-linux-gnu",
"--host",
Expand Down
39 changes: 32 additions & 7 deletions scripts/test-release-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@
CI_WORKFLOW = ROOT / ".github/workflows/ci.yml"
REVIEWED_RELEASE_SHA = "6ed83b04aab2d8977ec62e966cb914531e534fa4"
ORDINARY_RELEASE_SHA = "4adc1080fb495098e7af1aade82ed7e6e3c69bb7"
TINYBUS_SDK_SHA = "cba2de0e573f99fe4c7e45ba14e2d6b5a2a7757f"
TINYBUS_SDK_SHA = "207a9a7df15e44fdba00a807d0f7eaf21904ba0e"


def has_expected_sdk_gitlink(entry, expected_sha):
"""Match the SDK pin from the parent Git tree, even without checkout."""
fields = entry.split()
return (
len(fields) == 4
and fields[0] == "160000"
and fields[1] == "commit"
and fields[2] == expected_sha
and fields[3] == "vendor/tinybus"
)


def resolve_script(workflow):
Expand Down Expand Up @@ -91,19 +103,32 @@ def test_published_candidate_and_sdk_constraints_match_released_compatibility(se
self.assertEqual(manifest["workspace"]["package"]["version"], "0.5.2")
self.assertEqual(
manifest["workspace"]["dependencies"]["tinybus"]["version"],
">=0.3.2, <0.4",
">=0.3.3, <0.4",
)
self.assertEqual(
manifest["workspace"]["dependencies"]["tinybus-module"]["version"],
">=0.3.2, <0.4",
">=0.3.3, <0.4",
)
bus_head = subprocess.run(
["git", "-C", str(ROOT / "vendor/tinybus"), "rev-parse", "HEAD"],
sdk_gitlink = subprocess.run(
["git", "-C", str(ROOT), "ls-tree", "HEAD", "vendor/tinybus"],
check=True,
text=True,
capture_output=True,
).stdout.strip()
self.assertEqual(bus_head, TINYBUS_SDK_SHA)
).stdout
self.assertTrue(has_expected_sdk_gitlink(sdk_gitlink, TINYBUS_SDK_SHA))

def test_sdk_gitlink_guard_accepts_exact_and_rejects_stale_or_missing_pins(self):
exact = f"160000 commit {TINYBUS_SDK_SHA}\tvendor/tinybus"
stale = "160000 commit cba2de0e573f99fe4c7e45ba14e2d6b5a2a7757f\tvendor/tinybus"

self.assertTrue(has_expected_sdk_gitlink(exact, TINYBUS_SDK_SHA))
self.assertFalse(has_expected_sdk_gitlink(stale, TINYBUS_SDK_SHA))
self.assertFalse(has_expected_sdk_gitlink("", TINYBUS_SDK_SHA))
self.assertFalse(
has_expected_sdk_gitlink(
f"100644 blob {TINYBUS_SDK_SHA}\tvendor/tinybus", TINYBUS_SDK_SHA
)
)

def test_reviewed_release_requires_positive_pr_on_main_and_uses_fixed_profile(self):
result, output = self.run_resolve("reviewed-epic", "83")
Expand Down
Loading