-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Forward-port][Upgrades testing] Add cases for unchanged key type with changed key expression #19947
[Forward-port][Upgrades testing] Add cases for unchanged key type with changed key expression #19947
Conversation
…expression (#19897) * Add test cases for unchanged key type with changed key expression * Add test cases for unchanged key type with changed key expression, with fetchByKey * Add test cases for unchanged key type with changed key expression, with fetch * Mark broken tests, organize test tree * Add test cases for exercise{,ByKey}{,Cmd} * Use 'subtree'
queryKeyUpgraded : Test | ||
queryKeyUpgraded = test $ do | ||
a <- allocateParty "alice" | ||
cid <- a `submit` createExactCmd (V1.UpgradedKey a 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this crashes with
com.digitalasset.daml.lf.engine.script.Script$FailedCmd: Command QueryContractKey failed: Expecting 3 field for record 878aa1c458493971ff8df6147966ba741fbec794bb522cd96aebfe988a932c82:UpgradedContractKeys:UpgradedKeyKey, but got 2
[ broken ("queryContractKey, src=v1 tgt=v2", queryKeyUpgraded) | ||
, broken ("exerciseByKeyCmd, src=v1 tgt=v2", exerciseCmdKeyUpgraded) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two cases are broken on main
even though they work on main-2.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, I think we should create explicit rows for these if they dont already exist in the spreadsheet, so we can mark this behaviour as broken publically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out, this is probably because key upgrading is not ported to 3x, unsure when/if it ever will be given non unique contract keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm in that case, should we be concerned that the two cases below (fetchKeyUpgraded
and exerciseUpdateKeyUpgraded
) do seem to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, possibly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulbrauner-da What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the commands fail because we haven't ported [https://github.com//pull/19780/files#diff-f1459a53d7980874919e46b017e19dfb5dc47c48f49494bab3422d55e62ac48b](this change), but inside the choice bodies it works because of #19668.
But then I think if we allow this, we will run into the problem that #19792 fixes in 2.x, but this is a hack and we want to solve it properly with value normalization in 3.x.
That said, as long as we forbid it at upload time, that shouldn't be reachable.
Ports #19897 to daml 3.x
Add test cases for unchanged key type with changed key expression
Add test cases for unchanged key type with changed key expression, with fetchByKey
Add test cases for unchanged key type with changed key expression, with fetch
Mark broken tests, organize test tree
Add test cases for exercise{,ByKey}{,Cmd}
Use 'subtree'