From 4df4599948879109431f253bd992ef94493a8c77 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Wed, 15 Jan 2025 18:02:04 +0000 Subject: [PATCH] bug repro for dropping a field --- test/run-drun/ok/tmp_upgrade.drun.ok | 4 ++++ test/run-drun/tmp_upgrade.drun | 3 +++ test/run-drun/tmp_upgrade/version0.mo | 6 ++++++ test/run-drun/tmp_upgrade/version1.mo | 6 ++++++ 4 files changed, 19 insertions(+) create mode 100644 test/run-drun/ok/tmp_upgrade.drun.ok create mode 100644 test/run-drun/tmp_upgrade.drun create mode 100644 test/run-drun/tmp_upgrade/version0.mo create mode 100644 test/run-drun/tmp_upgrade/version1.mo diff --git a/test/run-drun/ok/tmp_upgrade.drun.ok b/test/run-drun/ok/tmp_upgrade.drun.ok new file mode 100644 index 00000000000..57060ad42ef --- /dev/null +++ b/test/run-drun/ok/tmp_upgrade.drun.ok @@ -0,0 +1,4 @@ +ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 +ingress Completed: Reply: 0x4449444c0000 +ingress Err: IC0503: Error from Canister rwlgt-iiaaa-aaaaa-aaaaa-cai: Canister called `ic0.trap` with message: RTS error: Memory-incompatible program upgrade. +Consider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: http://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly diff --git a/test/run-drun/tmp_upgrade.drun b/test/run-drun/tmp_upgrade.drun new file mode 100644 index 00000000000..75542076835 --- /dev/null +++ b/test/run-drun/tmp_upgrade.drun @@ -0,0 +1,3 @@ +# SKIP ic-ref-run +install $ID tmp_upgrade/version0.mo "" +upgrade $ID tmp_upgrade/version1.mo "" diff --git a/test/run-drun/tmp_upgrade/version0.mo b/test/run-drun/tmp_upgrade/version0.mo new file mode 100644 index 00000000000..1d9184191c4 --- /dev/null +++ b/test/run-drun/tmp_upgrade/version0.mo @@ -0,0 +1,6 @@ +persistent actor { + + var four : [var (Nat, Text)] = [var]; + var zero = 0; + +} \ No newline at end of file diff --git a/test/run-drun/tmp_upgrade/version1.mo b/test/run-drun/tmp_upgrade/version1.mo new file mode 100644 index 00000000000..fe397887f9d --- /dev/null +++ b/test/run-drun/tmp_upgrade/version1.mo @@ -0,0 +1,6 @@ +persistent actor { + + var three : [var (Nat, Text)] = [var]; + var zero = 0; + +} \ No newline at end of file