-
Notifications
You must be signed in to change notification settings - Fork 43
Remove Async handling from the core methods #746
Conversation
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.
LGTM.
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.
LGTM 👍
This is a continuation of the efforts set in #683. Handling the Async API handling in the mapping layer.
77e12d4
to
a2bb6a2
Compare
Hey, @grafana/k6-browser, I forgot to return values from some functions and force-pushed now. Take another look if you want. No behavior change (since the methods are not implemented)—returned values are reminders for us when we want to implement these methods in the future. |
No problem. Looks even better now 😄 Could you have done a fixup instead of a force push? |
I guess adding the return types for these methods do not harm, but I wonder if it's necessary or the best to do that in this PR considering that we are Also, I personally lack a little bit of context to know if all the defined types are correct, although they look correct! But for example, in this method the returned type does not seem to match with the behavior specified in the Godoc, no? xk6-browser/common/response.go Lines 191 to 196 in a2bb6a2
|
@ankur22, yeah, TBH, I didn't want to deal with the flaky tests and put the work on you guys instead. Sorry about that :-( |
The PR is about returning the old behavior and this was the old behavior 🤷
I understand your concerns and I have the same concerns. That method was in discussions between us long before. We still don't know whether to return an error or bool. I left it as it was (bool). I could have changed the commit message, we can fix it when the time comes to implement it. |
This is a continuation of the efforts set in #683. Handling the Async APIs in the mapping layer. Please take a look at issue #742 for more details. This can also help the work in grafana/k6#4403—where we need to remove the promises and return errors 🤔?
Closes #742