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
16 changes: 8 additions & 8 deletions core/Cargo.lock

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

8 changes: 4 additions & 4 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion core/src/app_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 12 additions & 9 deletions core/tests/private/app_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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"]});
Expand Down
24 changes: 16 additions & 8 deletions core/tests/private/app_ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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": []}),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
}
Expand All @@ -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),
Expand All @@ -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),
Expand Down Expand Up @@ -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(
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions web/src/config/app-requirements.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down