iOS reviewers wanted for partial update PRs
ayewo opened this issue · comments
"Make it work, make it right, make it fast" -- Kent Beck
1.0. Support for partial update has been added
I have opened the following PRs, which add support for partial update to Capgo, to close issue #119 and potentially issue #225:
- Part 1 of 4 in the
Cap-go/capacitor-updater
repo; - Part 2 of 4 in the
Cap-go/CLI
repo; - Part 3 of 4 in the
Cap-go/capgo
repo; - Part 4 of 4 in my fork of the
Cap-go/demo-app
repo.- I created 3 versions of the demo-app for testing: https://github.com/ayewo/demo-app/releases
We need 1-2 reviewers with access to Xcode and the iOS simulator to deploy the changes locally and verify that everything works, end-to-end.
1.1. Review expectations
- Deploy and test the changes locally using the
Cap-go/demo-app
; - Code review;
- Deploy and test the changes in production using an account provided by Martin.
In addition to code review, please document any trouble you encounter while trying out the partial update feature on iOS. This is important because if the steps are not clear to you, then other developers that are the target of this feature will struggle to set it up.
1.2. Payment
Due to the effort required to sign-off on this new feature, I’ve suggested to Martin to pay $801 for your time.
1.3. Todo list
No need to raise the following items in your review as they are on my todo-list:
-
For the
Cap-go/CLI
repo, the file extension regex for matching binary files2 to be removed from a partial update is not exhaustive. I used a limited set of file extensions to allow me ship v1. It can be trivially updated to include a more complete list of file extensions for image / video / font extensions later. -
For the
Cap-go/capacitor-updater
repo, Android is not yet done. The port is straight forward to code. I wanted to get to the point where I could get feedback from Martin about my implementation. There's the risk that he might make suggestions that might cause me to rework parts of the solution which is why I deferred updating the Android version of the plugin. -
For all repos, my branch is a few commits behind
main
. That's to be expected sincemain
is a moving target. I was originally pulling changes frommain
at the start of the work day but a few commits introduced breaking changes that interrupted my work causing me to spend time fixing bugs. Again, once Martin green-lights the solution, I will of course pull in the latest frommain
beforefeature/partial-update
branch across the 3 repos are merged. -
Please don't dwell on minutiae like local development files
config.json
,localhost.pem
that I added to theCap-go/capgo
repo. They were committed for convenience to keep these instructions short. Of course I will remove them before merging.
2.0. Design
To understand how the changes below fit together, you may want to first read the design proposal. It’s >2000 words of prose, the bulk of which are illustrative examples, so it should be a quick read, if you are already familiar with the codebase.
My implementation deviates slightly from the design I proposed so be sure to also read the next section.
2.1. Implementation notes
1. Partial bundles are named <target_version>-basedon-<source_version>
Capgo encourages devs to use semver to name their bundles e.g. 1.0.0, 1.0.3 etc.
For the partial update feature, I decided to make it easy to tell how a partial bundle was created by using the following format for the file name (which adheres to semver):
<target_version>-basedon-<source_version>
where <target_version>
is the current version to be uploaded e.g. 1.0.3;
and <source_version>
is the version that an end user is currently on e.g. 1.0.2;
So a partial bundle will typically be named 1.0.3-basedon-1.0.2.
2. Slight alteration of how the CLI works
I originally wanted to avoid impacting how the CLI currently works, so as part of adding support for partial updating, if the partialUpdate
flag is set to true
in capacitor.config.json
, the partial update logic would kick off after a full bundle had been uploaded successfully to the Capgo servers (as you can see in commit 3f528c).
It turns out that whenever a developer uses the CLI to upload a bundle, that bundle is marked as the latest version in Capgo. So for instance, if you uploaded version 1.0.0 (aka the built-in version) yesterday then upload version 1.0.1 today, version 1.0.0 will no longer be available for download to end users because 1.0.1 will be marked as the latest version inside the DB (in the apps.last_version
column).
This meant that after uploading a full bundle for 1.0.1, the partial bundle (named 1.0.1-basedon-1.0.0) would be uploaded and marked by Capgo as the latest, which would be incorrect since a partial bundle by design will be missing some files that are in the full bundle.
This is why I had to change the logic to ensure that the upload of a partial update happens-before a full update. In other words, a partial update must first be uploaded before a full upload is made by the CLI, as you can see in the most recent commit 4d392e.
3. No need for a manifest.json
The realization above had a neat side-effect: it made the final implementation for v1 easier.
In the proposal, I suggested that the CLI would maintain a manifest.json
to keep track of the contents of different bundle versions locally, but this is no longer necessary.
Again, assuming 1.0.0 is the built-in version, once a version 1.0.3 is uploaded (after versions 1.0.0 and 1.0.1), the https://api.capgo.app/updates
endpoint will always return 1.0.3 as the latest version available for download.
Stated differently, a developer can only base a partial bundle on the last version that was uploaded. If the last version that was uploaded is 1.0.2, and the current version about to be uploaded is 1.0.3, then they can only create partial bundle named 1.0.3-basedon-1.0.2. Clients still on version 1.0.1 or on version 1.0.0 (the built-in) will have to download the full bundle when they attempt to update.
Unless the update logic in Capgo is reworked for v2 of this feature, it would be pointless to allow a developer create a partial bundle based on arbitrary versions that are older.
3.0. Deployment
3.1. Cap-go/capgo
- Pull the
Cap-go/capgo
repo and switch to thefeature/partial-update
branch:
git clone https://github.com/ayewo/capgo.git 01_capgo
cd 01_capgo
git switch feature/partial-update
- Install the packages and start Supabase
pn install
pn install supabase --save-dev
./node_modules/supabase/bin/supabase start
- Setup env vars3 for Supabase functions:
cat <<EOF > 01_capgo/supabase/.env.local
STRIPE_WEBHOOK_SECRET=test
STRIPE_SECRET_KEY=test
API_SECRET=testsecret
PLAN_MAKER=test
PLAN_SOLO=test
PLAN_TEAM=test
# Below is the accually important setup for S3
S3_ENDPOINT=s3.us-east-1.amazonaws.com
S3_REGION=us-east-1
S3_PORT=443
S3_SSL=true
R2_ACCESS_KEY_ID=<AWS-ACCESS-KEY>
R2_SECRET_ACCESS_KEY=<AWS-SECRET-KEY>
EOF
- Use the
aws-cli
to create an S3 bucket namedcapgo
:
aws s3 mb s3://capgo --region us-east-1
# when you are done or if you want to start over, use rb to delete it
aws s3 rb s3://capgo --force --region us-east-1
- Start Supabase functions:
./node_modules/supabase/bin/supabase functions serve --env-file ./supabase/.env.local
- Setup env vars for Netlify functions:
cat <<EOF > 01_capgo/.env.local
BRANCH=development
SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
SUPABASE_URL=http://localhost:54321
STRIPE_WEBHOOK_SECRET=test
STRIPE_SECRET_KEY=test
API_SECRET=testsecret
PLAN_MAKER=test
PLAN_SOLO=test
PLAN_TEAM=test
# Below is the accually important setup for S3
S3_ENDPOINT=s3.us-east-1.amazonaws.com
S3_REGION=us-east-1
S3_PORT=443
S3_SSL=true
R2_ACCESS_KEY_ID=<AWS-ACCESS-KEY>
R2_SECRET_ACCESS_KEY=<AWS-SECRET-KEY>
EOF
- Generate and install a self-signed SSL cert4 for the Netlify functions using
mkcert
(install viabrew install mkcert
):
mkcert localhost localhost.proxyman.io 127.0.0.1
mkcert -install
- Add the generated SSL cert to
01_capgo/netlify.toml
so that the/api/updates
endpoint can be served over SSL for the iOS and Android plugin:
[dev]
framework = "vite"
[dev.https]
certFile = "localhost+2.pem"
keyFile = "localhost+2-key.pem"
- Generate the Netlify functions then start them:
pnpm generate:node_serverless
pnpm --package=netlify-cli dlx netlify dev --port 8881
3.2. Cap-go/capacitor-updater
- Pull the
Cap-go/capacitor-updater
repo and switch to thefeature/partial-update
branch:
git clone https://github.com/ayewo/capacitor-updater.git 02_capgo_capacitor-updater
cd 02_capgo_capacitor-updater
git switch feature/partial-update
- Install the packages and build it
pn install
pn run build
3.3. Cap-go/CLI
- Pull the
Cap-go/CLI
repo and switch to thefeature/partial-update
branch:
git clone https://github.com/ayewo/CLI.git 03_capgo_cli
cd 03_capgo_cli
git switch feature/partial-update
- Install the packages and build it:
pn install
pn run build
3.4. Cap-go/demo-app & Cap-go/CLI
- Pull the
Cap-go/demo-app
repo and switch to thefeature/partial-update/1.0.0
branch:
git clone https://github.com/ayewo/demo-app.git 04_capgo_demo-app
cd 04_capgo_demo-app
git switch feature/partial-update/1.0.0
- Update
package.json
to use to your local copy of the@capgo/capacitor-updater
package. It's the same package you checked out to02_capgo_capacitor-updater/
in 3.2 above:
Or simply run this command:
brew install gnu-sed
gsed -i 's/\^5\.2\.14/link:\.\.\/02_capgo_capacitor-updater/g' package.json
Your package.json
should be updated accordingly (expand).
- "@capgo/capacitor-updater": "^5.2.14", + "@capgo/capacitor-updater": "link:../02_capgo_capacitor-updater",
- Install the packages:
pn install
- Build the
demo-app
and sync the native code for iOS:
pn run build
npx cap sync ios
# for android use:
npx cap sync android
- While inside the
04_capgo_demo-app/
folder, use the CLI you built in 3.3. to init and upload a full bundle.
Run and follow the on-screen prompts:
node ../03_capgo_cli/dist/index.js init ae6e7458-c46d-4c00-aa3b-153b0b8520ea
Your responses should look similar to the output below (expand).
┌ Capgo onboarding 🛫 │ ▲ 🚨 You are using @capgo/cli@3.13.14 it's not the latest version. │ Please use @capgo/cli@3.13.16" or @capgo/cli@latest to keep up to date with the latest features and bug fixes. │ ◓ Running: npx @capgo/cli@latest login ***...│ ▲ 🚨 You are using @capgo/cli@3.13.14 it's not the latest version. │ Please use @capgo/cli@3.13.16" or @capgo/cli@latest to keep up to date with the latest features and bug fixes. ◑ Running: npx @capgo/cli@latest login ***.│ ◆ login saved into .capgo file in home directory ◇ Login Done ✅ │ ◇ Add ee.forgr.demoapp in Capgo? │ Yes │ ◓ Running: npx @capgo/cli@latest app add ee.forgr.demoapp...│ ▲ 🚨 You are using @capgo/cli@3.13.14 it's not the latest version. │ Please use @capgo/cli@3.13.16" or @capgo/cli@latest to keep up to date with the latest features and bug fixes. │ ● Use global apy key /Users/mac/.capgo ◑ Running: npx @capgo/cli@latest app add ee.forgr.demoapp.│ ▲ Cannot find app icon in any of the following locations: resources/icon.png, assets/icon.png ◒ Running: npx @capgo/cli@latest app add ee.forgr.demoapp│ ◆ App ee.forgr.demoapp added to Capgo. ◇ App add Done ✅ │ ◇ Create default channel production for ee.forgr.demoapp in Capgo? │ Yes │ ┌ Create channel ◑ Running: npx @capgo/cli@latest channel add production ee.forgr.demoapp --default.│ ● Creating channel ee.forgr.demoapp#production to Capgo ◐ Running: npx @capgo/cli@latest channel add production ee.forgr.demoapp --default..│ ◆ Channel created ✅ ◇ Channel add Done ✅ │ ◇ Automatic Install "@capgo/capacitor-updater" dependency in ee.forgr.demoapp? │ No │ ● Run yourself "npm i @capgo/capacitor-updater@latest" │ ◇ Automatic Add "CapacitorUpdater.notifyAppReady()" code and import in ee.forgr.demoapp? │ No │ ● Add to your main file the following code: │ │ import { CapacitorUpdater } from '@capgo/capacitor-updater'; │ │ CapacitorUpdater.notifyAppReady(); │ │ ◇ Automatic configure end-to-end encryption in ee.forgr.demoapp updates? │ No │ ◇ Automatic build ee.forgr.demoapp with "npm run build" ? │ No │ ● Build yourself with command: npm run build && npx cap sync │ ◇ Automatic upload ee.forgr.demoapp bundle to Capgo? │ No │ ● Upload yourself with command: npx @capgo/cli@latest bundle upload │ ◇ Run in device now ? │ No │ ● Run yourself with command: npx cap run │ ◇ Automatic check if update working in device ? │ No │ ● Check logs in https://web.capgo.app/app/p/ee--forgr--demoapp/logs to see if update works. │ ● Welcome onboard ✈️! │ ● Your Capgo update system is setup │ ● Next time use `npx @capgo/cli@latest bundle upload` to only upload your bundle │ └ Bye 👋
- Upload your bundle to the
production
channel (note that the command should fail5):
node ../03_capgo_cli/dist/index.js bundle upload -c production
The command failed because the partialUpdate
flag was set in capacitor.config.ts
(expand).
│ ● The partial-update flag was set. Preparing to perform a partial update. │ ● The partial-update base version you specified is: 1.0.0 │ ● The partial-update base version (1.0.0) you specified must be lower than the current version (1.0.0)
- Temporarily unset the
partialUpdate
flag incapacitor.config.ts
then try again:
gsed -i 's/partialUpdate: true,/partialUpdate: false,/g' capacitor.config.ts
node ../03_capgo_cli/dist/index.js bundle upload -c production
The command should succeed with an output similar to below (expand).
┌ Uploading │ ▲ 🚨 You are using @capgo/cli@3.13.14 it's not the latest version. │ Please use @capgo/cli@3.13.16" or @capgo/cli@latest to keep up to date with the latest features and bug fixes. │ ● Use global apy key /Users/mac/.capgo │ ● Upload ee.forgr.demoapp@1.0.0 started from path "dist" to Capgo cloud │ ▲ WARNING !! │ Trial expires in 15 days │ ▲ Upgrade here: http://localhost.proxyman.io:5173/dashboard/settings/plans │ ◇ Checksum: 40ea551c │ ◇ Bundle Uploaded 💪 │ ● Link device to this bundle to try it: http://localhost.proxyman.io:5173/app/p/ee--forgr--demoapp/channel/1 │ └ Time to share your update to the world 🌍
- Make the
production
channel the default otherwise the Capgo/api/updates
endpoint will respond withCannot get channel or override ee.forgr.demoapp no default channel
even if there is an update:
node ../03_capgo_cli/dist/index.js channel set production -s default
The command should succeed with an output similar to below (expand).
┌ Set channel │ ● Use global apy key /Users/mac/.capgo │ ▲ WARNING !! │ Trial expires in 14 days, upgrade here: http://localhost.proxyman.io:5173/dashboard/settings/plans │ │ ● Set ee.forgr.demoapp channel: production to default │ └ Done ✅
- Set the
partialUpdate
flag back totrue
incapacitor.config.ts
6:
gsed -i 's/partialUpdate: false,/partialUpdate: true,/g' capacitor.config.ts
3.5. Cap-go/demo-app
-
Install Proxyman, a native macOS app that makes it easy to capture, inspect, and manipulate HTTP(s) traffic. Note that once you install Proxyman, it will proxy all traffic on your machine by default though you can toggle this on/off using the
⌥⌘O
keys. Next, follow their docs on how to install their root certificate in the iOS simulator. This step is important to allow the simulator accept the self-signed SSL cert we created in 3.1.7.4 -
Change to the
Cap-go/demo-app
folder and switch to thefeature/partial-update/1.0.0
branch:
cd 04_capgo_demo-app
git switch feature/partial-update/1.0.0
- Build the
demo-app
and sync the native code for iOS:
pn run build
npx cap sync ios
# for android use:
npx cap sync android
- Run version 1.0.0 of the app in the simulator7:
# first copy the recent edit to capacitor.config.ts
npx cap copy
# launch Xcode
npx cap open ios
# launch iOS simulator
npx cap run ios
Once the version 1.0.0 of the app launches in the iOS simulator, it should look like this:
In Proxyman, make sure you right-click on the localhost.proxyman.io:8881
domain to "Enable SSL proxying" so you can see all SSL traffic to the /api/updates
endpoint. Your Proxyman screen should look like this after the demo-app
has launched in the simulator to check if an update is available:
- Use the CLI to build and upload version 1.0.1 of the app:
git stash
git switch feature/partial-update/1.0.1
pn run build
node ../03_capgo_cli/dist/index.js bundle upload -c production
The command should succeed with an output similar to below (expand).
│ ● The partial-update flag was set. Preparing to perform a partial update. │ ● The partial-update base version you specified is: 1.0.0 │ ● Use global apy key /Users/mac/.capgo │ ● Bundle url: https://s3.us-east-1.amazonaws.com/capgo/apps/6aa76066-55ef-4238-ade6-0b32334a4097/ee.forgr.demoapp/versions/1.0.0.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZJIIBBVIJHHWPGOT%2F20230917%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230917T205146Z&X-Amz-Expires=120&X-Amz-SignedHeaders=host&X-Amz-Signature=8e8b1851f768acd5fd1a788509947994d9e96e607ccf227ebd2cd68941e876f3 File dist/../manifest/dist_1.0.0-base.zip downloaded successfully. Matched file: assets/shapes.svg Matched file: assets/icon/icon.png Matched file: assets/icon/favicon.png Matching binary files in the base version that will be removed: [ 'assets/shapes.svg', 'assets/icon/icon.png', 'assets/icon/favicon.png' ] │ ● CLI options updated for partial-updates: {"channel":"production","bundle":"1.0.1-basedon-1.0.0","path":"dist/../manifest/dist_1.0.0-partial"} ┌ Uploading Removed binary file: dist/../manifest/dist_1.0.0-partial/assets/shapes.svg Removed binary file: dist/../manifest/dist_1.0.0-partial/assets/icon/icon.png Removed binary file: dist/../manifest/dist_1.0.0-partial/assets/icon/favicon.png │ ▲ 🚨 You are using @capgo/cli@3.13.14 it's not the latest version. │ Please use @capgo/cli@3.13.16" or @capgo/cli@latest to keep up to date with the latest features and bug fixes. │ ● Use global apy key /Users/mac/.capgo │ ● Upload ee.forgr.demoapp@1.0.1-basedon-1.0.0 started from path "dist/../manifest/dist_1.0.0-partial" to Capgo cloud │ ▲ WARNING !! │ Trial expires in 14 days │ ▲ Upgrade here: http://localhost.proxyman.io:5173/dashboard/settings/plans │ ◇ Checksum: 0054d133 │ ◇ Bundle Uploaded 💪 │ ● Your update is now available in your public channel 🎉 ┌ Uploading │ ▲ 🚨 You are using @capgo/cli@3.13.14 it's not the latest version. │ Please use @capgo/cli@3.13.16" or @capgo/cli@latest to keep up to date with the latest features and bug fixes. │ ● Use global apy key /Users/mac/.capgo │ ● Upload ee.forgr.demoapp@1.0.1 started from path "dist" to Capgo cloud │ ▲ WARNING !! │ Trial expires in 14 days │ ▲ Upgrade here: http://localhost.proxyman.io:5173/dashboard/settings/plans │ ◇ Checksum: a1c4338e │ ◇ Bundle Uploaded 💪 │ ● Your update is now available in your public channel 🎉 │ └ Time to share your update to the world 🌍
- Re-launch (version 1.0.0 of) the app in the simulator. It should detect that a new update (v1.0.1) is available for download.
The payload should also indicate that a partial update is available as can be seen in the Proxyman screen:
Send the app into the background then bring it to the foreground so that the partial update is applied.
After the 1.0.1 update is applied, your simulator screen should look like this:
Your simulator output should look similar to below (expand).
✨ Capacitor-updater: semaphoreUp ✨ Capacitor-updater: init for device 1BC85DEA-3E42-4912-8F7E-CBBF8765BCA4 ✨ Capacitor-updater: semaphoreWait 0 ✨ Capacitor-updater: version native 1.0.0 ✨ Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady ✨ Capacitor-updater: Check for update via https://localhost.proxyman.io:8881/updates ✨ Capacitor-updater: Auto-update parameters: InfoObject(platform: Optional("ios"), device_id: Optional("1BC85DEA-3E42-4912-8F7E-CBBF8765BCA4"), app_id: Optional("ee.forgr.demoapp"), custom_id: Optional(""), version_build: Optional("1.0.0"), version_code: Optional("1"), version_os: Optional("16.0"), version_name: Optional("builtin"), plugin_version: Optional("5.3.0"), is_emulator: Optional(true), is_prod: Optional(false), action: nil, channel: nil, partial_update: Optional(true)) ⚡️ Warning: isWebDebuggable only functions as intended on iOS 16.4 and above. ⚡️ Loading app at capacitor://localhost... 2023-09-17 22:43:06.207448+0100 App[11998:6886867] [Sandbox] Could not enable Mach bootstrap, errno = 22. 2023-09-17 22:43:06.208852+0100 App[11998:6886867] [Sandbox] Could not enable Mach bootstrap, errno = 22. ⚡️ To Native -> CapacitorUpdater notifyAppReady 74927566 ✨ Capacitor-updater: semaphoreDown ✨ Capacitor-updater: Setting status for bundle [builtin] to SUCCESS ✨ Capacitor-updater: Not saving info for bundle [builtin] { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"} ✨ Capacitor-updater: Fallback bundle is: { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"} ✨ Capacitor-updater: Version successfully loaded: { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"} ✨ Capacitor-updater: Current bundle loaded successfully. ['notifyAppReady()' was called] { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"} ⚡️ TO JS {"bundle":{"checksum":"","status":"success","downloaded":"1970-01-01T00:00:00.000Z","id":"builtin","version":"builtin"}} SplashScreen.hideSplash: SplashScreen was automatically hidden after default timeout. You should call `SplashScreen.hide()` as soon as your web app is loaded (or increase the timeout). Read more at https://capacitorjs.com/docs/apis/splash-screen#hiding-the-splash-screen ⚡️ WebView loaded ⚡️ To Native -> App addListener 74927567 ✨ Capacitor-updater: Stats send for app_moved_to_foreground, version builtin ✨ Capacitor-updater: A partial update is available for this download: { "sourceVersion": "1.0.0", "targetVersion": "1.0.1", "checksum": "0054d133", "url": "https://s3.us-east-1.amazonaws.com/capgo/apps/6aa76066-55ef-4238-ade6-0b32334a4097/ee.forgr.demoapp/versions/1.0.1-basedon-1.0.0.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZJIIBBVIJHHWPGOT%2F20230917%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230917T214307Z&X-Amz-Expires=120&X-Amz-SignedHeaders=host&X-Amz-Signature=041f961ca8f2ef59dd98e11ec01728a0ba1d4719001805f51e7101bffbb40489"} ✨ Capacitor-updater: New bundle: 1.0.1 found. Current is: builtin. Update will occur next time app moves to background. ✨ Capacitor-updater: list File : /Users/mac/Library/Developer/CoreSimulator/Devices/9F5E878A-809A-4D7B-849F-E347DBA6A343/data/Containers/Data/Application/DF37F6FC-8DF7-4483-8A61-9FB587EBD462/Documents/versions ✨ Capacitor-updater: Latest bundle already exists and will be deleted, download will overwrite it. ✨ Capacitor-updater: Removing info for bundle [Am5E5Az6Sm] ✨ Capacitor-updater: bundle delete 1.0.1 ✨ Capacitor-updater: Delete version deleted: { "id": "Am5E5Az6Sm", "version": "1.0.1", "downloaded": "2023-09-17T21:21:08.579Z", "checksum": "", "status": "downloading"} ✨ Capacitor-updater: Partial updating will continue for new bundle: 1.0.1 from a partial update URL: https://s3.us-east-1.amazonaws.com/capgo/apps/6aa76066-55ef-4238-ade6-0b32334a4097/ee.forgr.demoapp/versions/1.0.1-basedon-1.0.0.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZJIIBBVIJHHWPGOT%2F20230917%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230917T214307Z&X-Amz-Expires=120&X-Amz-SignedHeaders=host&X-Amz-Signature=041f961ca8f2ef59dd98e11ec01728a0ba1d4719001805f51e7101bffbb40489. ✨ Capacitor-updater: Storing info for bundle [d2z6esihTn] { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:07.898Z", "checksum": "", "status": "downloading"} ✨ Capacitor-updater: Stats send for delete, version 1.0.1 ✨ Capacitor-updater: Stats send for download_0, version 1.0.1 ✨ Capacitor-updater: Stats send for download_10, version 1.0.1 ✨ Capacitor-updater: Stats send for download_10, version 1.0.1 ✨ Capacitor-updater: Stats send for download_10, version 1.0.1 ✨ Capacitor-updater: Stats send for download_10, version 1.0.1 ✨ Capacitor-updater: Stats send for download_20, version 1.0.1 ✨ Capacitor-updater: Stats send for download_20, version 1.0.1 ✨ Capacitor-updater: Stats send for download_20, version 1.0.1 ✨ Capacitor-updater: Stats send for download_30, version 1.0.1 ✨ Capacitor-updater: Stats send for download_30, version 1.0.1 ✨ Capacitor-updater: Built-in bundle is active. Nothing to do. ✨ Capacitor-updater: Stats send for download_40, version 1.0.1 ✨ Capacitor-updater: Stats send for download_40, version 1.0.1 ✨ Capacitor-updater: Stats send for download_40, version 1.0.1 ✨ Capacitor-updater: Stats send for download_50, version 1.0.1 ✨ Capacitor-updater: Stats send for download_50, version 1.0.1 ✨ Capacitor-updater: Stats send for download_50, version 1.0.1 ✨ Capacitor-updater: Stats send for download_50, version 1.0.1 ✨ Capacitor-updater: Stats send for download_60, version 1.0.1 ✨ Capacitor-updater: Stats send for download_60, version 1.0.1 ✨ Capacitor-updater: Cannot find privateKey or sessionKey ✨ Capacitor-updater: Stats send for download_70, version 1.0.1 ✨ Capacitor-updater: Storing info for bundle [d2z6esihTn] { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ✨ Capacitor-updater: Setting status for bundle [d2z6esihTn] to PENDING ✨ Capacitor-updater: Storing info for bundle [d2z6esihTn] { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ✨ Capacitor-updater: sendReadyToJs ✨ Capacitor-updater: endBackGroundTaskWithNotif update downloaded, will install next background ✨ Capacitor-updater: semaphoreWait 10000 ✨ Capacitor-updater: Stats send for download_complete, version 1.0.1 ✨ Capacitor-updater: Check for pending update ✨ Capacitor-updater: Next bundle is: { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ✨ Capacitor-updater: Current bundle set to: /Users/mac/Library/Developer/CoreSimulator/Devices/9F5E878A-809A-4D7B-849F-E347DBA6A343/data/Containers/Data/Application/DF37F6FC-8DF7-4483-8A61-9FB587EBD462/Library/NoCloud/ionic_built_snapshots/d2z6esihTn ✨ Capacitor-updater: Setting status for bundle [d2z6esihTn] to PENDING ✨ Capacitor-updater: Storing info for bundle [d2z6esihTn] { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ✨ Capacitor-updater: semaphoreUp ✨ Capacitor-updater: semaphoreWait 0 ✨ Capacitor-updater: Reloading d2z6esihTn ✨ Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady ✨ Capacitor-updater: Updated to bundle: { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ⚡️ To Native -> CapacitorUpdater notifyAppReady 12476629 ✨ Capacitor-updater: semaphoreDown ✨ Capacitor-updater: Setting status for bundle [d2z6esihTn] to SUCCESS ✨ Capacitor-updater: Storing info for bundle [d2z6esihTn] { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "success"} ✨ Capacitor-updater: Fallback bundle is: { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"} ✨ Capacitor-updater: Version successfully loaded: { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ✨ Capacitor-updater: Current bundle loaded successfully. ['notifyAppReady()' was called] { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "pending"} ⚡️ TO JS {"bundle":{"status":"pending","id":"d2z6esihTn","downloaded":"2023-09-17T21:43:28.146Z","version":"1.0.1","checksum":"0054d133"}} ⚡️ WebView loaded ✨ Capacitor-updater: Stats send for set, version 1.0.1 ✨ Capacitor-updater: Stats send for app_moved_to_background, version builtin ✨ Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady ⚡️ To Native -> App addListener 12476630 ✨ Capacitor-updater: Check for update via https://localhost.proxyman.io:8881/updates ✨ Capacitor-updater: Auto-update parameters: InfoObject(platform: Optional("ios"), device_id: Optional("1BC85DEA-3E42-4912-8F7E-CBBF8765BCA4"), app_id: Optional("ee.forgr.demoapp"), custom_id: Optional(""), version_build: Optional("1.0.0"), version_code: Optional("1"), version_os: Optional("16.0"), version_name: Optional("1.0.1"), plugin_version: Optional("5.3.0"), is_emulator: Optional(true), is_prod: Optional(false), action: nil, channel: nil, partial_update: Optional(true)) ✨ Capacitor-updater: Stats send for app_moved_to_foreground, version 1.0.1 ✨ Capacitor-updater: API response: No new version available ✨ Capacitor-updater: sendReadyToJs ✨ Capacitor-updater: endBackGroundTaskWithNotif No new version available ✨ Capacitor-updater: semaphoreWait 10000 ✨ Capacitor-updater: Current bundle is: { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "success"} ✨ Capacitor-updater: notifyAppReady was called. This is fine: { "id": "d2z6esihTn", "version": "1.0.1", "downloaded": "2023-09-17T21:43:28.146Z", "checksum": "0054d133", "status": "success"} ✨ Capacitor-updater: Check for pending update ✨ Capacitor-updater: Stats send for app_moved_to_background, version 1.0.1
- You can repeat the steps in 3.5.5. but change the branch to
feature/partial-update/1.0.2
so that you can create a partial upload for version 1.0.2 of the app. The main image in your app should change to this on your simulator screen.
Footnotes
-
I suggested at least $80 since the review of a pull request is $20 and there are 4 repos: $20 X 4 = $80. If you are available to also test in production, I think an additional payment can be arranged. ↩
-
Please refer to the design doc for what binary files refer to in this context. ↩
-
Please see getting started and s3 for information on using Minio in local development. The version of the S3 JS client used by the project didn't seem to work with Minio locally which is why I had to use AWS S3 which worked on the first try. ↩
-
Three hostnames were added to the self-signed cert
localhost
,127.0.0.1
andlocalhost.proxyman.io
. Note thatlocalhost.proxyman.io
resolves to127.0.0.1
. It easier to monitor SSL traffic on a domain/subdomain than a naked IP address like127.0.0.1
which is why it was added to the self-signed cert. ↩ ↩2 -
This is intentional because a partial bundle is based on the contents of a previous bundle. Since we are setting up our app for the first time in Capgo, the first version to be uploaded to Capgo must be the built-in bundle. Partial update can only be used when there is a previous bundle (that is live i.e. available for download) on which the partial bundle can be based on. ↩
-
Note that the
partialUpdate
flag is used by both the CLI and the plugin. Setting it back totrue
is necessary for the plugin to enable the partial update logic when checking for bundle update. ↩ -
Tested on version 14.0.1 of Apple Xcode and Simulator using an iPhone 14 Pro running iOS 16.0. ↩
Hey @ayewo, I do have access to Xcode and the iOS simulator.
How do you want me to review it? What are the steps? I see you mentioning 4 repos to test, but how? 😅
Hey @rishi-raj-jain
Great, you are good to go then!
I've updated the issue above with plenty of step-by-step info and a few screen shots to help you complete the review.
Don't hesitate to ask for help here or in Discord.
@rishi-raj-jain yes, just keep in mind it's a bit hard for me to remember all tips i have to do so if i miss one tell me :)
Haha sure thing, I'm hungry anyways.
From @ayewo,
I think it would be best if you did it in sequence.
3.1 down to 3.4.
Then 3.5. is where you get do to some actual testing inside the iOS simulator.
So I would say the mapping is roughly as follows:
“Part 3 of 4 in the Cap-go/capgo repo;” maps to 3.1.
“Part 1 of 4 in the Cap-go/capacitor-updater repo;” maps to 3.2.
“Part 2 of 4 in the Cap-go/CLI repo;” maps to 3.3.
“Part 4 of 4 in my fork of the Cap-go/demo-app repo.” maps to 3.4.
How can I get a AWS account to use in 3.1?
I reached till that step
@riderx can you share?
@rishi-raj-jain Alternatively, you could try setting up Minio locally by following the Capgo docs mentioned in footnote [3]:
Please see getting started and s3 ...
@rishi-raj-jain you can also use R2 instead, it simpler.
@rishi-raj-jain were you able to make any progress since you started last week?
commenting to remember myself to help reviewing this 😄
Can I try to review this? new to Cap-go, as of now trying to learn this system but based on the above review of 14 pro, I can check this on latest simulator too. I have latest xcode and simulator setup.
Yes please
Need help with Supabase local setup.
Supautils extension is not getting installed on my local supabase setup.
Environment details
MacOS: Sonoma 14.1.1.
ECR: public.ecr.aws/supabase/postgres
expand this for log
./node_modules/supabase/bin/supabase start --debug
Supabase CLI 1.115.4
2023/11/30 13:25:23 Sent Header: Host [api.moby.localhost]
....
[truncated]
....
2023/11/30 13:25:34 Connect Start: tcp 127.0.0.1:54322
2023/11/30 13:25:34 Connect Done: tcp 127.0.0.1:54322
2023/11/30 13:25:34 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/11/30 13:25:34 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]}
2023/11/30 13:25:34 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=ZfCxLBAvTcFpAHvx354iU3st"}
2023/11/30 13:25:34 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=ZfCxLBAvTcFpAHvx354iU3stZFXHLR4fGocM2jgXfE1jQOwJ,s=IfacWSyJIZY04aKRJZIWug==,i=4096"}
2023/11/30 13:25:34 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=ZfCxLBAvTcFpAHvx354iU3stZFXHLR4fGocM2jgXfE1jQOwJ,p=LFZjecATogMRMYNz6RPkOZC08c8glYo86XKkWRnuBUE="}
2023/11/30 13:25:34 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=H04PlxypO9UJNIJtTi6Bsl4zWqJJC0ur7I5P7fmFXfg="}
2023/11/30 13:25:34 PG Recv: {"Type":"AuthenticationOK"}
....
[truncated]
....
2023/11/30 13:25:35 PG Send: {"Type":"Describe","ObjectType":"P","Name":""}
2023/11/30 13:25:35 PG Send: {"Type":"Execute","Portal":"","MaxRows":0}
2023/11/30 13:25:35 PG Send: {"Type":"Sync"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"RowDescription","Fields":[{"Name":"set_config","TableOID":0,"TableAttributeNumber":0,"DataTypeOID":25,"DataTypeSize":-1,"TypeModifier":-1,"Format":0}]}
2023/11/30 13:25:35 PG Recv: {"Type":"DataRow","Values":[{"text":""}]}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SELECT 1"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SET"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"ALTER SCHEMA"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE SCHEMA"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE EXTENSION"}
2023/11/30 13:25:35 PG Recv: {"Type":"ParseComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"BindComplete"}
2023/11/30 13:25:35 PG Recv: {"Type":"NoData"}
2023/11/30 13:25:35 PG Recv: {"Type":"ErrorResponse","Severity":"ERROR","SeverityUnlocalized":"ERROR","Code":"22023","Message":"extension "supautils" has no installation script nor update path for version "0.1.0"","Detail":"","Hint":"","Position":0,"InternalPosition":0,"InternalQuery":"","Where":"","SchemaName":"","TableName":"","ColumnName":"","DataTypeName":"","ConstraintName":"","File":"extension.c","Line":1551,"Routine":"CreateExtensionInternal","UnknownFields":null}
2023/11/30 13:25:35 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
2023/11/30 13:25:35 PG Send: {"Type":"Terminate"}
ERROR: extension "supautils" has no installation script nor update path for version "0.1.0" (SQLSTATE 22023)
At statement 24: CREATE EXTENSION IF NOT EXISTS "supautils" WITH SCHEMA "extensions"
@Akki9326 how are you attempting to deploy Supabase?
What commit are you using? Since you are not yet familiar with the app, to avoid getting blocked by code drift in the main
branch, please try with commit 7a0628ebc14d641f3a769f00bfbfa3da7ed316dc
from the PR branch.
Once you are familiar with the app, you can retest the partial update feature on a more recent branch like development
.
I'm using feature/partial-update branch from @ayewo's fork. as mentioned in step 3.3
@Akki9326 It's hard to make sense of your issue without additional info/context.
Looking at the error:
ERROR: extension "supautils" has no installation script nor update path for version "0.1.0" (SQLSTATE 22023)
At statement 24: CREATE EXTENSION IF NOT EXISTS "supautils" WITH SCHEMA "extensions"
There is no extension with the name "supautils"
in the Capgo code base so you might want to start the setup on a clean slate.
sure, let me try that.
this is resolved with main branch, moving on with another setup...
@ayewo I will be starting the review of your changes
@ayewo I have come to the conclusion that you have not followed the insurrections given in the main issue.
The idea was to upload file by file. Instead you added a fancy filter to remove binary files (assets) from the zip file if the user has already downloaded said assets. This is not at all what we expected.
In the initial pr it was said
Would help if the OTA updates could be downloaded as individual files rather than one big .zip file
What I have envisioned is something like this
I've attempted to explain this here and although the proposal made in that comment is way to complex the main principal still applies.
Instead what you implemented is something like this:
Your solution allows a user currently on partialUpdateBaseVersion
to update to a version based on that. So for example with the version 1.0.166-basedon-1.0.162.zip
it allows anyone on 1.0.162
to update to 1.0.166
without having to download the duplicated files.
This could work except when you conciser the downsides:
- It requires the user to maintain this
partialUpdateBaseVersion
and no documentation has been provided - It increases the overall size of bundles that are uploaded to capgo as your are uploading the bundle twice
- It does not work for text files (only assets file are supported)
- It does not fix the unstable connection issues. If you have a bad internet connection and your download fails for the entire zip then you will have to try to redownload. It would be much easier to have to re-download individual files then the entire zip
In fairness your pr does have some value but I don't think it's something that can be implemented in prod.
I was able to write a simple PoC of my idea. Here is the video. Since I don't think there is any way to get your idea working I will be attempting to implement this. I will write the backend + CLI + migration guide + android plugin. Help on the IOS side would be nice since I don't own a mac