-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix double wrapping({:ok,{:ok, value}}) problem on tuple policy with source KV #145
Conversation
Could you review it? @akoutmos, @benwilson512, @jadlr, @mbuhot |
e63b934
to
75c6a43
Compare
Could you approve again to run workflows? benwilson512 |
@benwilson512, there is a conflict between .tool-versions and pipeline. The pipeline works on Elixir-1.10-11&OTP-22-23, whereas the .tool-versions works on Elixir-1.12-13&OTP-24. This causes problems. We should upgrade the pipeline. For instance, the mix format works on both versions differently. that is the reason the pipeline says the files are not formatted. At local, OTP24-Elixir1.13 says the format is okay, but Otp 23-elixir.1.11 says it is not formatted. |
I have updated the pipeline as well. @benwilson512 |
I have amended it. Could you check again @benwilson512 ? |
@altuntasfatih the primary blocker here is that this is technically a breaking change. I'm not clear whether this was a bug or just bad design, but if anyone has code out there that relies on this it will break. We are already kicking off a 2.0 version now so I think we can include that with this. |
Heys,
We used
the tuple policy
to properly return the data to the caller for fine-gradient error handling.However, we faced this issue on the KV source.
It wraps data by the ok tuple again without controlling whether the data is the ok tuple or not. So it wraps, then data becomes
{: ok,{: ok, value}}.
I have added the following line code in two asterisks to the KV fetch function. It does not wrap again if the data is an ok tuple.
Actually, The code checks the error tuple but not the ok tuple case. I guess that was forgotten somehow.
In addition,