-
Notifications
You must be signed in to change notification settings - Fork 12
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Now there's #73 to track this.
* Minor language updates of existing docs * Add note on upgrading vulnerable code
Upgradable
.