diff --git a/core/Cargo.lock b/core/Cargo.lock index 840917c12..6dd17e5f7 100644 --- a/core/Cargo.lock +++ b/core/Cargo.lock @@ -1980,9 +1980,9 @@ checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" [[package]] name = "rentnerproxy-app-catalog" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00092ccb0bc16ad28b34714e77476a77e7afb2c6affd2e518de3bd077b0e7665" +checksum = "e6cd4fe2f199ad6b4e3ec61b457f4d97cc7babb57bb02c326a389ad2e1b8ea02" dependencies = [ "ed25519-dalek", "hex", @@ -1998,9 +1998,9 @@ dependencies = [ [[package]] name = "rentnerproxy-app-contracts" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24dc56e57368d31eb9c93a3f157ceb642617703dfc7acf803b091a1f012e4bb4" +checksum = "8f64a14e480ab2de3bb9a2b339f861eaf1316dc2323edcd1947956f4f4bb6e9b" dependencies = [ "jsonschema", "serde_json", @@ -2008,9 +2008,9 @@ dependencies = [ [[package]] name = "rentnerproxy-app-pipeline" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9858a891bc32008f5996b9b4a255073b2bd2cbccb485dc13cb77abaa546449" +checksum = "6f5a86685c24fd68cb59a39a9790d66eb55fcef617bb598c141b30a619923deb" dependencies = [ "getrandom 0.4.3", "hex", @@ -2032,9 +2032,9 @@ dependencies = [ [[package]] name = "rentnerproxy-artifacts" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a420b8e3d200e1895ace29c69e936e70d136deddfa263531789b2ca682f3be1e" +checksum = "b544cf55089a4c1166680cac4c98f60cba5fb6aaab319facc57c4b7b8887089b" dependencies = [ "cap-fs-ext", "cap-std", diff --git a/core/Cargo.toml b/core/Cargo.toml index 0e2ce6f01..15221fb4f 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -6,10 +6,10 @@ rust-version = "1.99.1" license = "MIT" [dependencies] -rentnerproxy-app-catalog = "1.5.0" -rentnerproxy-app-contracts = "1.5.0" -rentnerproxy-app-pipeline = "1.5.0" -rentnerproxy-artifacts = "1.5.0" +rentnerproxy-app-catalog = "1.7.0" +rentnerproxy-app-contracts = "1.7.0" +rentnerproxy-app-pipeline = "1.7.0" +rentnerproxy-artifacts = "1.7.0" aws-lc-rs = "1.19.0" axum = { version = "0.8.9", default-features = false, features = [ "json", diff --git a/core/src/app_install.rs b/core/src/app_install.rs index 7a90ae081..e4921f261 100644 --- a/core/src/app_install.rs +++ b/core/src/app_install.rs @@ -83,7 +83,7 @@ pub(crate) use transport::{Source, unreachable_source}; /// same values (`web/src/config/app-requirements.config.ts`), so an older platform can check /// installed apps against a newer release before its image changes. pub(crate) const RUNTIME_PROFILE: &str = "rentnerproxy-linux-v1"; -pub(crate) const PROTOCOL_VERSION: &str = "1.2.0"; +pub(crate) const PROTOCOL_VERSION: &str = "1.3.0"; /// An app record ID as the web authority accepts it, such as an installation or secret ID: 1 to /// 64 lowercase ASCII letters, digits, `-` or `_`, starting with a letter or digit. The manager diff --git a/core/tests/private/app_install.rs b/core/tests/private/app_install.rs index 0e4bb3b9a..b1563a40e 100644 --- a/core/tests/private/app_install.rs +++ b/core/tests/private/app_install.rs @@ -513,8 +513,8 @@ fn target_check_reads_installed_manifests_from_the_accepted_catalog() { } #[test] -fn install_advertises_protocol_1_2_0_to_apps_that_require_it() { - assert_eq!(super::PROTOCOL_VERSION, "1.2.0"); +fn install_advertises_protocol_1_3_0_to_apps_that_require_it() { + assert_eq!(super::PROTOCOL_VERSION, "1.3.0"); // The web release config and this constant mirror the protocol of the contracts crate. assert_eq!( super::PROTOCOL_VERSION, @@ -526,11 +526,12 @@ fn install_advertises_protocol_1_2_0_to_apps_that_require_it() { (">=1.0.0 <2.0.0", ">=1.0.0 <2.0.0", true), (">=1.1.0 <2.0.0", ">=1.1.0 <2.0.0", true), (">=1.2.0 <2.0.0", ">=1.2.0 <2.0.0", true), - (">=1.3.0 <2.0.0", ">=1.0.0 <2.0.0", false), - (">=1.0.0 <2.0.0", ">=1.3.0 <2.0.0", false), + (">=1.3.0 <2.0.0", ">=1.3.0 <2.0.0", true), + (">=1.4.0 <2.0.0", ">=1.0.0 <2.0.0", false), + (">=1.0.0 <2.0.0", ">=1.4.0 <2.0.0", false), // A capped range ends below the advertised version, yet the app negotiates 1.0.0. (">=1.0.0 <1.1.0", ">=1.0.0 <1.1.0", true), - (">=1.0.0 <1.1.0", ">=1.3.0 <2.0.0", false), + (">=1.0.0 <1.1.0", ">=1.4.0 <2.0.0", false), ] { let mut manifest = manifest(); manifest["requires"]["platformApi"] = json!(platform_api); @@ -556,8 +557,9 @@ fn apps_negotiate_the_lower_bound_of_each_manifest_range() { (">=1.0.0 <2.0.0", Some("1.0.0")), (">=1.1.0 <2.0.0", Some("1.1.0")), (">=1.2.0 <2.0.0", Some("1.2.0")), + (">=1.3.0 <2.0.0", Some("1.3.0")), (">=1.0.0 <1.1.0", Some("1.0.0")), - (">=1.3.0 <2.0.0", None), + (">=1.4.0 <2.0.0", None), ] { let mut manifest = manifest(); manifest["requires"]["platformApi"] = json!(range); @@ -577,14 +579,15 @@ fn apps_negotiate_the_lower_bound_of_each_manifest_range() { #[test] fn ui_apps_negotiate_the_lower_bound_of_their_bridge_range() { - // Only a 1.2.0 bridge receives the user's permission keys in the UI context, so apps that - // require an older bridge must keep negotiating exactly that version. + // A 1.2.0 bridge receives the user's permission keys and a 1.3.0 bridge may render remotely, + // so apps that require an older bridge must keep negotiating exactly that version. for (range, negotiated) in [ (">=1.0.0 <2.0.0", Some("1.0.0")), (">=1.1.0 <2.0.0", Some("1.1.0")), (">=1.2.0 <2.0.0", Some("1.2.0")), + (">=1.3.0 <2.0.0", Some("1.3.0")), (">=1.0.0 <1.2.0", Some("1.0.0")), - (">=1.3.0 <2.0.0", None), + (">=1.4.0 <2.0.0", None), ] { let mut manifest = manifest(); manifest["ui"] = json!({"entrypoint":"ui/index.html", "slots":["navigation"]}); diff --git a/core/tests/private/app_ipc.rs b/core/tests/private/app_ipc.rs index c535bc392..1fed0125b 100644 --- a/core/tests/private/app_ipc.rs +++ b/core/tests/private/app_ipc.rs @@ -1648,7 +1648,7 @@ async fn an_app_that_is_not_ready_keeps_retrying_without_registration() { for ready in [ json!({"ready": false, "protocolVersion": VERSION, "providers": []}), json!({"ready": true, "protocolVersion": "9.9.9", "providers": []}), - json!({"ready": true, "protocolVersion": "1.3.0", "providers": []}), + json!({"ready": true, "protocolVersion": "1.4.0", "providers": []}), json!({"ready": true, "protocolVersion": "2.0.0", "providers": []}), json!({"ready": true, "protocolVersion": "1.1", "providers": []}), json!({"ready": true, "protocolVersion": "1.01.0", "providers": []}), @@ -1878,7 +1878,7 @@ async fn privileged_controller_validates_launch_pipe_and_bootstrap_paths() { .contains("Invalid manager launch request") ); let mut incompatible = launch.clone(); - incompatible["uiBridge"] = json!(">=1.3.0 <2.0.0"); + incompatible["uiBridge"] = json!(">=1.4.0 <2.0.0"); assert!( send(format!("{incompatible}\n")) .await @@ -2161,8 +2161,8 @@ async fn restricted_child_fixture() { } #[test] -fn the_platform_advertises_protocol_1_2_0_and_keeps_provider_registrations_at_1_0_0() { - assert_eq!(VERSION, "1.2.0"); +fn the_platform_advertises_protocol_1_3_0_and_keeps_provider_registrations_at_1_0_0() { + assert_eq!(VERSION, "1.3.0"); assert_eq!(VERSION, rentnerproxy_app_contracts::PROTOCOL_VERSION); assert_eq!(PROVIDER_VERSION, "1.0.0"); } @@ -2173,10 +2173,12 @@ fn launch_ranges_admit_apps_that_require_the_advertised_protocol() { (">=1.0.0 <2.0.0", true), (">=1.1.0 <2.0.0", true), (">=1.2.0 <2.0.0", true), + (">=1.3.0 <2.0.0", true), (">=1.0.0 <1.1.0", true), (">=1.1.1 <2.0.0", true), - (">=1.2.1 <2.0.0", false), - (">=1.3.0 <2.0.0", false), + (">=1.2.1 <2.0.0", true), + (">=1.3.1 <2.0.0", false), + (">=1.4.0 <2.0.0", false), (">=2.0.0 <3.0.0", false), (">=1.1.0 <1.1.0", false), (">=1.0.0 <3.0.0", false), @@ -2197,9 +2199,12 @@ fn launch_validation_admits_only_negotiated_versions_inside_the_manifest_ranges( ("1.1.0", ">=1.1.0 <2.0.0", true), ("1.2.0", ">=1.0.0 <2.0.0", true), ("1.2.0", ">=1.2.0 <2.0.0", true), + ("1.3.0", ">=1.0.0 <2.0.0", true), + ("1.3.0", ">=1.3.0 <2.0.0", true), ("1.0.0", ">=1.1.0 <2.0.0", false), ("1.1.0", ">=1.2.0 <2.0.0", false), - ("1.3.0", ">=1.0.0 <2.0.0", false), + ("1.2.0", ">=1.3.0 <2.0.0", false), + ("1.4.0", ">=1.0.0 <2.0.0", false), ("2.0.0", ">=1.0.0 <3.0.0", false), ("1.1.0", ">=1.0.0 <1.1.0", false), ("1.1", ">=1.0.0 <2.0.0", false), @@ -2248,11 +2253,14 @@ async fn readiness_expects_exactly_the_negotiated_protocol() { ("1.0.0", "1.0.0", true), ("1.1.0", "1.1.0", true), ("1.2.0", "1.2.0", true), + ("1.3.0", "1.3.0", true), // An app negotiated 1.0.0 must not claim more, nor an app of 1.1.0 less. ("1.0.0", "1.1.0", false), ("1.1.0", "1.0.0", false), ("1.1.0", "1.2.0", false), ("1.2.0", "1.1.0", false), + ("1.2.0", "1.3.0", false), + ("1.3.0", "1.2.0", false), ("1.1.0", "2.0.0", false), ] { let outcome = exercise_readiness_in( @@ -2273,7 +2281,7 @@ async fn readiness_expects_exactly_the_negotiated_protocol() { } #[tokio::test] -async fn provider_registrations_stay_at_provider_version_1_0_0_on_a_1_2_0_platform() { +async fn provider_registrations_stay_at_provider_version_1_0_0_on_a_1_3_0_platform() { let mut registrations = registration("monitor", "monitoring"); registrations["version"] = json!(VERSION); let outcome = readiness(json!([registrations]), &["monitoring"], &[204]).await; diff --git a/web/src/config/app-requirements.config.ts b/web/src/config/app-requirements.config.ts index 8e5ef149f..403fbbf48 100644 --- a/web/src/config/app-requirements.config.ts +++ b/web/src/config/app-requirements.config.ts @@ -14,9 +14,9 @@ export const APP_REQUIREMENTS_MAX_BYTES = 16_384 */ export const APP_RUNTIME_ENVIRONMENT = { runtimeProfile: 'rentnerproxy-linux-v1', - platformApi: '1.2.0', - appProtocol: '1.2.0', - uiBridge: '1.2.0', + platformApi: '1.3.0', + appProtocol: '1.3.0', + uiBridge: '1.3.0', } as const export const BUNDLED_INSTALLER_CONFIG = 'docker/production/apps/catalog/installer.json'