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

Inject tunnel settings in RelaySelectorWrapper #6721

Conversation

buggmagnet
Copy link
Contributor

@buggmagnet buggmagnet commented Sep 2, 2024

This PR changes RelaySelectorWrapper to not create tunnel settings instances by itself anymore.
Instead, we now pass tunnel settings when we need to select a relay to always rely upon settings that were read from cache.

This fixes a bug where saved user settings would otherwise not be respected when upgrading the app to a new version.


This change is Reviewable

@buggmagnet buggmagnet added the iOS Issues related to iOS label Sep 2, 2024
@buggmagnet buggmagnet self-assigned this Sep 2, 2024
Copy link

linear bot commented Sep 2, 2024

@buggmagnet buggmagnet force-pushed the fix-latesttunnelsettings-being-recreated-not-from-cache-ios-808 branch 3 times, most recently from d06ce88 to b405566 Compare September 3, 2024 06:52
mojganii
mojganii previously approved these changes Sep 3, 2024
Copy link
Collaborator

@mojganii mojganii left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 11 files reviewed, all discussions resolved

Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPNTests/MullvadREST/Relay/RelaySelectorWrapperTests.swift line 90 at r1 (raw file):

    }

    func testCanSelectRelayWithMultihopOffAndDaitaOn() throws {

This test seem to indirectly test the same thing as before, but using multihopWithoutDaitaConstraints for a test that explicitly states MultihopOffAndDaitaOn is a little confusing.

@buggmagnet buggmagnet force-pushed the fix-latesttunnelsettings-being-recreated-not-from-cache-ios-808 branch from b405566 to b4dbcba Compare September 4, 2024 07:44
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)

Copy link
Contributor Author

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @rablador)


ios/MullvadVPNTests/MullvadREST/Relay/RelaySelectorWrapperTests.swift line 90 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

This test seem to indirectly test the same thing as before, but using multihopWithoutDaitaConstraints for a test that explicitly states MultihopOffAndDaitaOn is a little confusing.

You're right, the test was completely bogus, I fixed it, thanks for catching that !

Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@buggmagnet buggmagnet force-pushed the fix-latesttunnelsettings-being-recreated-not-from-cache-ios-808 branch from b4dbcba to d326fb3 Compare September 4, 2024 09:15
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@buggmagnet buggmagnet force-pushed the fix-latesttunnelsettings-being-recreated-not-from-cache-ios-808 branch from d326fb3 to cb9b474 Compare September 5, 2024 11:53
@buggmagnet buggmagnet merged commit 1c5fb0a into main Sep 5, 2024
9 checks passed
@buggmagnet buggmagnet deleted the fix-latesttunnelsettings-being-recreated-not-from-cache-ios-808 branch September 5, 2024 11:55
Copy link

github-actions bot commented Sep 5, 2024

🚨 End to end tests failed. Please check the failed workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants