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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ futures-util = "0.3"
hkdf = "0.12"
hmac = "0.12"
mdbase = { path = "../mdbase-rs", default-features = false }
mdbase-interop = { version = "0.1.0-rc.2", git = "https://github.com/mdbase-dev/mdbase-spec.git", rev = "5aa34fd14de2e0ae9e565425b724b306046b64ca" }
mdbase-interop = { version = "0.1.0-rc.2", git = "https://github.com/mdbase-dev/mdbase-spec.git", rev = "f4202a5d76f189684bfb2dc34334b8e3a8017ccc" }
mdbase-runtime = { path = "../mdbase-rs/crates/mdbase-runtime" }
notify = "8"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-webpki-roots-no-provider"] }
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/Cargo.lock.hosted-provider

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

2 changes: 1 addition & 1 deletion deploy/docker/mdbase-rs-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
76ceed008b63fd06c91dbc6ccd0cfcea043ac042
fc1dc077a1d76677a43c047d8ad419772fc5037f
12 changes: 12 additions & 0 deletions scripts/lib/retained-v2-upgrade.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ test('retained-v2 is registered in the existing harness and cannot remove legacy
}
});

test('retained-v2 freezes wire schemas, not the candidate engine revision', async () => {
const script = await readFile(new URL('../../test/upgrade/retained-v2.sh', import.meta.url), 'utf8');
assert.doesNotMatch(script, /mdbase-rs-revision/);
const contracts = script.match(/for contract in ([\s\S]*?); do/);
assert.ok(contracts);
for (const schema of ['application-capability-catalog.v1.json', 'application-capability-catalog.v2.json', 'operation-catalog.v1.json']) {
assert.ok(contracts[1].includes(`packages/protocol/schemas/${schema}`));
}
assert.match(script, /cmp <\(git .*PREVIOUS_RELEASE_COMMIT:\$contract/);
assert.match(script, /diff --exit-code .* -- crates\/connect-hosted-provider\/migrations/);
});

test('retained-v2 rejects a mutable beta94 tag before starting resources', async () => {
const root = new URL('../../', import.meta.url).pathname;
// An image tag is rejected before even consulting Git or Docker.
Expand Down
6 changes: 3 additions & 3 deletions test/upgrade/retained-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ retained_v2_inputs() {
jq -e '.phase == "compatibility-prelude" and .fresh_semantic_versions == [1]' >/dev/null
jq -e '.phase == "v2-enablement" and .fresh_semantic_versions == [1,2]' \
"$repo_root/config/application-issuance-policy.json" >/dev/null
# Retained reader/engine and schema bytes are immutable across this pair.
# Keep wire schemas immutable; engine revisions may advance. The scenario
# below tests compatibility by running the candidate and exact predecessor.
local contract
for contract in deploy/docker/mdbase-rs-revision \
packages/protocol/schemas/application-capability-catalog.v1.json \
for contract in packages/protocol/schemas/application-capability-catalog.v1.json \
packages/protocol/schemas/application-capability-catalog.v2.json \
packages/protocol/schemas/operation-catalog.v1.json; do
cmp <(git -C "$repo_root" show "$MDBASE_CONNECT_PREVIOUS_RELEASE_COMMIT:$contract") "$repo_root/$contract"
Expand Down