docs: add notes on upgrading vulnerable code#71
Conversation
| //! After the code is deployed, it should be removed from staging. This will prevent old code with a | ||
| //! security vulnerability to be deployed. |
There was a problem hiding this comment.
Is there a method to remove the staged code? If this is something that should happen every time should we make the upgrade implementation remove it automatically?
There was a problem hiding this comment.
I’m merging now with that paragraph as is, since it’ll be rewritten soon in upcoming PRs (see below).
Staged code can be removed by passing an empty vector to up_stage_code (ref). It’s currently not mentioned in docs and unidiomatic, I think. For that behavior it is expected to be wrapped in an Option? In that case I can open an issue to change the signature of up_stage_code to take code: Option<Vec<u8>>. Also it would be consistent with up_staged_code returning None if there’s no code staged.
Staged code should be removed automatically after deployment, it was also pointed out here. I’ll make a PR for that change soon.
There was a problem hiding this comment.
Passing in an Option to allow manual unstaging sounds good to me. And it's good we'll be adding the automatic unstaging after deploy as well.
* Minor language updates of existing docs * Add note on upgrading vulnerable code
Upgradable.