-
-
Notifications
You must be signed in to change notification settings - Fork 439
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] Fix calculation of appName from command parts #3522
Conversation
Can't we just pass appName to callRunner? Parsing command parts that were just assigned seems weird. I know it was like that before, but this really looks like the X Y problem to me. |
@imLinguin yes, I have this at the end of the description haha |
+1 on that; relying on the array structure being the same will 100% "randomly break" in the future (when someone, for whatever reason, changes the structure) |
@arielj reading is hard 💀 |
Reading is hard How much refactoring are we talking here? Would that really be more changed lines compared to this function (that'd then get thrown away once the proper fix is implemented) |
I'm on board of doing that refactor after the release though, I also don't like the parsing of the command, but we use that from places where we don't have an appName and I don't want to break anything at this point |
well, my issue is that I'd have to make sure that I didn't break any command, we call and for some commands I don't even have a way to test them (I don't have an amazon account) |
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.
looks fine, agree with the refactor after the next release
After merging the changes to make logging async I found a bug with the code that gets the
appName
from the command parts. This was not a big problem before because it was used for the the abortId and some error handling, but with the new async logs the appName is used to find the log path and it was breaking.The original code had 3 problems:
launch
, it was still always adding 1 and picking a random value for the appNamelaunch
but not other commands likeupdate
,repair
,verify
(for nile) ordownload
(for gogdl)'launch'
for legendary, for gogdl and nile the position in the array is differentThis PR addresses:
To test the problem you can add a
console.log({ appName })
after the line I'm changing in this PR in callRunner.ts and see the differentappNames
that it's calculating in main.Ideally, in the future, we could just pass the appName as a parameter, but that involves some refactoring that I'd rather do after a release and not before it.
Use the following Checklist if you have changed something on the Backend or Frontend: