🎁 Populate nwritten_out when errors occur in config-store::get or dictionary::get#389
Merged
Conversation
e67f30f to
cec5670
Compare
cec5670 to
305bb3d
Compare
fastly_config_store#get to always return the buffer length
cee-dub
previously approved these changes
Jun 19, 2024
Member
cee-dub
left a comment
There was a problem hiding this comment.
LGTM! I'm pretty new to reading Rust code, so if you want another reviewer, please pull someone in.
lpereira
reviewed
Jun 20, 2024
acfoltzer
approved these changes
Jun 21, 2024
Contributor
acfoltzer
left a comment
There was a problem hiding this comment.
Looks good, and matches the pending witx changes of the platform.
GeeWee
pushed a commit
to GeeWee/Viceroy
that referenced
this pull request
Jul 25, 2024
…tionary::get (fastly#389) The wiggle representation of a function that returns Result<u32, FastlyStatus> and one that takes a u32 outparam as its last argument and returns Result<(), FastlyStatus> are the same, which means that we can support communicating the length needed to resolve a FastlyStatus::BufferLen error without changing the abi of fastly_config_store::get or fastly_dictionary::get. This PR makes this change to both fastly_config_store::get and fastly_dictionary::get, allowing SDKs to better adapt when buffer-length errors occur.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wiggle representation of a function that returns
Result<u32, FastlyStatus>and one that takes au32outparam as its last argument and returnsResult<(), FastlyStatus>are the same, which means that we can support communicating the length needed to resolve aFastlyStatus::BufferLenerror without changing the abi offastly_config_store::getorfastly_dictionary::get.This PR makes this change to both
fastly_config_store::getandfastly_dictionary::get, allowing SDKs to better adapt when buffer-length errors occur.