Skip to content
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

feat: improved --stable-compatible migration check #4991

Merged
merged 10 commits into from
Apr 3, 2025

Conversation

crusso
Copy link
Contributor

@crusso crusso commented Apr 1, 2025

Refine the *.most stable signature file format to distinguish stable variables that are strictly required by the migration function rather than propagated from the actor body (#4991).

This enables the stable compatibility check to verify that a migration function will not fail due to missing required fields.

Required fields are declared in, not stable, in the actor's pre-signature.

Backwards compatible.

@crusso crusso requested a review from luc-blaeser April 1, 2025 19:03
@crusso crusso marked this pull request as ready for review April 1, 2025 20:19
@crusso crusso requested a review from a team as a code owner April 1, 2025 20:19
Copy link

github-actions bot commented Apr 1, 2025

Comparing from e46da44 to 89ef11e:
In terms of gas, no changes are observed in 5 tests.
In terms of size, no changes are observed in 5 tests.

@ggreif ggreif changed the title feat: improved --stable-compatible migration check feat: improved --stable-compatible migration check Apr 2, 2025
@ggreif ggreif added feature New feature or request canisters Language or compiler support for canister functionality enhancement labels Apr 2, 2025
@@ -288,7 +288,7 @@ let validate_stab_sig s : unit Diag.result =
| Single s1, Single s2 ->
Stability.match_stab_sig (Single s1) (Single s2)
| PrePost (pre1, post1), PrePost (pre2, post2) ->
let* () = Stability.match_stab_sig (Single pre1) (Single pre2) in
(* let* () = Stability.match_stab_sig (Single pre1) (Single pre2) in *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

danger?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a sanity check on the produced signature, to ensure they parse and match reflexively. I 'll adjust the code a bit (maybe just dropping the required fields before checking the pre sigs (or something better).

Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused by the pipeline.ml change.

@crusso
Copy link
Contributor Author

crusso commented Apr 3, 2025

@ggreif PTAL

@crusso crusso added the automerge-squash When ready, merge (using squash) label Apr 3, 2025
Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@ggreif ggreif force-pushed the claudio/improved-migration-check branch from 9f3e7d6 to f9c8e35 Compare April 3, 2025 11:23
@ggreif
Copy link
Contributor

ggreif commented Apr 3, 2025

@Mergifyio refresh

Copy link
Contributor

mergify bot commented Apr 3, 2025

refresh

✅ Pull request refreshed

@mergify mergify bot merged commit ee68768 into master Apr 3, 2025
13 of 14 checks passed
@mergify mergify bot deleted the claudio/improved-migration-check branch April 3, 2025 21:16
@mergify mergify bot removed the automerge-squash When ready, merge (using squash) label Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canisters Language or compiler support for canister functionality enhancement feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants