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

Add installer downloader and in-app upgrades backend #7583

Merged
merged 112 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
2b3ca70
Add initial web installer and upgrades scaffold
dlon Jan 17, 2025
60d23ed
Replace `AppDownloaderFactory` trait with `From` impl (#7606)
Serock3 Feb 6, 2025
5f24b9e
Implement version provider for API responses
dlon Feb 7, 2025
1081a6d
Add mullvad-version-metadata tool
dlon Feb 7, 2025
e2d70cf
Update test data
dlon Feb 7, 2025
fc22b7c
Add build script for installer-downloader
dlon Feb 7, 2025
951d907
Add GHA workflow for regression testing installer-downloader size
dlon Feb 7, 2025
5542403
Remove signature download step
dlon Feb 8, 2025
cb86b03
Add documentation to mullvad-update format module
dlon Feb 8, 2025
504bb2a
Test expired metadata
dlon Feb 8, 2025
b2f5482
Update version response format
dlon Feb 12, 2025
0d789aa
Add improved API response parse tests
dlon Feb 12, 2025
7e86e61
Always fail if there are duplicate versions
dlon Feb 12, 2025
8183f74
Don't hide cancel button if download fails
dlon Feb 13, 2025
e898412
Set app download cache to a read-only directory
dlon Feb 13, 2025
25e5ee8
Add launch step to installer downloader
dlon Feb 13, 2025
5519974
Remove installer if verification fails
dlon Feb 13, 2025
4167212
Decouple download directory from mullvad-update
dlon Feb 14, 2025
2c8c3ca
Add API client for mullvad-update
dlon Feb 14, 2025
3a5f0a5
Implement beta downloader
dlon Feb 17, 2025
7afe2c6
Add arrow to 'stable link' on Windows
dlon Feb 17, 2025
ee2858e
Add improved error messages
dlon Feb 17, 2025
1281dd7
Select random mirror for downloading
dlon Feb 17, 2025
f769e2d
Print reason for error
dlon Feb 18, 2025
4f16a6c
Do not serialize rollout if 1
dlon Feb 19, 2025
147a28c
Do not deserialize back canonical JSON
dlon Feb 20, 2025
6b56cea
Add version counter to metadata and rename expiry field
dlon Feb 20, 2025
20aa242
Support multiple signatures
dlon Feb 20, 2025
0fb0b75
Implement error view for macos
hulthe Feb 21, 2025
a343c50
Fix launcher on macOS
dlon Feb 22, 2025
5191c45
Add packaging of macOS app to build.sh
dlon Feb 22, 2025
0e62c2f
Hide components that are not needed on Linux in mullvad-update
dlon Feb 22, 2025
e07bbc0
Fix clippy lints
dlon Feb 22, 2025
c0ca7e2
Remove unused features from native-windows-gui
dlon Feb 22, 2025
0349170
Remove unnecessary `into_boxed_slice`
dlon Feb 23, 2025
e09092b
Add logger to installer-downloader
dlon Feb 23, 2025
47d0235
Use user-accessible random temp dir on macOS
dlon Feb 24, 2025
8cf0ca7
Update installer-downloader texts
dlon Feb 24, 2025
0b0204f
Fix installer text positions on macos
hulthe Feb 24, 2025
940913d
Add arrow to stable link in installer-downloader
hulthe Feb 25, 2025
7bfd655
Make beta/stable links look the part (installer-downloader)
hulthe Feb 25, 2025
f7dd7df
Refactor buttons slightly
hulthe Feb 25, 2025
46f2b1f
Fix stable link arrow
hulthe Feb 25, 2025
0406569
Use stagemole to retrieve metadata in installer-downloader
dlon Feb 26, 2025
1899613
Remove updates- prefix in installer-downloader
dlon Feb 26, 2025
03eec0b
Update snapshots
dlon Feb 27, 2025
81939bb
Add file logging
dlon Feb 27, 2025
e90ea8f
Switch to rustls for installer-downloader
dlon Feb 27, 2025
364ff7b
Force TLS 1.3 in mullvad-update
dlon Feb 27, 2025
751bcc6
Pin installer-downloader to LE root for version metadata
dlon Feb 27, 2025
c3c0a06
Detect native CPU arch
MarkusPettersson98 Feb 21, 2025
aefca52
Remove explicit `unsafe` from `windows-installer`
MarkusPettersson98 Feb 21, 2025
5605ba9
Push error handling of `get_arch` outwards
MarkusPettersson98 Feb 24, 2025
f891e9b
Fix tests
MarkusPettersson98 Feb 27, 2025
3e3ec7f
Clean up `Cargo.toml`
MarkusPettersson98 Feb 27, 2025
3d4d95f
Convert `fern` to workspace dependency
MarkusPettersson98 Feb 27, 2025
73ea790
Change rollout to 0
dlon Feb 27, 2025
99a8a4a
Move constants to top in installer-downloader
dlon Feb 27, 2025
da20f02
Move action handlers to functions in installer-downloader
dlon Feb 27, 2025
ab00956
Do not add manifest to installer-downloader when building tests
dlon Mar 3, 2025
b5964d5
Run as admin only in release mode
dlon Mar 3, 2025
a193f5b
Sign and notarize installer downloader
dlon Feb 24, 2025
9ab1e10
Add build/ to .gitignore
dlon Feb 28, 2025
cc4c66d
Add missing safety comments
dlon Mar 3, 2025
14d86ef
Document font lifetime for windows UI
dlon Mar 3, 2025
e58632e
Simplify cfg conditions in installer-downloader
dlon Mar 3, 2025
2094a65
Update bundle identifier in installer-downloader
dlon Mar 3, 2025
a0c84cb
Add constants for rollout in mullvad-update
dlon Mar 3, 2025
5d6eacf
Add docs for ActionMessageHandler
dlon Mar 3, 2025
78a1f9c
Add docs for queue_main
dlon Mar 3, 2025
d537aa6
Rename log to mullvad-installer.log
dlon Mar 3, 2025
6b83bd9
Fix grammatical error
dlon Mar 3, 2025
10ec437
Attempt to explain difference between initialize_controller and AppCo…
dlon Mar 3, 2025
234360d
Move imports out of function
dlon Mar 3, 2025
ec33f4a
Add new rollout constants
dlon Mar 3, 2025
aba4b7a
Add explicit clear methods to Delegate trait
dlon Mar 3, 2025
0a5f4da
Clarify that UI thread is the main thread
dlon Mar 3, 2025
587d01d
Use async_trait for DirectoryProvider
dlon Mar 3, 2025
ab3251f
Improve docs for temp module
dlon Mar 3, 2025
a0e7b80
Include error message text in snapshots
dlon Mar 3, 2025
47ef9de
Add clear_progress
dlon Mar 3, 2025
8385667
Add safety comment for NSColor instantiation
dlon Mar 3, 2025
b9ce64d
Remove TODO comment
dlon Mar 3, 2025
df0dd16
Move fake implementations of updater/downloader traits to own module
dlon Mar 3, 2025
5857547
Note that releases must be sorted by version number
dlon Mar 3, 2025
8ae3b64
Move size hint check to method
dlon Mar 3, 2025
bb47a0e
Compute position of error view button
dlon Mar 4, 2025
60cace5
Remove TODO about Segoe font
dlon Mar 4, 2025
fe255f0
Improve safety documentation
dlon Mar 4, 2025
1104408
Remove PGP code signing key
dlon Mar 4, 2025
c42a706
Update test generation script
dlon Mar 4, 2025
2aa5f05
Change domain name to option
dlon Mar 4, 2025
e2d7bdd
Add icon to installer-downloader on Windows
dlon Mar 4, 2025
9c5ed68
Force static linking against libc
dlon Mar 4, 2025
753f73c
Abort download task when begin_download is incorrectly called twice
dlon Mar 4, 2025
d7782f8
Clarify panic message
dlon Mar 4, 2025
3de6aaa
Update version metadata URL
dlon Mar 4, 2025
3da2c2d
Fix documentation warnings
dlon Mar 4, 2025
d9e4dd0
Change from "as _" to "as isize"
dlon Mar 4, 2025
aa2176e
Add links to RGB macro
dlon Mar 4, 2025
cae49e5
Fetch app version before starting `ActionMessageHandler`
Serock3 Mar 4, 2025
1f5b3a9
Request all remaining bytes in HTTP range request
dlon Mar 4, 2025
7c443a2
Remove TODO comment about missing fields
dlon Mar 4, 2025
50af33f
Fix error string about hex length
dlon Mar 4, 2025
f29f126
Fix target arch check
dlon Mar 4, 2025
e5063f6
Remove comment about borrow
dlon Mar 5, 2025
111ee42
Clarify meaning of default rollout
dlon Mar 5, 2025
f4d55ec
Note that svg conversion is manual
dlon Mar 5, 2025
b0792ce
Set font size
dlon Mar 5, 2025
fce594e
Add `fail_fetching` to `FakeVersionInfoProvider`
Serock3 Mar 5, 2025
1f5459e
Add test for failed version fetching
Serock3 Mar 5, 2025
3c6af55
Fix retry version check
Serock3 Mar 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/actions/check-file-size/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Check file size"
description: "Fails a file exceeds a given size limit"
inputs:
artifact:
description: "Path to the file"
required: true
max_size:
description: "Maximum allowed size in bytes"
required: true
runs:
using: "composite"
steps:
- name: Check file size
shell: bash
run: |
if [ -f "${{ inputs.artifact }}" ]; then
if [ "$(uname)" = "Darwin" ]; then
SIZE=$(stat -f %z "${{ inputs.artifact }}")
else
SIZE=$(stat -c %s "${{ inputs.artifact }}")
fi
echo "File size: $SIZE bytes"
echo "Size limit: ${{ inputs.max_size }} bytes"

if [ "$SIZE" -gt "${{ inputs.max_size }}" ]; then
echo "Error: Binary size exceeds limit."
exit 1
fi
else
echo "Error: File not found!"
exit 1
fi
81 changes: 81 additions & 0 deletions .github/workflows/downloader.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: Installer downloader - Size test
on:
pull_request:
paths:
- '**'
- '!**/**.md'
- '!.github/workflows/**'
- '.github/workflows/downloader.yml'
- '!.github/CODEOWNERS'
- '!android/**'
- '!audits/**'
- '!build.sh'
- '!ci/**'
- '!clippy.toml'
- '!deny.toml'
- '!rustfmt.toml'
- '!.yamllint'
- '!docs/**'
- '!graphics/**'
- '!desktop/**'
- '!ios/**'
- '!scripts/**'
- '!.*ignore'
- '!prepare-release.sh'
- '!**/osv-scanner.toml'

permissions: {}

jobs:
build-windows:
strategy:
matrix:
config:
- os: windows-latest
arch: x64
runs-on: ${{ matrix.config.os }}
env:
# If the file is larger than this, a regression has probably been introduced.
# You should think twice before increasing this limit.
MAX_BINARY_SIZE: 2621440
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build
shell: bash
env:
# On Windows, the checkout is on the D drive, which is very small.
# Moving the target directory to the C drive ensures that the runner
# doesn't run out of space on the D drive.
CARGO_TARGET_DIR: "C:/cargo-target"
run: ./installer-downloader/build.sh

- name: Check file size
uses: ./.github/actions/check-file-size
with:
artifact: "./dist/Install Mullvad VPN.exe"
max_size: ${{ env.MAX_BINARY_SIZE }}

build-macos:
runs-on: macos-latest
env:
# If the file is larger than this, a regression has probably been introduced.
# You should think twice before increasing this limit.
MAX_BINARY_SIZE: 3145728
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
run: rustup target add x86_64-apple-darwin

- name: Build
run: ./installer-downloader/build.sh

- name: Check file size
uses: ./.github/actions/check-file-size
with:
artifact: "./dist/Install Mullvad VPN.dmg"
max_size: ${{ env.MAX_BINARY_SIZE }}
Loading
Loading