-
Notifications
You must be signed in to change notification settings - Fork 392
Fix support for running multiple web flows #2270
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
base: main
Are you sure you want to change the base?
Conversation
Hi @proksh, thanks for the review. Can I do anything to move this fix forward? This bug has prevented us from updating Maestro since version 1.39.0 which is now more than 5 months old. |
2b87295
to
568c732
Compare
Rebased. |
private fun includesWebFlow(): Boolean { | ||
return flowFiles.any { it.isWebFlow() } |
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.
When you say the mixed test fails, does it fail because of this check?
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.
The iOS flow seems to fail because ChromeDriver tries to launch the app:
[Failed] iOS flow (2s) (Unable to launch app dk.monsenso.green: invalid argument
(Session info: chrome=135.0.7049.84)
Build info: version: '4.26.0', revision: '8ccf0219d7'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '15.4', java.version: '17.0.12'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [53aba667c9efd35da55aab0bc57c99b5, get {url=dk.monsenso.green}]
Thanks for the review @Fishbowler! After the rebase, running a workspace of web flows is broken again due to fa3eb42. My sample workspace looks like this:
And flows:
- '*/*' The change in the commit I linked above does not traverse further than 1 level and thus never finds the flow files. Do you want me to push a fix for that? |
That'd be ace! Moving the extra checks out of the recursion loop, and above the readConfig would solve your problem whilst maintaining the bugfix. |
Alright, done. Feel free to change the code for style reasons or otherwise. |
0dfcc9d
to
24ec29b
Compare
Rebased. |
Has this been merged in? |
Nope. Don't know what's holding it up. |
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.
Hey, quick question — what problem is this change intended to solve?
Right now, web flows aren't running, and iOS flows are picked up by default.
With this change, only web flows will be picked up (if any exist), and iOS flows will be skipped.
Is this the desired behavior? If so, can you clarify the reasoning behind it?
Thanks for getting back to me @proksh.
The problem of
Not sure what you exactly mean, can you elaborate? In my testing using the latest from
It's true that the behavior of executing a mixed workspace while having an emulator/simulator running changes from "Android/iOS flows are executed, web flows fail" to "web flows are executed, Android/iOS flows fail". But the scenario is already broken today (the overall test run is guaranteed to fail). My thinking was that it would be a net win to fix the bug, the behavior change mentioned above being a small trade-off. |
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.
Got it. I think there are a few issues here.
Currently, if someone is working with iOS/Android flows and adds a web flow, the system stops picking up any iOS/Android flows unless the user explicitly specifies a deviceId. That’s definitely inconvenient.
The existing approach checks only for a single web flow. If none is found, it defaults to iOS/Android flows, which is a better fallback and avoids blocking mobile flows.
What might work better is extending this logic: just like we check for web flows, we could also check for iOS and Android flows and automatically include those in the deviceIds.
Hey @dmitry-zaitsev , could you take a look and suggest any improvements here? You probably have more context around this.
Yeah, it would definitely be ideal to add support for mixed workspaces. Alternatively you could add |
Agree, I will wait for @dmitry-zaitsev response on this. |
Proposed changes
Support running multiple web flows in one
test
command. This used to work when using the--device=chromium
option, but broke in version 1.39.0 (commit).Testing
I'm not really familiar with the codebase, so I don't know if this change has any unintended consequences not caught by the tests above.
Automated test coverage of this could be added in #2195.
Issues fixed
#2269