-
Notifications
You must be signed in to change notification settings - Fork 478
[expo-cli] changed error handling for ios upload to use fastlane exit code #2530
Conversation
@dsokal Any chance this could get a look? We would really like to get uploads consistently working again. Been a bit of a pain getting false negatives. |
can you explain the logic behind these code changes? it’s hard to judge code without tests when there isn’t a strong justification for the precise code being changed |
Of course 👍 Using The changes proposed are to use the exit code that is returned by the FastLane command to check if the command failed or not. This is much more robust as the exit code changing would (in my opinion) be a breaking change to the CLI. This would be much easier to maintain on Expo's side as I am sure your team would be reluctant to change major versions of the FastLane CLI without considering the breaking changes first. |
@mymattcarroll - ok that makes sense. i'm going to wait for @dsokal to come back from vacation to review this because he is the owner of this code |
@mymattcarroll sorry it's taking so long but I just came back from vacation.
Actually, there is no way that "fastlane" commands could release a change that outputs a non-json string without our knowledge. The reason is simple - we're not using fastlane directly. We have our tiny wrapper called Unfortunately, from the PR description, I can't deduce what bug you're trying to fix here. Could you please elaborate? I'd be grateful if you could take a look at the abovementioned wrapper's code - https://github.com/expo/expo-cli/tree/master/packages/traveling-fastlane and debug the problem there without touching the expo-cli code. I believe, whatever the bug is, it should be possible to fix it there. To sum up, I'd prefer not to merge this PR in the current form. |
At least in my case, and in the case of #2368, the following message is being printed to stdout, causing the JSON.parse to fail:
This behavior seems to have changed in a "recent" version of fastlane, hence comments that "reverting back to expo-cli@3.17.24 fixes the issue." It doesn't look like any expo-cli code sets the |
any updates on this one? |
My apologies, I have also been on vacation recently.
While fastlane itself may not have changed, a non-json string has been outputted from a CLI command that is being used in this code base programmatically. Relying on a json string as output from a CLI command (whether the command is code you personally wrote or fastlane itself) is always going to be brittle logic. I would be more than happy to look into the wrapper and work out which part is logging a non-json string, but I will not have time in the coming weeks. In regards to the issue that needs to be fixed: #2530 (comment) is the same issue that we are having. This issue (which seems to be happening to more and more people) also explains the issue in quite alot of detail: #2368 |
more info: https://github.com/expo/fyi/blob/master/expo-upload-ios.md |
Why
Test plan
follow the steps in #2368, this should fix the issue.
If I could get some help running this locally, that would be greatly appreciated.