Skip to content
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: reinstall ios app to clear state reliably #2118

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

axelniklasson
Copy link
Contributor

@axelniklasson axelniklasson commented Oct 30, 2024

Proposed changes

Reinstall the app and then launch it instead of manually trying to delete app state folders, which should improve the experience when relying on clear state to have a completely blank slate in the app.

Relates to #1601

@axelniklasson axelniklasson marked this pull request as ready for review October 30, 2024 15:06
@herval
Copy link
Collaborator

herval commented Oct 30, 2024

how do we make sure this is working?

Co-authored-by: Igor Lema <48068670+igorsmotto@users.noreply.github.com>
)
// reinstall the app as that is the most stable way to clear state
reinstallApp(deviceId, bundleId)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could break the current maestro flows for all the users right? How do we plan to roll this out?

Do we wait to bring on cloud/robin or we do it right away?

Should this be in next release or we include in this current version of CLI as 1.39.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am torn - the fact is that clearState is not working properly today, so the fact that we fix it means that flows that implicitly rely on the broken state of clearState might stop working. However, it's a bug fix and not a breaking change so doing a major version bump doesn't feel right. Thoughts?

Copy link
Collaborator

@igorsmotto igorsmotto Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could break the current maestro flows for all the users right?

Wait, how? Like, do you have any idea? We could potentially test this more to reduce this risk

Copy link
Collaborator

@igorsmotto igorsmotto Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About versioning, to me it's a bug fix. Clear state being flaky since forever is a bug

Copy link
Collaborator

@amanjeetsingh150 amanjeetsingh150 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, how? Like, do you have any idea? We could potentially test this more to reduce this risk

Users would have made their flows adapting to the current bug. So, the flows could break when this is actually fixed.

I am torn - the fact is that clearState is not working properly today, so the fact that we fix it means that flows that implicitly rely on the broken state of clearState might stop working. However, it's a bug fix and not a breaking change so doing a major version bump doesn't feel right. Thoughts?

TBH, I am in favour of fully rolling this out without any hacks on backend. Given we emphasize that it could potentially break flows, I think its ok.

Around the rollout, I feel this not requires a major version bump but we should maybe just release (1.39.1) instead of waiting this to get in 1.40.0. Get this in cloud, robin and CLI as a quick follow up instead of waiting for 1.40.0 WDYT?

@igorsmotto igorsmotto merged commit 11b8f7a into main Nov 4, 2024
8 checks passed
@igorsmotto igorsmotto deleted the fix-ios-clearstate branch November 4, 2024 17:06
rasyid7 pushed a commit to rasyid7/maestro that referenced this pull request Dec 9, 2024
* fix: reinstall ios app to clear state reliably

* Update maestro-ios-driver/src/main/kotlin/util/LocalSimulatorUtils.kt

Co-authored-by: Igor Lema <48068670+igorsmotto@users.noreply.github.com>

---------

Co-authored-by: Igor Lema <48068670+igorsmotto@users.noreply.github.com>
rasyid7 pushed a commit to rasyid7/maestro that referenced this pull request Dec 9, 2024
* fix: reinstall ios app to clear state reliably

* Update maestro-ios-driver/src/main/kotlin/util/LocalSimulatorUtils.kt

Co-authored-by: Igor Lema <48068670+igorsmotto@users.noreply.github.com>

---------

Co-authored-by: Igor Lema <48068670+igorsmotto@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants