-
Notifications
You must be signed in to change notification settings - Fork 369
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
Bundle a pre-generated relay list instead of generating one on android #7518
base: main
Are you sure you want to change the base?
Bundle a pre-generated relay list instead of generating one on android #7518
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.
Reviewed 4 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Pururun)
android/app/build.gradle.kts
line 299 at r2 (raw file):
} tasks.register("ensureRelayListExist") {
Perhaps we could skip checking this build time and just doing it in the extractFile
function? In other words crash if the list is missing for builds where we expect it to exist.
prepare-release.sh
line 75 at r2 (raw file):
git add dist-assets/relays/relays.json git commit -S -m "Bundle relay list" \
I suggest changing to something like: Add relay list to bundle with $PRODUCT_VERSION
Code quote:
Bundle relay list
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.
Reviewed 2 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @Pururun)
prepare-release.sh
line 73 at r2 (raw file):
mkdir dist-assets/relays cargo run -q -p mullvad-api --bin relay_list > dist-assets/relays/relays.json
Nit, but whitespaces 🙈
prepare-release.sh
line 74 at r2 (raw file):
cargo run -q -p mullvad-api --bin relay_list > dist-assets/relays/relays.json git add dist-assets/relays/relays.json
You don't need to add it, you specify the path to git commit
below already.
android/app/build.gradle.kts
line 334 at r2 (raw file):
val localProperties = gradleLocalProperties(rootProject.projectDir, providers) val versionName = generateVersionName(localProperties) return versionName.contains("dev")
I know this is not new in this PR. But on desktop we check if the version contains "-dev-"
and not just "dev"
. I think this is more resilient to accidentally matching something as dev even if it's more nitpicky than maybe needed here and now.
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.
Reviewable status: 2 of 8 files reviewed, 3 unresolved discussions (waiting on @albin-mullvad and @faern)
prepare-release.sh
line 73 at r2 (raw file):
Previously, faern (Linus Färnstrand) wrote…
Nit, but whitespaces 🙈
Done
prepare-release.sh
line 74 at r2 (raw file):
Previously, faern (Linus Färnstrand) wrote…
You don't need to add it, you specify the path to
git commit
below already.
Done
prepare-release.sh
line 75 at r2 (raw file):
Previously, albin-mullvad wrote…
I suggest changing to something like:
Add relay list to bundle with $PRODUCT_VERSION
Done
android/app/build.gradle.kts
line 299 at r2 (raw file):
Previously, albin-mullvad wrote…
Perhaps we could skip checking this build time and just doing it in the
extractFile
function? In other words crash if the list is missing for builds where we expect it to exist.
Moved it to the function. It is a bit messy since service is its own module, but that could be fixed when the merge that app and service module.
android/app/build.gradle.kts
line 334 at r2 (raw file):
Previously, faern (Linus Färnstrand) wrote…
I know this is not new in this PR. But on desktop we check if the version contains
"-dev-"
and not just"dev"
. I think this is more resilient to accidentally matching something as dev even if it's more nitpicky than maybe needed here and now.
Good feedback! Changed.
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.
Reviewed 6 of 6 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faern)
For dev builds we rely on the app to download the relay list from the api. This will make the app behave a bit weird if it is not able to download the relay list
For release builds on release branches we will generate a relay list and commit it to the branch. This will then be used by the app and thus release builds will have a bundled
relays.json
.This is required for reproducible builds.
This change is