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

[eas-cli] Add rollout-percentage flag to update command #2502

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Aug 19, 2024

Why

This adds support for the new EAS Update concept: rollout updates. These are updates that are set up to only be served to a certain percentage of users, falling back to a control update. In this PR, the control update is set to the most recent update ID matching the platform and runtime version on the same branch as the branch being published to.

Note that this doesn't care what that update is; it could be a rollout update itself. In this case, the rollout nature of that control update is ignored, essentially ending any previous rollout.

How

Add flag, gather info and publish when flag is supplied. Note that this required refactoring the platform typescript types.

Test Plan

$ neas update
✔ Which branch would you like to use? › main - current update: "Republish "wat" - group: fd643b8f-f9e9-471c-a3cc-2136d38a5ab2" (1 week ago by wschurman)
✔ Provide an update message: … wat
...
✔ Exported bundle(s)
✔ Uploaded 2 app bundles
✔ Uploading assets skipped - no new assets found
ℹ 17 iOS assets, 17 Android assets (maximum: 20000 total per update). Learn more about asset limits
✔ Published!

Branch             main
Runtime version    1.0.0
Platform           android, ios
Update group ID    4eeda5a9-4124-4fe8-8d74-b1e387a891e6
Android update ID  d7733620-48f5-472f-be86-8d1918e4b8a0
iOS update ID      19dd867e-81a8-44a6-835b-8b0bea5989ae
Message            wat
Commit             f9f149c5da203af3e13247522afe2f90da3cc8af
EAS Dashboard      https://staging.expo.dev/accounts/real-org-will/projects/lakajjajaja/updates/4eeda5a9-4124-4fe8-8d74-b1e387a891e6


$ neas update --rollout-percentage=30
✔ Which branch would you like to use? › main - current update: "wat" (22 seconds ago by wschurman)
✔ Provide an update message: … wat2
...
✔ Exported bundle(s)
✔ Uploaded 2 app bundles
✔ Uploading assets skipped - no new assets found
ℹ 17 iOS assets, 17 Android assets (maximum: 20000 total per update). Learn more about asset limits
✔ Published!

Branch             main
Runtime version    1.0.0
Platform           android, ios
Update group ID    63809081-ee5f-4216-add2-b3412aae7a16
Android update ID  654e6e8f-7952-47bc-b1f4-3894178ad2dc
iOS update ID      61451641-6063-48c6-85e6-8bc8b05070cd
Android Rollout    30% (Base update ID: d7733620-48f5-472f-be86-8d1918e4b8a0)
iOS Rollout        30% (Base update ID: 19dd867e-81a8-44a6-835b-8b0bea5989ae)
Message            wat2
Commit             f9f149c5da203af3e13247522afe2f90da3cc8af
EAS Dashboard      https://staging.expo.dev/accounts/real-org-will/projects/lakajjajaja/updates/63809081-ee5f-4216-add2-b3412aae7a16

Copy link
Member Author

wschurman commented Aug 19, 2024

Copy link

github-actions bot commented Aug 19, 2024

Size Change: +4.69 kB (+0.01%)

Total Size: 51.1 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 51.1 MB +4.69 kB (+0.01%)

compressed-size-action

@wschurman wschurman force-pushed the @wschurman/08-19-_eas-cli_add_rollbackpercentage_flag_to_update_command branch 2 times, most recently from 464b803 to 3c850e6 Compare August 20, 2024 00:30
@wschurman wschurman changed the title [eas-cli] Add rollbackPercentage flag to update command [eas-cli] Add rollout-percentage flag to update command Aug 20, 2024
@wschurman wschurman marked this pull request as ready for review August 20, 2024 00:33
@wschurman wschurman requested review from quinlanj and removed request for EvanBacon, khamilowicz, sjchmiela and szdziedzic August 20, 2024 00:34
@wschurman wschurman force-pushed the @wschurman/08-19-_eas-cli_add_rollbackpercentage_flag_to_update_command branch from 3c850e6 to 85ec3a8 Compare August 20, 2024 00:46
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 65.38462% with 36 lines in your changes missing coverage. Please review.

Project coverage is 52.89%. Comparing base (a28439a) to head (6ee4fd1).
Report is 1 commits behind head on main.

Files Patch % Lines
packages/eas-cli/src/project/publish.ts 55.00% 17 Missing and 1 partial ⚠️
...ackages/eas-cli/src/graphql/queries/BranchQuery.ts 0.00% 7 Missing and 2 partials ⚠️
packages/eas-cli/src/commands/update/index.ts 68.43% 1 Missing and 5 partials ⚠️
packages/eas-cli/src/update/utils.ts 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2502      +/-   ##
==========================================
+ Coverage   52.87%   52.89%   +0.03%     
==========================================
  Files         544      544              
  Lines       20085    20154      +69     
  Branches     4096     4114      +18     
==========================================
+ Hits        10617    10659      +42     
- Misses       8654     8674      +20     
- Partials      814      821       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wschurman wschurman force-pushed the @wschurman/08-19-_eas-cli_remove_long-deprecated_update_flags branch from 2332815 to cc2fc9a Compare August 21, 2024 16:36
@wschurman wschurman force-pushed the @wschurman/08-19-_eas-cli_add_rollbackpercentage_flag_to_update_command branch from 85ec3a8 to a150d1f Compare August 21, 2024 16:36
@wschurman wschurman changed the base branch from @wschurman/08-19-_eas-cli_remove_long-deprecated_update_flags to graphite-base/2502 August 21, 2024 16:39
@wschurman wschurman force-pushed the @wschurman/08-19-_eas-cli_add_rollbackpercentage_flag_to_update_command branch from a150d1f to 8ac3ba6 Compare August 21, 2024 16:39
@wschurman wschurman changed the base branch from graphite-base/2502 to main August 21, 2024 16:39
@wschurman wschurman force-pushed the @wschurman/08-19-_eas-cli_add_rollbackpercentage_flag_to_update_command branch from 8ac3ba6 to 6ee4fd1 Compare August 22, 2024 17:59
Copy link

❌ It looks like a changelog entry is missing for this PR. You have two options: you can add it manually, or you can use the changelog bot to do it for you.
🤖 To use the bot, simply comment on this PR with the command /changelog-entry [breaking-change|new-feature|bug-fix|chore] [message].
⏩ If this PR doesn't require a changelog entry, such as if it's an internal change that doesn't affect the user experience, you can add the "no changelog" label to the PR.

Copy link
Member Author

wschurman commented Aug 22, 2024

Merge activity

@wschurman wschurman merged commit d3fdc1a into main Aug 22, 2024
9 of 10 checks passed
@wschurman wschurman deleted the @wschurman/08-19-_eas-cli_add_rollbackpercentage_flag_to_update_command branch August 22, 2024 18:04
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.

2 participants