You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In security sensitive use cases, it would be helpful to allow the caller to know if deleting the temp file failed, so it could retry after a delay, or at least log the failure.
My main concern is how to test this functionality.
As I've been polishing this code I could not resist taking this into account, hence my attempt at it using option funcs above, based on earlier work in #20.
It's the least invasive way I can think of without duplicating code just for testing; if there's a cleaner approach with less effort I'd be interested to know.
At least the code to enable the testing code-path is only available during testing, so the risk should be relatively contained as well.
Was actually expecting a suggestion or at least a comment with regard to testing, as that's an interesting aspect.
In respect to changing the return type, I wonder if it could stay the same by making AtomicResult comply with the error interface.
And then there still is the defer code hanging around which maybe could be removed as a consequence?
We ended up implementing this internally so I'm not going to be able to dedicate time to finishing up the implementation here. If you want to close the PR that's fine with me.
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
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.
In security sensitive use cases, it would be helpful to allow the caller to know if deleting the temp file failed, so it could retry after a delay, or at least log the failure.
My main concern is how to test this functionality.